pixel-editor icon indicating copy to clipboard operation
pixel-editor copied to clipboard

FEATURE: Rotate selection

Open unsettledgames opened this issue 3 years ago • 1 comments

unsettledgames avatar Jun 25 '21 20:06 unsettledgames

(credit Jaman on Discord)

  1. Draw the selection to a headless canvas (rotated)
  2. Get the image data: headlessCtx.getImageData(...selectionRect)
  3. Trim or replace semi-transparent pixels in the image data ( replacing them with a 'similar' color from their palette would be awesome 😄, could be a checkbox option)
  4. Draw it

unsettledgames avatar Jan 25 '22 16:01 unsettledgames