Commit Graph

26 Commits

Author SHA1 Message Date
David Capello 93d59f87e9 Fix RenderTaskJob compilation on MSVC
We cannot refer the "job" instance in the lambda captures on the same
statement on MSVC compiler.
2017-05-26 11:30:58 -03:00
David Capello adbcc75fad Hide dithering options when we convert to non-Indexed 2017-05-23 16:00:33 -03:00
David Capello 89acb421e0 Remember ColorModeWindow position 2017-05-23 15:41:56 -03:00
David Capello 4fc19c5466 Change "old-ordered" dithering algorithm to just "old" 2017-05-23 14:56:06 -03:00
David Capello bcdf598392 Add widget to choose dithering algorithm + matrix 2017-05-22 15:44:08 -03:00
David Capello 5ef6aac925 Add --dithering-matrix CLI option
Now the dithering matrix used in ordered dithering algorithm is configurable.
2017-05-19 15:49:31 -03:00
David Capello 7837a123f8 Add option to merge layers in color mode conversion 2017-05-19 10:54:44 -03:00
David Capello e3701940fb Add friendly names for ChangePixelFormat command 2017-05-19 10:23:26 -03:00
David Capello c3fcacf3fb Preview the color conversion of the visible sprite area only 2017-05-18 15:19:57 -03:00
David Capello 131336d015 Add progress dialog/bar when we change color mode
Added a new app::RenderTaskJob to execute a lambda function as in a
background thread in a app::Job that can be used as a
render::TaskDelegate by some render functions.
2017-05-17 16:40:19 -03:00
David Capello 573cad4777 Add progress bar to color conversion
Unified render tasks stop/progress notifications in render::TaskDelegate
interface.
2017-05-17 15:25:40 -03:00
David Capello 5c07f86a66 Remove DocumentApi::setPixelFormat() member function 2017-05-17 13:57:36 -03:00
David Capello 16aeae0833 Add new ordered dithering algorithm 2017-05-17 13:32:34 -03:00
David Capello cbee0862f3 Add a Color Mode conversion dialog with preview 2017-05-16 17:18:55 -03:00
David Capello 23272895c4 Move doc::DitheringMethod -> render::DitheringAlgorithm 2017-05-15 16:26:44 -03:00
David Capello e4a4f44127 Add --color-mode CLI option 2017-05-15 15:21:02 -03:00
David Capello 5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello 0cb4b2234d Always load params when a command is executed
This is to avoid leaving commands with old params (a problem with
keyboard shortcuts). To make sure, we've changed arguments from Params*
to Params&, so we always have params to load.

Also, in this change we introduce a new way to give parameters to executed
commands from menu items using AppMenuItem::setContextParams(). Before
showing a popup, we can call setContextParams() to give extra params to
the command (e.g. the specific FrameTag to remove or change properties).
In this way "contextparams" attribute for <item> in gui.xml is not
available anymore.
2015-03-11 15:40:22 -03:00
David Capello 2c6067f7e4 Update license of app/ module to GPLv2 2015-02-12 12:16:25 -03:00
David Capello e55865843e Replace undo impl: replace undoers with cmds
Undoers were little objects to swap/revert an action. They didn't
execute the action itself, they just revert its previous state. Now
undoers were replaced with cmds: A cmd is an object that
executes/undoes/redoes just one action.

Changes:
* Remove old undo library and app/objects_container_impl.cpp
  (now we use the doc::ObjectId directly to store undo info)
* Remove all Undoers from app/undoers/
* Replace DocumentApi impl with little Cmds in app/cmd/, these
  cmds handle execute/undo/redo of each action at the logic layer
* Remove doc::Dirty object
* Remove doc::Settings: all undo configuration is in the app side
* Move undo options from app:ISettings to app::Preferences
* Rename UndoTransaction to Transaction
* Create a CmdSequence to store a sequence of Cmds (as now the new
  undo library doesn't support open/close groups)
* Add doc::get<T>(ObjectId) function to get any kind of object
  from the doc library by its ID
* Add Cel::document() and Sprite::document() members
* Add Sprite::cels(frame_t) to get all cels in the given frame
* Add Layer::displaceFrames() member function
* Move the "allow non-linear history" flag from undo2::UndoHistory
  to app::DocumentUndo
2015-01-18 22:05:33 -03:00
David Capello da1358c5dc Unify all render code in one library
Changes:
* Create render library (move util/render.cpp to render/render.cpp)
* Move app::Zoom class to render::Zoom
* Remove doc::Image::merge() member function
* Add gfx::Clip helper class (to clip dst/src rectangles before a blit)
* Move doc::composite_image() to render::composite_image()
* Remove doc::Sprite::render()
* Replace Sprite::getPixel() with render::get_sprite_pixel()
* Remove doc::layer_render() function
* Convert DitheringMethod to a enum class
* Add AppRender to configure a render::Render with the app configuration
* Move checked background preferences as document-specific configuration
* Add doc::Sprite::layer() and palette() member functions
* Add doc::Layer::cel() member function
* Add doc::Palette::entry() member function()
* Add doc::frame_t type
* Move create_palette_from_rgb/convert_pixel_format to render library
* ExportSpriteSheet doesn't need a temporary image now that we can specify
  the source rectangle in the render routine
2014-12-28 11:06:11 -03:00
David Capello 63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello 5d3d96d2d9 Minor changes: remove unnecessary dependencies with allegro.h 2014-09-21 11:59:39 -03:00
David Capello 6824570c4b Remove base/override.h (use override keyword directly) 2014-08-14 23:07:47 -03:00
David Capello 91b0c2d071 Refactor: Remove "get" part for member functions that act like a simple getter
Additional change:
- Added Cel::image() to get the related image of the cel directly
2014-07-30 01:28:15 -03:00
David Capello b991f3b42e Rename cmd_change_image_type.cpp to cmd_change_pixel_format.cpp 2014-05-03 16:27:11 -03:00