Commit Graph

153 Commits

Author SHA1 Message Date
David Capello d0c95cf46f Add possibility to paint with tiles 2020-06-25 19:21:35 -03:00
David Capello bd1723313a Merge branch 'master' into tilemap-editor 2020-06-12 11:33:55 -03:00
Gaspar Capello 9c37ea41ed Fix locked layer not completely locked (fix #2181) 2020-06-09 18:03:09 -03:00
David Capello a10efb187b Merge branch 'master' into tilemap-editor 2020-06-01 16:21:32 -03:00
David Capello 2bfd3261b5 Define fill_toolloop_params_from_tool_preferences() only when needed 2020-05-22 11:15:04 -03:00
David Capello b922cfcc10 Refactor ToolLoop creation w/ToolLoopParams to add more options to app.useTool()
This will be used to add more testing capabilities to app.useTool()
2020-05-19 20:11:47 -03:00
David Capello a80af2b304 Merge branch 'master' into tilemap-editor 2020-05-18 20:24:22 -03:00
David Capello d9b0887a3a Fix crashes running tests from CLI 2020-05-08 19:44:29 -03:00
David Capello 46f4002368 Fix crashes saving sprites with '%' char in their filename
To fix this we changed the way StatusBar text is handled (we are using
fmt::format() in StatusBar instead of printf-like ... args now).
2020-05-08 17:39:55 -03:00
David Capello a54e2ce13f Fix eraser tool/stylus tip when dynamics for gradients are on 2020-05-07 21:40:03 -03:00
David Capello c3ebf40cb1 Fix shading ink for RGB and Grayscale modes
The colors in the shades are not necessary to be in the palette or
related to a palette index in these modes (or even more, the color
palettes can be duplicated), the only important things are the values
in the shades for RGB and Grayscale, so in these modes now we access to
ToolLoop::getShade() directly and create a mini-palette to find the
colors there (ignoring the sprite palette completely).
2020-05-06 17:14:47 -03:00
David Capello 82ab0bc40a Avoid creating an extra brush for the brush preview 2020-05-05 19:42:07 -03:00
David Capello 0ad50373d3 Enable dynamics for Eraser 2020-04-30 09:02:05 -03:00
David Capello 1d15bacdcd Add sensor tweaks to specify min/max thresholds of the sensor input
In this way we can translate the sensor input to a better output range
for our specific device (mouse, stylus, etc.).
2020-04-23 18:03:34 -03:00
David Capello d1843fcf55 Fix interpolation between stroke points with line brush (fix #728)
Related to #245, and there are still problems with gaps using new
dynamic angle parameters.
2020-04-23 11:30:36 -03:00
David Capello 3c1ea2f407 Add/process dynamic data in/from stroke points (related to #710)
* Converted Stroke points from gfx::Point to Stroke::Pt
* Process gradient data to create shading betweens points or dithering
  with new doc::Brush patterns
2020-04-22 20:17:14 -03:00
David Capello 79f9e28ce8 Added pen pressure sensitivity (fix #710)
- Added support to detect eraser tip on Linux (#610)
- Related to #139
- Still needs works for gradients and better brush interpolations
  between stroke points
- Requested several times, e.g. https://community.aseprite.org/t/1077
  https://community.aseprite.org/t/1881, steam forum, etc.
2020-04-21 22:27:49 -03:00
David Capello 7319309630 Merge branch 'master' into tilemap-editor 2020-03-17 00:25:24 -03:00
David Capello 1fe3c3a4bc Add a number to each new slice that is created (related to #1651) 2020-03-06 15:18:10 -03:00
David Capello 1e5c096236 Display correct grid bounds when using Rectangular Marquee tool on a tilemap layer 2020-02-17 09:06:02 -03:00
David Capello 4d69106993 Fix crash merging a tilemap layer into a regular layer 2020-02-17 09:06:01 -03:00
David Capello a6302b91f7 Fix paint bucket and magic wand tools for tilemaps 2020-02-17 09:06:01 -03:00
David Capello 7b07f29f0b Add possibility to select multiple tiles with double-click + dragging mouse (fix #1988)
Fixes: https://community.aseprite.org/t/1929
Related to #939
2020-02-16 12:42:29 -03:00
David Capello df74444347 Now ContextWriter will always wait 1/2 second to unlock the backup thread 2020-02-05 17:50:17 -03:00
David Capello 30b2585037 Save grid bounds inside .aseprite files and doc::Sprite (fix #688) 2019-10-10 15:08:59 -03:00
David Capello 3e391670b9 Fix preview of certain tools in tiled mode (fix #2145)
Fixes #2145 and https://community.aseprite.org/t/3833
Regression introduced in: 6a88713213
2019-09-05 18:04:38 -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 85ce7eea6e Fix compilation error when ENABLE_UI is undefined 2019-05-08 19:18:19 -03:00
David Capello 73de6c8b1d Add ability to edit multiple slices
Related to #721 and #1651, still need more work to give a better UX to
edit static and animated slices.
2019-05-02 16:26:13 -03:00
David Capello 40957c196f Minor refactor adding ToolLoop::onSliceRect() 2019-04-30 16:42:15 -03:00
rscotchmer a08cfa9e13 Added support for 4 and 8 connected pixel fill method in paint bucket 2019-04-29 23:29:17 -03:00
David Capello 5cf762c9cf lua: Fix app.useTool() tests when we run in batch/non-UI mode
* Tools must use the default configuration when we run in -batch mode
* Fixed app_get_current_pixel_format() when ENABLE_UI is disabled so
  the color= parameter of app.useTool{} depends on the activeSprite
  color mode
2019-04-24 18:31:43 -03:00
David Capello 8a821c83fd lua: Add Brush class and app.useTool{ brush } parameter 2019-04-18 22:33:48 -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 3ec3f75d91 Add radial gradient
Related to:
* https://steamcommunity.com/app/431730/discussions/1/3182216552785250054/
* https://community.aseprite.org/t/radial-gradient/2711
* part of #1629
2019-03-19 20:54:25 -03:00
David Capello 33c6fc5f40 lua: Fix tools tests when ENABLE_UI is not defined 2019-03-18 13:30:17 -03:00
David Capello 1cb5949e9b lua: Add app.drawWithTool() function 2019-03-15 17:03:02 -03:00
Gaspar Capello f53544842c Fix non-normal blend modes when the backdrop is transparent (fix #1096) 2019-03-09 12:40:31 -03:00
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