All Questions
Tagged with algorithm javascript
6
questions
1
vote
1
answer
2k
views
Rotating a Bitmap
I would like to rotate an bitmap image using math. I have two issues with my current implementation: the pixel-by-pixel rotation of the copied bitmap is extremely slow and it is leaving gaps between ...
3
votes
1
answer
245
views
Non jagged line algorithm for javascript canvas
I'm trying to draw a line between two specified points, by updating values in an array which is heightxWidth with each element a set of four bytes (r,g,b,a). In my naive implementation I get the top ...
1
vote
1
answer
463
views
Flood-Fill and scanLine algorithms are line-based floods but I want square based floods
I have a flood-fill algorithm (Flood-fill) to fill a 24x24 matrix as follows (matrix is 24x24 here but will be much bigger in production):
...
1
vote
1
answer
2k
views
How can I draw a filled circle on a grid with the less rectangle as possible?
I have a grid with a variable width/height spacing. Let's say 100 horizontal lines separated by 80 pixels and 100 hundred vertical lines separated by 50 pixels.
Each cell of the grid in my logic have ...
6
votes
1
answer
2k
views
How can I verify if a selection area is over a shape in SVG?
I'm creating an SVG editor.
I have a simple selection tool that appears when I click and move my mouse from a blank area in my SVG.
My SVG is populated with rectangles that can have a rotation ...
3
votes
1
answer
152
views
Image regeneration with nearest neighbor search
So what I would like to achieve is this:
User submits Image 1 - this image is then broken down into X by X sized blocks
User submits Image 2 - then the program/algorithm takes all the blocks ...