Added other color comparison criterias (fit criteria) during
color mode conversion RGBA to Indexed or Grayscale to Indexed.
The 'fit criteria' will help us to recolor an RGB image with
a limited color palette taking into account different color
perception criteria (color spaces: RGB, linearized RGB,
CIE XYZ, CIE LAB).
Before this fix, a multi-layer mask movement/scaling (with mixed layer
types: normal layer and tilemap layers with different grids) caused
loss of drawing areas.
The heart of this solution is to correctly align the 'selection mask'
and 'transform data' according to the layer's grid, and also, forcing
'site' TilemapMode/TilesetMode before each
reproduceAllTransformationsWithInnerCmds() iteration.
During the life of a PixelMovement object there is a tilemap mode lock.
Additionally arrow keys now work to move a selected area in
TilemapMode::Tiles.
This was originated for #1279 (CLI-only Aseprite) which can be
achieved with LAF_BACKEND=none anyway.
In this way we simplify the development process, and checking for the
availability of the GUI can be done in run-time through App::isGui()
or Context::isUIAvailable().
Now we use the LAF_BACKEND=none/skia to detect if it's going to be the
CLI/GUI version of the program. The ENABLE_UI flag is still defined at
compile-time just to avoid removing all #ifdef/endif conditional
directives right now.
select_layer_boundaries was affected by a change made to Mask::fromImage
where a hardcoded threshold was changed from 128 to 0. To make
select_layer_boundaries behave as before, I've added a new parameter to
Mask::fromImage to set the threshold and then use the same hardcoded
value it was using (128)
This new variant returns an image from a specific layer's frame.
Also a copy_masked_zones() function was created to contain with the
common code for the new_image_from_mask variants
Before this fix, the 'Cancel' command did not work in the following
specific situation:
As soon as Aseprite was started and without hitting the 'Esc' key,
the 'app.command.Cancel()' command did not perform any operation.
It was discovered that the Cancel command is started only once per
session and retains the 'm_type' throughout the session. Only
a specific:
app.command.Cancel {type = "all"} or
app.command.Cancel {type = "noop"}
could change the command type.
With the introduction of Widget::processMnemonicFromText() in
17151cddcd25ab089f5d2ffcc9ec680ba6cd57bf we don't require these
functions anymore because the '&' character isn't not present in the
widget text (so we can just measure the text length as usual).
This was discovered in PR #4604:
https://github.com/aseprite/aseprite/pull/4604#discussion_r1731172284
We have to fill/use the X position of each char box instead of
calculating it through the width of each glyph (because each advance
is different from the glyph width in isolation).
Now we don't render the default ui::Entry edges, but we paint just a
border of the text bounds + the rendered text highlighting selected
text on the canvas itself.
With this change click mouse positions are translated with a scale
factor that changes depending on the app::Editor zoom.
This is the first (not yet production-ready) version of the
interactive Text tool. The text input is done with a transparent
ui::Entry, and on each text modification an ExtraCel is rendered with
this same ui::Entry's TextBlob to be displayed in the canvas with the
active zoom level.
The ui::Entry is being painted along the text in the canvas (just for
testing), but this is something to be fixed. Probably it will not be
the case in the future and a fully customized rendering (onPaint())
process will be required.
This fixes the required output image size to render text in different
languages when the text doesn't support the full range of the
specified chars/code points, and multiple fonts/text runs are used.
If we clicked bold/italic, and then chose another font family, we were
using the cached typeface inside the FontInfo instead of an update
typeface with the selected styles applied (bold/italic).
Now we don't cache the typeface inside FontInfo to avoid this.