Commit Graph

115 Commits

Author SHA1 Message Date
David Capello 6a1a21726e Show modified regions correctly in ToolLoop on visible areas in non-active editors
Regression introduced in 6a88713213
2019-02-21 08:20:00 -03:00
David Capello 6a88713213 Avoid validating hidden areas while we're in the tool loop for tools like line/square/ellipse, etc. 2019-02-20 17:29:20 -03:00
David Capello e960a79a87 Move dirty area from ToolLoop impl to ToolLoopManager 2019-02-20 11:17:09 -03:00
David Capello 7594ebf25b Generate selection boundaries automatically after transactions
Now Transaction::commit() will regenerate mask boundaries
automatically if in the middle of the transaction the document
selection was modified. This is the first step to finally remove
update_screen_for_document() and any kind of manual screen
refresh.

This will be useful for scripting functions that modify the selection
too, because we wouldn't need to regenerate the selection boundaries
automatically from the script or from app.refresh() Lua function.

Related to #378
2019-02-15 17:14:44 -03:00
David Capello fe9f8bc468 Add option to disable the alert about drawing with fg/bg index out of bounds 2018-09-13 10:53:14 -03:00
David Capello f2ed45e795 Replace base::UniquePtr -> std::unique_ptr 2018-08-08 17:27:26 -03:00
David Capello 8d3da46ac9 Rename DocumentReader/Writer -> DocReader/Writer 2018-07-14 22:49:22 -03:00
David Capello 9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -03:00
David Capello ac7e48d92d Rename DocumentUndo -> DocUndo 2018-07-07 02:55:27 -03:00
Gaspar Capello dd82f6bbcc Add option to disable auto show selection edges (fix #1614) 2018-04-20 10:56:27 -03:00
David Capello 76aee61eae Fix drawing straight lines w/Pencil tool and Shift+right button
https://community.aseprite.org/t/eraser-tool-right-click-shift-should-work/726
2017-11-27 13:54:27 -03:00
David Capello 29c2c0cd90 Fix status bar position depending on the tiled mode 2017-11-10 15:04:09 -03:00
David Capello a9b183729f Translate all alerts to the en.ini file (#124) 2017-10-17 18:00:45 -03:00
David Capello 750f0c52af Keep original pattern origin for custom brushes
With this patch we avoid resetting the original pattern
origin when we use "align to destination" or "paint brush"
modes.
2017-10-06 10:23:03 -03:00
David Capello e372967cde Fix bug using brush size on selection+snap to grid
Discussion: https://community.aseprite.org/t/snap-to-grid-problem/292
2017-08-08 14:31:27 -03:00
David Capello 3f5bfa6d99 Remove unnecessary asserts from create_tool_loop() 2017-06-22 19:04:44 -03:00
David Capello a517ed2fff Minor change in ToolLoopBase() ctor 2017-06-19 17:39:08 -03:00
David Capello 265d18635c Pencil: Shift key shows a real-time preview of a straight line (#1387) 2017-06-16 16:28:48 -03:00
David Capello 34e794519c Fix reset last drawn point on undo/redo for draw line behavior (fix #1005) 2017-06-16 12:18:22 -03:00
David Capello ae67cab015 Add dithering options for Gradient tool (#418) 2017-05-23 20:41:30 -03:00
David Capello 76df84491e Support horizontal/vertical symmetry at the same time (fix #1190) 2017-03-27 15:27:37 -03:00
David Capello add0c81260 Add guides/slices options in preference dialog
Also moved guide/slice colors to global preferences (instead of pref per document).
2017-03-25 01:01:59 -03:00
David Capello fb64d5406a Add some colors for cel edges/guides in doc pref 2017-03-23 20:23:25 -03:00
David Capello 643cad5c97 Add basic implementation of slice tool (#721) to modify theme parts
It still need support to export to .aseprite-data as <slice> XML elements, and animation support.
2017-03-06 19:27:43 -03:00
David Capello 6ce73a831a Don't allow draw/modify reference layers 2016-10-17 13:49:28 -03:00
David Capello e46d453356 Merge branch 'master' into beta 2016-09-23 13:21:51 -03:00
David Capello b75d87c5fc Fix glitches with 'on sprite crosshair' after modifying sprite areas 2016-09-23 10:28:15 -03:00
David Capello d4c4cb5f72 Fix graphical glitches while painting (fix #1262) 2016-09-22 20:16:14 -03:00
David Capello 20b726f73b Merge branch 'master' into beta 2016-08-31 19:53:52 -03:00
David Capello 5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello ac20d1edfc Fix some commands/editor states to check parent group editable/visible state too 2016-06-15 15:27:38 -03:00
David Capello 37209a0f5b Add pixel ratio support to the Editor & Render 2016-05-23 19:22:02 -03:00
David Capello b2b2edb4bc Remove unused field ToolLoop::zoom() 2016-05-23 17:29:44 -03:00
David Capello 975c1bd0a5 Remove reference to the old raster::Dirty object 2016-05-05 15:25:19 -03:00
David Capello 0f3dea233b Fix problems using paint bucket referring to all layers and cels origin != 0,0
With this change we've simplified several portions of the ToolLoop code
where the "cel origin" is added and then subtracted needlessly.
2016-05-04 00:02:56 -03:00
David Capello 6dc9bb984d New option for paint bucket using all layers as reference/stop fill (fix #969) 2016-05-03 15:31:27 -03:00
David Capello 640025e84b Fix selection UX to show white/black negative for the stroke
With this patch now we can use the selection tool in locked or hidden
layers, because the selection doesn't modify the layers (only the
selection). Also we can use the selection tool on any layer and we'll
always see the feedback stroke/shape/rectangle while we're creating
the new selection.
2016-05-02 18:42:02 -03:00
David Capello 5f90ef7c9b Add properties in App to access directly to timeline/contextBar/workspace 2016-04-22 13:19:06 -03:00
David Capello c5f7e9618b Use the real current tool preferences to draw and in the brush preview
The "real" current tool is the one in the editor returned by
getCurrentEditorTool() (which depends on quicktool modifiers
and right-click configuration).
2016-04-21 01:20:59 -03:00
David Capello 2ce09c53dd Add customization for square aspect, draw from center, and move origin keys (fix #1028)
Some changes:
- Now ui::Keys aren't processed in app::tools side, they are processed
  in Editor side and converted to ToolLoopModifiers flags.
- Replace ToolLoop::getSelectionMode -> ToolLoop::getModifiers()
2016-04-04 18:46:48 -03:00
David Capello 2af47fe907 Add option to toggle the selection edges visibility (fix #861) 2016-03-24 13:04:35 -03:00
David Capello cf7c4754cc Convert InkShadesField in a combobox-like widget to store several shades (#85)
Changes:
* Added new ui::IconButton widget to create widgets with one skin icon
  that is colored depending on the button state.
* ContextBar::InkShadesField was divided into a couple widgets (ShadeWidget
  and IconButton to drop-down a little menu with saved shades)
* Fixed CommonLockedSurface::drawColoredRgbaSurface() impl.
* Removed invalid gfx::setr/g/b/a() functions.
2015-11-24 18:37:13 -03:00
David Capello 78daffba73 Fix shading mode on RGB mode when index 0 is involved (fix #794)
As now the RgbMap is generated correctly depending on the current layer
(if it’s opaque or transparent), we’ve fixed
LockAlpha/Transparent/Merge/Blur/Replace/JumbleInkProcessing for
Indexed images with a background layer, when a transparent layer is the
active one, and when a non-mask index has same RGB values than the mask
index.
2015-11-04 10:33:23 -03:00
David Capello 08a04fcb64 Fix symmetry mode when cel origin != sprite origin (0,0)
Change ToolLoop::getOffset() to getCelOrigin()
2015-11-02 16:44:17 -03:00
David Capello a3deb2063e Add MovingSymmetryState to modify symmetry axis position 2015-10-28 20:00:18 -03:00
David Capello 56854cdb9f Add symmetry mode (fix #208)
This is a first iteration of the feature, it doesn’t have handles to
move the symmetry line and it only contains two symmetry modes:
horizontal or vertical.

As an extra change, we have added the new Stroke type to wrap a vector
of gfx::Points and simplify some existing code in the ToolLoop.
2015-10-26 17:51:32 -03:00
David Capello 3d4fdb62b4 Pass opacity value to Eraser, Blur, and Jumble tools 2015-09-30 08:59:32 -03:00
David Capello 8aefa24a5b Add key modifier to draw straight lines from the last point (fix #562)
- Removed ToolLoop::screenToSprite(), now ToolLoopManager::Pointer has
  sprite coordinates (instead of screen coordinates)
2015-09-16 12:19:10 -03:00
David Capello f3ac563e33 Add shading ink (fix #85) 2015-08-26 16:48:01 -03:00
David Capello 22adb9d7d3 Do not share Ink instances between different tools::ToolLoop implementations (fix #764) 2015-08-19 12:58:56 -03:00