Commit Graph

189 Commits

Author SHA1 Message Date
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
David Capello
9b32ebdad6 Rename Undo class to UndoHistory. 2011-03-13 17:33:42 -03:00
David Capello
0401f4abd4 Remove gui/base.h from sprite.cpp 2011-03-08 15:23:29 -03:00
David Capello
2baa342a65 Remove "j" prefix from some files in gui library. 2011-01-30 19:12:10 -03:00
David Capello
18db7513a8 Open new sprites in the center of the current sprite. 2011-01-23 21:15:00 -03:00
David Capello
36e605bdf2 Move jmalloc/jfree to base/ library as base_malloc/free (remove new/new0/renew macros). 2011-01-23 19:19:18 -03:00
David Capello
e6c2fdd6ed Move pen_type.h to raster directory. 2011-01-21 17:16:21 -03:00
David Capello
45855b88d3 Move "AseException" to "base::Exception" class.
+ Created XmlException for tinyxml parsing errors.
+ Moved functionality of AseException::show() to Console::showException().
2011-01-20 23:33:57 -03:00
David Capello
bf395fca61 More updates for copyright year to 2011. 2011-01-20 18:32:31 -03:00
David Capello
e914c9ad6a Rename ase_exception to AseException. 2011-01-20 18:03:11 -03:00
David Capello
e9bc81cc1d Add transparent color index in sprite and .ase files (it does not work in render operation yet). 2011-01-20 17:17:35 -03:00
David Capello
d6eb20ef7e Update copyright year to 2011. 2011-01-18 20:49:53 -03:00
David Capello
53896f9bfb Avoid to create an optimized palette for RGB images if the same loading process creates one.
+ Added Palette:isBlack member function.
2011-01-18 19:30:42 -03:00
David Capello
b82ec86994 Fix bug in SpriteImpl::resetPalettes() using an invalid "end" iterator after erasing an element from the m_palettes collection. 2011-01-18 19:22:03 -03:00
David Capello
9fa71e5299 Convert FileFormat to a C++ class. 2011-01-16 17:27:18 -03:00
David Capello
68a8907ffc Fix convert_imgtype from Indexed to RGB when the first palette entry is not black (is not transparent color). 2011-01-14 18:29:25 -03:00
David Capello
864d13fb40 Add accurate color quantization or use median cut if the sprite has more than 256 colors.
+ Implemented issue #3 - Accurate Sprite Quantize.
+ Remove Ben Davis code to quantize color palette (to avoid license problems).
2011-01-14 18:22:23 -03:00
David Capello
bc753c5bc1 Fix Palette:countDiff() bug when "to" must be equal to max-1. 2011-01-05 20:11:58 -03:00
David Capello
6a64fa311f Remove unnecessaries #include <allegro/...> in raster/. 2010-12-26 18:35:12 -03:00
David Capello
d301fc7530 Replace images_ref functions (src/effect) with ImagesCollector class (src/raster). 2010-12-26 17:03:35 -03:00
David Capello
4c8c7463ed Move functions related to quantization and dithering algorithms to raster/quantization.h|cpp. 2010-12-26 10:57:03 -03:00
David Capello
b600706e37 Remove duplicated getters in sprite (const/non-const). 2010-12-12 12:10:46 -03:00
David Capello
d4caa65cae Use gfx::Rgb and gfx::Hsv classes for HSV <-> RGB conversions.
+ Removed rgb_to_hsv_int() and hsv_to_rgb_int() functions.
+ Changed HSV ranges from [0,255] to H=[0,360], S=[0,100], V=[0,100].
+ Simplified Color class (src/app/color.h) using a m_type and m_value union.
2010-12-08 11:35:08 -03:00
David Capello
7ace9a2099 Remove blend modes from ImageLayers. 2010-12-05 11:44:01 -03:00
David Capello
ac36822222 Add undo support for palette changes.
+ Added Undo::undo_set_palette_colors() method.
2010-12-01 23:41:20 -03:00
David Capello
581134c303 Remove path_new/free functions. 2010-11-06 20:40:54 -03:00
David Capello
1283c9d950 Replace Path's name from char* to std::string. 2010-11-06 20:40:03 -03:00
David Capello
18b0f903d7 Pen now uses a std::vector<PenScanline> instead of a raw pointer to PenScanline[] array. 2010-11-06 20:31:30 -03:00
David Capello
982a171995 Save the mask_color field in the undo raw image data. 2010-11-06 19:10:00 -03:00
David Capello
97f04c7a79 Copy the mask_color in image_crop() function. 2010-11-06 19:09:29 -03:00
David Capello
c1598c01e6 Fix dirty for RGB and grayscale images (bug introduced in commit 4c5a0177cc). 2010-10-26 18:14:25 -03:00
David Capello
623c1066bd Avoid asserting leak of GfxObjs when MEMLEAK is defined. 2010-10-12 10:21:17 -03:00
David Capello
4c5a0177cc Convert Dirty to a class.
Remove all deprecated code of Dirty class that was not being used because the new ASE 0.8 tools implementation.
Remove pointers to an Image/Mask from Dirty class.
2010-10-11 14:57:04 -03:00
David Capello
9f58d0378a Remove algo_dirty() and old 00dirty.cpp test/example. 2010-10-10 21:19:56 -03:00
David Capello
5b93db64ba Add imgtype_shift() and imgtype_line_size(). 2010-10-10 21:17:59 -03:00
David Capello
7f14c8e287 Move GfxObjId type to gfxobj_id.h file. 2010-10-10 18:56:59 -03:00
David Capello
f85070c1c6 Add Dirty::getMemSize() method. 2010-10-09 14:15:11 -03:00
David Capello
072b19a9bb Add a comment in Undo::updateUndo() about the usage of get_config_int() function. 2010-10-03 17:08:06 -03:00
David Capello
7dd78886e2 Remove unnecessary #include <string.h> in undo.h 2010-10-03 15:52:33 -03:00
David Capello
514d666747 Add virtual method getMemSize() to GfxObj class (overriden by Image, Cel, Layer, etc.).
These methods will be used for a new implementation of Undo.
2010-10-03 15:51:03 -03:00
David Capello
070be38e81 Remove "state" arg from UndoAction::invert() function. 2010-10-03 15:24:53 -03:00
David Capello
03c5d0030a Convert UndoStream in a class. 2010-10-03 15:19:18 -03:00
David Capello
6f50c62ace Rename undo_exception to UndoException. 2010-10-03 14:52:50 -03:00
David Capello
911fe71c0e Fix bug introduced in commit e885fcd3a1: leave one palette after Sprite::resetPalettes(). 2010-10-02 22:58:50 -03:00
David Capello
ffd0f17879 Move all undo_*() functions as members of Undo class. 2010-09-30 23:55:35 -03:00
David Capello
9e419c418f Refactor Stock class to contains methods instead of stock_*() functions. 2010-09-30 22:38:26 -03:00
David Capello
2f8d9a0d1a Remove JList from UndoStream class. 2010-09-30 22:18:30 -03:00
David Capello
e885fcd3a1 Remove JLists from Sprite class. 2010-09-30 21:38:01 -03:00
David Capello
3d5fd0f07c Remove Vaca source code completely (replace NonCopyable class with DISABLE_COPYING macro). 2010-09-29 17:50:46 -03:00