Commit Graph

30 Commits

Author SHA1 Message Date
David Capello 919e892748 Add LayerIndex and SpritePosition types. 2012-08-23 21:32:55 -03:00
David Capello cae19827f5 Add DocumentEvent class so all DocumentObserver's member functions receive one parameter. 2012-08-18 23:45:37 -03:00
David Capello 85f7bf8ba8 Rename Layer::add/remove/move_layer member functions to add/remove/stackLayer. 2012-08-18 22:21:42 -03:00
David Capello acc13e9385 Add DocumentObserver and now the Document is an Observable class. 2012-08-18 17:50:36 -03:00
David Capello 846fbff4a7 Fix compilation errors in GCC. 2012-07-09 17:36:45 -03:00
David Capello c3030b9daa Add FrameNumber type. 2012-07-08 21:09:09 -03:00
David Capello 594a272c06 Add DocumentUndo to avoid app specific data in the undo library.
The UndoHistory was simplified, m_enabled/label/modification members
were removed because they aren't part of the undo library goal.
Now the "label" field is part of Open/CloseGroup undoers, and all undoers
must be enclosed in a group (this restriction is only for the app, the
undo library doesn't have this restriction). In this way, the
label/modification information is exchanged between an
OpenGroup <-> CloseGroup pair only.
2012-07-08 01:25:26 -03:00
David Capello 160bf5ba0a Change Undoer::getMemSize() to return size_t instead of int and added UndoConfigProvider.
UndoConfigProvider is useful to avoid a direct dependency of undo
library with Allegro.
2012-07-07 16:57:07 -03:00
David Capello 3bbf7af991 Rename layer_new_flatten_copy() to create_flatten_layer_copy() and moved to src/flatten.cpp file. 2012-06-08 21:34:53 -03:00
David Capello 041140f528 Change "imgtype" int type to PixelFormat enumeration. 2012-02-12 23:21:06 -03:00
David Capello 1345919aaa Replace image_new* functions with Image:create*() member functions. 2012-02-11 22:57:21 -03:00
David Capello e018cf099d Conert all mask_* functions to Mask function members. 2012-01-08 22:34:36 -03:00
David Capello b8fbaad7fb Replace Allegro Sprite Editor or ASE with ASEPRITE in all files. 2012-01-06 01:12:57 -03:00
David Capello 02a9d50524 Update copyright year to 2012. 2012-01-06 00:52:11 -03:00
David Capello ed6090bc36 Convert all newline to LF style and remove all tabs.
This was done to avoid mixed files (CRLF & LF) in the repository.
2012-01-05 19:45:03 -03:00
David Capello 07edcdb1e2 Add transformation support (scale/rotate) to the selected area.
+ Added support to rotate images of IMAGE_BITMAP type.
+ Added transformation_handle & pivot_handle parts in sheet.png.
+ Added rotation cursors in sheet.png.
+ Added gfx::Transformation class and Document::m_transformation field.
+ Added StandbyState::Decorator and TransformHandles class to draw
  transformation handles.
+ Modified PixelsMovement class to support transformation handles.
+ Added new Linear Algebra library with Vector2d class.
2012-01-01 23:08:25 -03:00
David Capello c32551db64 Fix issue #9: GIF files are loaded as Indexed images now.
+ Added support for non-zero transparent index.
+ Added fop_post_load() to do post-load processing which need user-interaction.
+ Added FileFormat::onPostLoad/onDestroyData members.
+ Added Document::addSprite().
2011-06-25 17:12:08 -03:00
David Capello dc58651f79 Remove UndoHistory::undo_* member functions to use Undoers directly
and to avoid undo-lib <-> undoers circular dependency.
2011-03-30 18:27:52 -07:00
David Capello 236ee6bb7b Implement duplicate sprite with all layers (it was removed
temporally with the introduction of Document class).
2011-03-28 23:31:16 -03:00
David Capello 4aa039d40b Fix reversed logic in Document::duplicate(). 2011-03-28 23:20:03 -03:00
David Capello a17c767e65 Remove all public fields of Cel adding accessors. 2011-03-28 00:24:27 -03:00
David Capello 9077ab8357 Implement duplicate sprite with flatten layers (it was removed
temporally with the introduction of Document class).
2011-03-27 23:21:22 -03:00
David Capello 92266b2a68 Implement duplicate layer (it was removed temporally with the introduction
of Document class).
2011-03-27 22:08:19 -03:00
David Capello a21d15b4ef Improve Document::lock() with an enum as parameter instead of a bool. 2011-03-27 00:15:08 -03:00
David Capello 8e5c950df8 Refactored the entire Undo system in several layers.
+ Added "undo" library (undo namespace).
+ Moved UndoHistory to undo namespace.
+ Added Undoer and UndoersCollector interfaces.
+ Converted old UndoStream to UndoersStack class.
+ Added new "undoers" namespace and moved each Undoer implementation
  (classes to undo different actions) to "undoers" directory.
+ Added IO operations to "raster" objects (image, cel, layer, palette,
  mask).
2011-03-26 17:40:55 -03:00
David Capello f816425d5d Add ObjectsContainer interface in src/undo/ so UndoHistory has a way to
obtain any kind of objects (not just GfxObj).
+ Removed GfxObjId.
+ Added ObjectsContainerImpl.
+ Use UniquePtr for each member in Document to avoid memory leaks in
  Document() ctor.
+ Removed RasterModule class.
2011-03-24 18:03:38 -03:00
David Capello a2e0f32987 No more pimpl idiom for Sprite class (because the biggest dependencies
are now part of Document class).
2011-03-24 13:06:40 -03:00
David Capello 9182f0f14a Move UndoHistory from raster/ to undo/ directory. 2011-03-24 11:50:00 -03:00
David Capello 0b495085cc Move the active mask from Sprite class to Document.
+ Removed masks and paths repositories.
+ Added Document::isMaskVisible and Document::setMaskVisible methods.
2011-03-23 00:06:43 -03:00
David Capello 6e60d3200d Add Document class, to remove app specific properties from Sprite.
+ Moved some properties from Sprite to Document: lock/unlock/mutex,
  filename, isModified flag, undo history, mask boundaries, file
  format options, preferred editor settings, extra cel.
+ A Context now has an active document (instead of an active sprite).
+ Renamed all sprite wrappers to be document wrappers (as the mutex is
  in the Document now).
+ Modifications to SharedPtr<> to be more like C++0x shared_ptr<>.
2011-03-22 21:11:25 -03:00