Commit Graph

6857 Commits

Author SHA1 Message Date
Gaspar Capello
3e1584e638 Refactor sprite size command params 2019-07-26 09:30:28 -03:00
David Capello
ccef22f187 lua: Add support to construct Point/Size/Rectangles from array of integers 2019-07-19 18:39:06 -03:00
David Capello
1ef67cada4 lua: Support more filters from scripts (BrightnessContrast, Despeckle, HueSaturation, InvertColor, Outline) 2019-07-18 11:47:26 -03:00
David Capello
814250e325 Add support to call ReplaceColor from scripts when the UI is disabled (e.g. from CLI) 2019-07-16 16:36:09 -03:00
David Capello
9143523827 Add params to ReplaceColor command (now this filter can be used from a script without UI) 2019-07-16 09:31:25 -03:00
David Capello
66442ee575 Update Travis CI to test other compilation configurations 2019-07-15 16:19:32 -03:00
David Capello
655ce92836 Use a Tx instead of a Transaction on FilterManagerImpl (fix #2108) 2019-07-15 14:30:59 -03:00
David Capello
6c7f1ff05b lua: Add "bounds" parameter to Dialog:show() function 2019-07-12 16:44:54 -03:00
David Capello
568aadbfc8 lua: invalidate Dialog() after changing its bounds 2019-07-12 16:42:43 -03:00
Gaspar Capello
33dd70f89d Fix contour tool cannot draw only one pixel
The purpose of this fix is enable drawing of one pixel with contour
tool is active and we drag the cursor inside of the same
pixel (https://community.aseprite.org/t/3509).

Added 3 tests in polygon_tests.cpp to test polygon function when the
expected results is a simple pixel.
2019-07-12 14:41:48 -03:00
David Capello
04d547ce37 Use Tx instead of Transaction on PixelsMovement 2019-07-12 14:36:28 -03:00
David Capello
1ae29dfc3c Check if the context can show the new layer name dialog 2019-07-10 12:45:53 -03:00
David Capello
af4fd54c2a Update laf module, fix #1835 and #1973 2019-07-02 16:50:55 -03:00
David Capello
8d4c68fe17 Remove duplicate menu options (prefer "Edit > Paste Special" to paste the clipboard as something new) 2019-07-02 15:34:26 -03:00
David Capello
757fadeaf0 Add New Layer via Cut/Copy commands (fix #1567) 2019-07-02 15:28:05 -03:00
David Capello
fed9a2b45c Don't make layer indentation wider for child layers when we zoom in the timeline 2019-07-01 16:18:32 -03:00
David Capello
f2fae67734 Fix invisible brush edges in certain cases/zoom levels 2019-07-01 15:51:58 -03:00
David Capello
a0ebecca50 Make NewLayerCommand compilable when ENABLE_UI is not defined 2019-06-28 18:53:23 -03:00
David Capello
fe4106457f Add "Edit > Paste Special > Paste As New Sprite" option (fix #1024) 2019-06-28 18:51:14 -03:00
David Capello
e9d8392a46 lua: Several app.useTool() calls can be used in one transaction now (fix aseprite/api#18) 2019-06-28 16:44:52 -03:00
David Capello
ff6538a68e Add Edit > Paste Special > Paste As New (Reference) Layer (fix #672, fix #1748) 2019-06-27 15:34:56 -03:00
David Capello
056eb28670 Fix crash destroying temporal docs (e.g. adding new reference layer) 2019-06-25 15:53:31 -03:00
David Capello
86ffa37fdd Fix rendering bug with new engine and zoom out (canvas is not updated correctly) 2019-06-11 10:42:41 -03:00
David Capello
922505e8af Fix performance problem after viewing an huge sprite
When we were viewing an huge sprite, a temporal buffer (os::Surface*)
used to render it would increase its size to the size of the
canvas. After that, whatever other sprite that we saw (even for the
smallest one) we were unnecessary clearing the entire (huge) internal
buffer with os::Surface::clear() on each render.

This problem was visible only using the new render engine.
2019-06-10 17:43:38 -03:00
David Capello
8e193b592a Avoid refreshing the list of backup sessions when an item is doing some work/task 2019-06-10 11:02:03 -03:00
David Capello
07f64b7682 Fix Jumble tool brush behavior and improve IntertwineAsLines impl
* Fixed Jumble tool behavior: When brush is circular, all the brush
  bounds (square) where randomized. And at the end all the pixels were
  re-randomized.
* Solved the double-point in IntertwineAsLines from
  62802cfbdf in an alternative way: Just
  don't draw the first point when we join consecutive 2 points
  strokes (the issue here is that freehand controller generates
  strokes of two points, so every call on joinStroke() of
  IntertwineAsLines has only two points, we have to check if we're
  drawing the first stroke, and if we are drawing the second 2 points
  stroke, we skip the first pixel to avoid drawing it two times,
  solved with IntertwineAsLines::m_firstStroke).
2019-06-08 13:35:30 -03:00
David Capello
8405add137 Fix error using an invalid crop_image() with Width < 1, Height < 1 when using New Brush with right-click outside the canvas bounds 2019-06-07 18:39:36 -03:00
Gaspar Capello
8281e49798 Fix joinStroke function from class IntertwineAsLines
The purpose of this fix is draw correctly the
first stroke point as result of a joinStroke() execution
from class IntertwineAsLines when following
conditions are meet:
- pencil tool
- pixel perfect OFF,
- custom brush
- try to draw a line of 2 pixel.
The original issue was detected by the tests functions
based in useTool function on Lua scripts.
The issue was presented in tool.lua.
2019-06-07 17:28:03 -03:00
David Capello
45a09f1a15 Disable keepEditedSpriteData checkbox if dataRecovery is disabled 2019-06-07 15:12:39 -03:00
David Capello
fb05e91d01 Hide "Recover Files" button when it's disabled (fix crash clicking it in this case) 2019-06-07 14:40:11 -03:00
David Capello
2a364c3ad2 Fix saving general.keep_closed_sprite_on_memory_for preference with decimals 2019-06-07 13:27:31 -03:00
David Capello
ffee4e5407 Add a note about CLOSEDOC_TRACE that must be TRACEARGS if we want to debug it 2019-06-07 13:22:18 -03:00
David Capello
0554b53385 Rename TRACE() to RECO_TRACE() in data_recovery.cpp 2019-06-07 13:22:02 -03:00
David Capello
8201d62124 The assert can fail if we have the data recovery disabled 2019-06-07 13:18:23 -03:00
David Capello
c7d1e4a472 New option to configure how much time we keep a closed sprite on RAM 2019-06-07 13:17:21 -03:00
David Capello
a7a9d05de3 Fix compilation when ENABLE_UI is off 2019-06-06 14:58:45 -03:00
David Capello
7ce45c0017 Fix crash from backup observer thread because the condition variable is not yet initialized when the thread starts 2019-06-06 12:15:53 -03:00
David Capello
bf649df9f2 Add Wine version to user agent string in case that we're running Aseprite from Wine 2019-06-06 12:15:31 -03:00
David Capello
3cd6fa2f08 Add missing #include <vector> for doc::algorithm::createUnion() 2019-06-06 10:14:12 -03:00
Gaspar Capello
2366bee6d4 Fix createUnion function and added createUnion tests
The purpose of this fix is that createUnion handles situations
which union results in contiguous segment collapses.
Added some treatments of eventual illogical inputs arguments like:
- pairs.size() < ints
- ints is 1
- ints is a odd number
Fixed treatment of some union cases like:
- x == pairs[i+1] + 1
- x == pairs[i+1]
Simplification of some vector::insert execution.
Added a bool return type to know if the function was
successfully executed when is called (used in tests).
We change the “static void createUnion(…)” to
“bool algorithm::createUnion(…)” to conditioning it to
future tests.
Added some comments modifications.
Added tests to polygon_tests.cpp
2019-06-05 15:19:32 -03:00
David Capello
364b0d2088 Avoid resetting the showMenuBar setting to false by mistake
Change the way we calculate the first-execution of the
program (without depending on the UUID of the updater, e.g. because
the server didn't return an UUID, etc.).
2019-06-05 10:44:00 -03:00
David Capello
07077c139d Don't print TRACE() output by default from gif_format.cpp 2019-06-05 10:30:18 -03:00
David Capello
759326f1b6 Move GitHub ISSUE_TEMPLATE file inside the .github directory 2019-06-05 10:22:40 -03:00
David Capello
013f10363f Destroy the main window at the very end
So we can check asserts on the Workspace about empty panels.
2019-06-05 10:21:18 -03:00
David Capello
ad64deef6c Several changes to default StatusBar text
* Change the Home status bar text
* Show the full path of the document (if the user preferences allow
  us) when we move the mouse over the document tab
* We weren't calling onWorkspaceViewSelected() from
  WorkspacePanel::setActiveView()
2019-06-05 10:16:34 -03:00
David Capello
706590df05 Fix eyedropper when zoom < 100%
Without this patch it was returning always the mask color (alpha=0%).
2019-06-04 16:48:04 -03:00
David Capello
7c26a88813 Avoid ASSERT() fail in ~DocObserverWidget()
We have to unselect all documents before we destroy the main window,
so all onActiveSiteChange()/onDocChange() are called correctly just in
case.
2019-06-04 16:47:29 -03:00
David Capello
29a6f89dc4 Minor change in src/CMakeLists.txt 2019-06-04 12:26:03 -03:00
David Capello
f789506428 Accept a valid case of FileOp() without preferences (for file_tests) 2019-06-04 12:25:02 -03:00
Gaspar Capello
81a355133d Add polygon tests 2019-06-04 12:14:20 -03:00