Commit Graph

208 Commits

Author SHA1 Message Date
David Capello
8f8291a39b Hide colorbar and toolbar when we're in Home tab 2015-03-02 14:43:44 -03:00
David Capello
adf3e6c00d Add AniDir as a FrameTag property (it's persisted in .ase files) 2015-02-19 13:05:39 -03:00
David Capello
69ac11eea2 Remove IDocumentSettings and DocumentSettingsObserver
Document user options are completely replaced with DocumentPreferences.
2015-02-15 09:48:38 -03:00
David Capello
8387c7ba3e Fix XML error in pref.xml 2015-02-14 23:20:59 -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
06d18f1e8a Replace doc::FrameNumber with doc::frame_t 2014-12-28 20:39:11 -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
73658399cc Add setting/preference classes/enums generator
Changes:
* Add a class (Option<T>) to get/set/listen changes to one specific
  preference option
* Add data/pref.xml with the metadata to generate types/classes (not it's
  quite easy to add new preferences)
* Modify the generator to support generation of .h and .cpp files of
  preference types
* Add code to migrate old options to new ones (and functions to delete
  old values)
* Only a couple of options were migrated at the moment, it is a WIP, in the
  future we should completely remove ISettings and direct calls
  to set/get_config_*
2014-12-14 20:19:31 -03:00