Commit Graph

9498 Commits

Author SHA1 Message Date
Martín Capello
54116a9550 Use transparent color when the source indexed image uses mask color (fix #3960) 2023-09-25 18:30:36 -03:00
Martín Capello
94b5158a5d Fix blend mode usage for GraphicsContext:drawImage(image, x, y) (fix #3960) 2023-09-25 18:30:36 -03:00
Michał Janiszewski
19b54ffd4e
Use ccache on macOS
Originally (#2699) ccache was only enable for Linux due to suspiciously low
macOS yields.

I have addressed the likely issue upstream
(https://github.com/hendrikmuhs/ccache-action/pull/147) and ccache can be used
on macOS now as well.
2023-09-25 20:11:52 +02:00
Michał Janiszewski
af19d81806 Include build type in ccache key
This should lead to better cache utilisation, smaller caches
2023-09-25 11:13:49 -03:00
Gaspar Capello
bcbe61c882 Fix border padding on the right and bottom sides not being placed (fix #3993)
Prior to this fix, border padding was clipped to the edge of sprites
on the right and bottom in all export sprite sheet types.

This commit includes tests for 'Export Sprite Sheet' command using
shape padding, border padding, inner padding with 'Packed' sheet type
+ 'Trim Cels' = true.
2023-09-22 16:33:19 -03:00
Gaspar Capello
a0331743de Fix Color Range uses last active selection instead of active selection (fix #4045) 2023-09-20 11:44:23 -03:00
Gaspar Capello
db0bc5c6bb Fix F6 shortcut to show the timeline thumbnail by default (fix #4020)
Before this fix, when the thumbnail size was 1, the "Toggle Timeline
Thumbnails" command (F6 key) seemed to not work until we changed
the timeline thumbnail size to 2 or more.
2023-09-20 11:43:43 -03:00
Gaspar Capello
aca8621bff Fix pattern Fill does not "Align to Destination" (fix #2528) 2023-09-20 09:56:01 -03:00
Martín Capello
ba99f41d82 [lua] Add "focus", "enabled", and "visible" common properties to tabs 2023-09-19 14:53:47 -03:00
Gaspar Capello
60233ba144 Changed the "Same in all tools" behavior (fix #4007)
Now:
1) If some dynamics are set and the "Same on all tools" box is
unchecked, when we check it, aseprite will copy the active
configuration as shared values.
2) If "Same on all tools" is checked, and we uncheck it, aseprite
will copy shared values to the active tool settings (without touching
other tools), in this way the visible options of the active tool
won't be modified.
2023-09-19 14:27:24 -03:00
Gaspar Capello
5968440f90 Add memorization of tool-shared dynamics options (fix #4007) 2023-09-19 14:27:24 -03:00
David Capello
d8814fa2f9 Add option to avoid drag & drop timeline range from edges
Related to #1498 in some way to start enabling new selection modes in
the timeline.
2023-09-19 12:07:14 -03:00
David Capello
e2d8ffab54 Add reset buttons + tooltips to timeline range options (#4024) 2023-09-18 17:33:38 -03:00
David Capello
ce6494d5f2 Add XML indentation style in EditorConfig file 2023-09-18 17:30:19 -03:00
David Capello
dd7e27a098 New (default) options to customize timeline range selection (fix #4024)
Now a single click will not enable the range, using Shift+click or
dragging the mouse will enable the range of multiple
layers/frames/cels by default (but there are new options to go back to
the previous behavior or customize this behavior in an extensive way).
2023-09-15 19:53:31 -03:00
Gaspar Capello
3f8a8662fe Fix respect snap to grid when we move the selection (fix #4021) 2023-09-14 13:03:15 -03:00
Martín Capello
709545c57e Avoid showing an alert (fired by the default clipboard error handler) when asking if the clipboard has a native bitmap (fix #4016) 2023-09-14 12:57:19 -03:00
Gaspar Capello
7b302794f9 Fix incorrect brush preview when Snap to Grid is active (fix #3743) 2023-09-14 12:33:21 -03:00
Gaspar Capello
6c34be5eb6 Fix initial folder for File > Save with the last one visited (fix #3996)
Regression added in 056073b3f1 in the
custom file selector. Every time you saved a new sprite the dialog
started at the root path (e.g. Desktop) instead of the last used
directory.
2023-09-14 12:31:28 -03:00
David Capello
4b716255e8 Fix typo in extra paint bucket options popup (#4041) 2023-09-14 11:02:15 -03:00
David Capello
b64021ffb2 Add an initial EditorConfig 2023-09-13 10:36:38 -03:00
Martín Capello
815366d385 [lua] Add support to modify tabs buttons via Dialog:modify 2023-09-12 17:21:00 -03:00
Martín Capello
6010748f81 [lua] Add tabs onclick and ontabchange events support 2023-09-12 17:21:00 -03:00
Martín Capello
d21f47f827 [lua] Add selected tab retrieval/selection through Dialog's data and possibility to set the tabs selector at the bottom 2023-09-12 17:21:00 -03:00
David Capello
0ae408fe4e [osx] Disable native file selector by default on macOS 10.11 (fix #3984) 2023-09-12 16:14:56 -03:00
David Capello
84bd6b69f5 [win] Fix bug pasting 8bpp images (fix #4029)
Fixes a bug copying 8bpp images (e.g. from YY-CHR program).
Regression introduced in 282b040b52

Related thread: https://community.aseprite.org/t/6842
2023-09-01 17:37:11 -03:00
David Capello
f4aa19ad8c Add names to threads (#3729)
This is useful for Sentry crash reports, so we can identify threads by
name.
2023-08-29 13:55:40 -03:00
David Capello
6c5b27db81 Fix crash/hang using WebSocket in a previously disconnected socket
This can happen using Pribambase extension when we close Aseprite in
some strange way (e.g. killing the process), and the connection is not
closed correctly. It looks like the Blender addon is in an invalid
state and the data cannot be sent any more, but without this patch
Aseprite just hangs/crashes if we retry sending data, but with this
fix we can receive/show that an error happened sending data.

Related to: https://github.com/machinezone/IXWebSocket/pull/481
2023-08-29 12:39:12 -03:00
David Capello
702a7d5265 [lua] Rename Dialog:canvas{ autoScaling -> autoscaling } (fix #4011) 2023-08-21 21:10:51 -03:00
David Capello
75d7834609 [lua] Add decorate={rulers, dimmed} params to app.editor:askPoint{} 2023-08-21 20:49:58 -03:00
David Capello
922ebf3039 [lua] Increment scripting API version 2023-08-21 20:49:58 -03:00
Gaspar Capello
572cdf2b0e Add check box "Same in all tools" in the Dynamics options window (fix #4003)
Now each tool has independent 'dynamic options'. A global configuration
for all tools is also possible via the 'Same in all tools' option.

ALso this fix, solves a regression inserted in:
2cc15cda9e
(bug inserted: stabilizer is always active)
2023-08-18 15:35:15 -03:00
David Capello
bee6b98336 Add support for dark mode title bars on Windows 11 (fix #3527) 2023-08-16 17:48:45 -03:00
Martín Capello
115e20d2a5 Add tab widget to lua api 2023-08-14 18:08:33 -03:00
Gaspar Capello
456113d015 Fix after dropping a selection via Copy (Selection + Ctrl), handlers are not positioned correctly (fix #3977)
This fix disables the fine control when the transformation doesn't
include rotation, skew and/or fine scaling (so just translating doesn't
allow fine control until we rotate/skew/scaling, this might change in
the future if we add a new anti-aliasing rotation algorithm).
Also this fix improves the regular movement of the selected image.
2023-08-14 18:08:20 -03:00
Gaspar Capello
2cc15cda9e Add save dynamics options between sessions (fix #3933) 2023-08-14 18:07:46 -03:00
David Capello
9755efece4 Add note to remove duplicated code incorporated in aebb370906 2023-08-14 18:06:55 -03:00
Martín Capello
aebb370906 Add autoscrollbars feature to Lua API Dialog:show function 2023-08-14 18:04:24 -03:00
Martín Capello
1143e3bb4f Limit window position to prevent hiding its title bar when using single-window UI (fix #3839) 2023-08-14 18:04:24 -03:00
David Capello
7358626859 Add flip/rotate brush support to ChangeBrush command (#1222)
Implement part of:
https://github.com/aseprite/aseprite/issues/1222
https://steamcommunity.com/app/431730/discussions/1/1479856439033920884/
https://community.aseprite.org/t/flipping-rotating-the-current-brush/1854
2023-08-09 21:56:55 -03:00
David Capello
2406e2b197 Add FlipDiagonal algorithm 2023-08-09 16:12:02 -03:00
David Capello
aeeef8e255 Add suppor for doc::Image row stride size > width size
This patch solves several problems introducing the possibility to
specify a row stride bigger than the width (visible pixels) on each
image row. Useful in case that we want to align the initial pixel
address of each row (if DOC_USE_ALIGNED_PIXELS is defined).

This allows us to use some SIMD intrinsics (e.g. SSE2) for some image
functions in the future (right now implemented only in the new
is_same_image_simd_templ() for is_same_image()).

Anyway to avoid breaking some existing code, by default we'll still
keep the old behavior: row stride bytes = width bytes (so
DOC_USE_ALIGNED_PIXELS is undefined).
2023-08-07 15:27:39 -03:00
David Capello
ce37fbc8e3 Minor fix in doc_range_tests in the internal image used 2023-08-04 14:45:31 -03:00
David Capello
558ff54cb0 [lua] Add traceback info when a doc object is deleted and we try to use it
A reference to a doc object (Sprite, Layer, Cel, etc.) is done through
its ID in the scripting engine, when we try to access it from a script
that element might be already deleted. Previously we displayed the a
message like "Using a nil 'Cel' object". With this change we show the
traceback and a "Tried to access a deleted 'Cel'" message.
2023-08-03 20:45:44 -03:00
David Capello
741cd31fdd Update laf module 2023-08-03 13:51:40 -03:00
David Capello
50dbba268d Update actions to use new node16 as GitHub is deprecating node12 2023-08-02 18:46:52 -03:00
David Capello
413288a014 Improve flip_image() performance (x10 from old impl, x2 from new slow impl)
The old impl was using get/put_pixel(), the new slow one is using the
get/put_pixel_fast(), and the new default flip_image() is using just
raw pointers.

Added some utilites like random_image() for testing purposes, and
DOC_DISPATCH_BY_COLOR_MODE() macros to avoid switch/case for each
color mode. In a future these might use generic lambdas.
2023-08-02 17:35:20 -03:00
David Capello
2e1d50bf33 Fix some std::clamp() calls: max value cannot be less than min value 2023-07-31 10:31:08 -03:00
Gaspar Capello
ab2d7f79a3 Fix Magic Wand should "refer to visible layers" anyway when the active layer is hidden (fix #3939) 2023-07-25 10:27:06 -03:00
Gaspar Capello
a2e3ab44bd Don't rotate rectangular selection when we're in "subtract mode" and touch editor edges (fix #3976)
As Shift+Alt enables the subtract mode, if we touch an editor edges
and receive a MouseEnter message, we cannot update the selection
modifiers with the pressed Alt key because that will start rotating the
rectangular marquee automatically. We've to start rotating only if we
release the Alt key and then press it again (not by just moving the
mouse).

Recent regression introduced in bd91a6430f
when the ordering of MouseEnter/Move/Leave message order was fixed.
2023-07-25 10:18:46 -03:00