aseprite/src/app/tools
Gaspar Capello 4a91d150af Fix transparent color is possible on opaque sprites (fix #4370)
To reproduce the error before this fix on RGBA/Grayscale Color Mode:
- New 100x100 RGBA/Grayscale opaque sprite (white background).
- Draw something with some gray color in the palette.
- Keep the selected gray color as primary color.
- Configure as secondary color the mask color (#000000 alpha=0).
- Pick 'eraser' tool and erase over the gray color with right click.
- Result: The sprite doesn't look more opaque, which is wrong. Also,
  if we export this sprite, the transparent parts will turn black.

A similar problem occurs in Indexed Color Mode, but getting a
transparent color in a Background sprite is inevitable if the color of
a palette entry is transparent or semi-transparent, since the index
must be set as is. This could be fixed in the future at the
render stage, however, this could lead to other perceived
inconsistencies. For now it'll be left as is.

Original issue description:
Downloaded PNG in RGB mode fails to support transparency: erase
uses secondary color and export PNG replaces transparent color
with black

Added tests for 'eraser' in 'Replace Color Mode'
To make the eraser work in 'Replace Color Mode' within the tests,
was implemented the possibility of using the right button in
the creation of the point vector.

During testing with UI available it was observed that the 'bg' color
was copied from the 'fg'. Changed this to be compatible with the way
the default value of 'fg' is assigned when it is not specified.
This last modification resulted in errors during 'tilemap.lua' due to
incompatibility of the type of 'bg' color. This was corrected
considering the color type of 'fg' color.
Furthermore, it was found that the command 'app.range.tiles = { 1 }'
did not finish assigning the tile picks to the activeSite,
then 'assert(1, #app.range.tiles)' was failing. This was fixed too.
2024-09-03 19:08:15 -03:00
..
active_tool_observer.h
active_tool.cpp Remove #if/endif ENABLE_UI conditional directives (fix #4619) 2024-09-02 23:16:26 -03:00
active_tool.h
controller.h
controllers.h
dynamics.h
fill.h
freehand_algorithm.h
ink_processing.h Fix transparent color is possible on opaque sprites (fix #4370) 2024-09-03 19:08:15 -03:00
ink_type.cpp
ink_type.h
ink.h
inks.h
intertwine.cpp
intertwine.h
intertwiners.h Fix CounCountour Tool: pixel perfect doesnt work after a straight line (fix #4256) 2024-05-28 07:47:59 -03:00
pick_ink.cpp
pick_ink.h
point_shape.cpp
point_shape.h
point_shapes.h
pointer.h
rotation_algorithm.h
stroke.cpp
stroke.h
symmetry.cpp
symmetry.h
tool_box.cpp
tool_box.h
tool_group.h
tool_loop_manager.cpp Reset mask when clicking outside of bounds with the magic wand tool (fix #4490, #4595) 2024-08-15 09:13:18 -03:00
tool_loop_manager.h fix #4217: Disable mouse stabilizer while previewing a straight line 2024-05-23 15:00:39 -03:00
tool_loop_modifiers.h
tool_loop.h
tool.h
trace_policy.h
velocity.cpp
velocity.h