Commit Graph

6975 Commits

Author SHA1 Message Date
David Capello
495058e8ff Save last used dithering algorithm converting RGB -> Indexed 2019-04-03 11:05:54 -03:00
David Capello
b6d07d995f Fix error diffusion algorithm
The error propagation must be limited to 0...255 values, and the new
quantization error must be calculated to that limited value. Also the
1/16 part of the Floyd-Steinberg distribution must be the remaining of
the other parts.
2019-04-02 13:58:55 -03:00
David Capello
c2af88343e Fix invalid memory access in ErrorDiffusionDither 2019-04-02 00:18:36 -03:00
David Capello
20b8ee0e57 Add Floyd-Steinberg dithering for RGBA -> Indexed conversion 2019-04-01 22:00:32 -03:00
David Capello
c0b4224f32 Fix sprite position after undoing/redoing a move/copy timeline range operation 2019-04-01 20:35:50 -03:00
David Capello
f3bb1ecdf1 Fix regression introduced in ed0f4c3023 2019-04-01 19:57:53 -03:00
Gaspar Capello
855c7d8ee3 Improved import sprite sheet dialog (from #1987) 2019-04-01 16:51:19 -03:00
David Capello
29a4c6f744 Fix accessing to invalid Site object after undoing/redoing
Mainly the site.layer() field of the context writer after an undo/redo
is not valid anymore (e.g. because the layer could have been removed).
Now we get the new active site (Context::activeSite()) to go to that
place after the undo/redo operation.
2019-04-01 15:50:59 -03:00
David Capello
ed0f4c3023 Don't access Preferences to do color conversion from bg threads
Continuation of 673e1955fa
2019-04-01 15:44:49 -03:00
David Capello
c6fb34ef4a Don't access newBlend preference from background threads
Continuation of 673e1955fa
2019-04-01 15:29:48 -03:00
David Capello
9c98f9c4df Don't use Preferences to get default slice color in background thread
Continuation of 673e1955fa
2019-04-01 15:01:16 -03:00
David Capello
bbd96a23b5 Add some comments for the #1964 fix 2019-04-01 14:31:27 -03:00
Gaspar Capello
22b58aafaa Don't copy the export file name to sprite preferences created from Save As or Export (fix #1964) 2019-04-01 14:16:52 -03:00
David Capello
42d5f10437 Fix access to memory out of scope on Sprite Properties when assigning/converting color profiles
Some buttons where calling the updateButtons() lambda that were
defined inside a sub-scope of SpritePropertiesCommand::onExecute()
(which is where the window is displayed
ui::Window::openWindowInForeground()), the lambda was already
out-of-scope when it was used by other lambdas.
2019-04-01 14:11:42 -03:00
David Capello
98a660a06b Fix rendering of active sprite when color management is disabled 2019-04-01 14:11:06 -03:00
David Capello
55f58d8bea Don't convert thumbnail color profile to sRGB when color management is disabled 2019-04-01 14:10:38 -03:00
David Capello
673e1955fa Don't use Preferences in background threads 2019-04-01 13:19:42 -03:00
David Capello
686da0efd8 Merge branch 'rect-pack-padding' of https://github.com/kawa-yoiko/aseprite into master 2019-04-01 10:18:58 -03:00
David Capello
b22903b326 Refactor Cel::createCopy/Link() -> Cel::MakeCopy/Link() receiving the new frame position for the copy/link 2019-03-29 18:04:54 -03:00
David Capello
c5b952173f Minor fixes in aseprite file format specs 2019-03-29 16:13:16 -03:00
David Capello
07cc284c30 lua: Add Image:isEmpty() and Image:isPlain() 2019-03-29 15:55:10 -03:00
David Capello
c945996fd6 lua: Add tostring support for Point/Size/Rectangle 2019-03-29 15:54:20 -03:00
David Capello
047dbbca67 Update clip module 2019-03-28 22:57:31 -03:00
David Capello
427bbe9573 Update laf module 2019-03-28 12:56:44 -03:00
David Capello
325d675786 Fix thumbnails for indexed images with transparent color (GIF files mainly) 2019-03-28 10:44:06 -03:00
David Capello
d9aa0d5c68 Convert thumbnails to sRGB color space + don't use EditorRender from thumbnails workers 2019-03-28 10:28:34 -03:00
Shiqing
14c1bceb4c Add padding support for --sheet-pack 2019-03-28 13:22:47 +08:00
David Capello
30798435d1 Fix an edge case where m_remainingItems has elements but we don't have more workers to consume it 2019-03-26 15:19:52 -03:00
David Capello
dbae196f2d Fix using Enter key to open folder a when we've the focus in the filename entry 2019-03-26 14:22:48 -03:00
David Capello
8ba0ea4519 Simplify the stop process of thumbnail generators 2019-03-26 10:59:11 -03:00
David Capello
ce27188852 Fix FileList items size in list mode when the vertical scroll bar is hidden 2019-03-26 09:25:58 -03:00
David Capello
5acadc69ca Avoid locking the UI when we enter in a new folder
Instead of calling ThumbnailGenerator::generateThumbnail() for each
visible item on FileList::onPaint(), we create another queue of items
to be generated on each monitoring tick.
2019-03-26 08:20:24 -03:00
David Capello
9e7e2767c8 Fix several issues decoding TGA files 2019-03-25 23:48:21 -03:00
David Capello
9a75d01efe Improve the File Selector adding new view types: list, small icons, big icons (fix #451) 2019-03-25 22:09:22 -03:00
David Capello
01fb806091 Update doc library copyright year 2019-03-25 08:53:17 -03:00
David Capello
d18001559b Fix bug locking mutex to access doc objects list and newId counter 2019-03-25 08:22:12 -03:00
David Capello
2812a95f1e lua: Add params to app.useTool() to change the cel where we'll draw 2019-03-23 16:34:51 -03:00
David Capello
1f7f5415cd lua: Add Color.rgbaPixel and .grayPixel 2019-03-23 16:34:15 -03:00
David Capello
98080544cf lua: Rename app.toolStroke() -> app.useTool()
This function was called app.drawWithTool() first, but some tools do
not "draw" (e.g. eraser, selection-like tools, etc.). And then the
app.toolStroke() name could be confused with the Edit > Stroke
command.
2019-03-23 13:31:14 -03:00
David Capello
7d8e493dca Fix crash undoing Edit > Shift (regression from 1c05ea10bb) 2019-03-23 11:44:38 -03:00
David Capello
fd9ff17976 Merge branch 'macos-menubar' of https://github.com/kawa-yoiko/aseprite into kawa-yoiko-macos-menubar 2019-03-23 09:48:56 -03:00
David Capello
396824383f lua: Add app.activeTool + Tool object 2019-03-23 09:19:10 -03:00
Shiqing
5d5aae7311 Fix incorrect layout with --trim and --sheet-pack 2019-03-23 16:06:00 +08:00
David Capello
54f95dda77 Fix gradient origin when the kFromCenter is not used (regression introduced in 250d40c0f3)
When the kFromCenter is enabled, we have to use the middle-point of
the two points controller as the origin of the floodfill algorithm,
but when kFromCenter is not enabled, we use the first point.  This is
the only way to make both cases work well in such a way that the
origin of the floodfill is not displaced when the mouse is moved.
2019-03-22 18:22:30 -03:00
David Capello
3c35887abf Specialize Params::get_as<bool>() to read "true" as a true bool
Just like new params impl Param<bool>::fromString()
2019-03-22 11:47:45 -03:00
David Capello
674f9ff3b5 Get AutocropSprite strings from i18n file
After introducing AutocropSpriteCommand::onGetFriendlyName(), we stop
using the automatic commands_AutocropSprite string from en.ini. This
commit fix that regression from f24eb75298
2019-03-22 11:27:39 -03:00
David Capello
60e8a5967d Minor changes to f24eb75298 2019-03-22 11:26:44 -03:00
David N Campo
f24eb75298 Add --trim-by-grid CLI option 2019-03-22 10:55:26 -03:00
Shiqing
223002c182 Disable app menu during laf modal dialogs on macOS 2019-03-22 13:40:31 +08:00
Shiqing
ca1728fd38 Fix #1606 sprite sheet contains full path of image 2019-03-22 12:42:07 +08:00