309 Commits

Author SHA1 Message Date
David Capello
11d86bb7c5 Add ability to copy colors using Ctrl + drag & drop 2015-05-09 15:57:46 -03:00
David Capello
62a3594598 Add ability to copy & paste colors with Ctrl+C and Ctrl+V
This commit includes the new doc::PalettePicks class. It's a helper
class to identify which entries are selected in the ColorBar.

We've removed the Copy/Paste buttons from the Palette Editor window.
2015-05-09 12:20:58 -03:00
David Capello
6a9382a975 Add option to reverse colors 2015-05-08 14:28:27 -03:00
David Capello
575e94e559 Add popup menu to sort palette colors 2015-05-08 13:03:06 -03:00
Aurélien Gâteau
2855180dd9 Fix build with g++ 4.9 2015-05-07 22:59:10 +02:00
David Capello
c3d7a96a87 Replace ContextObserver::onActiveDocumentChange() with onActiveSiteChange() 2015-05-05 12:58:50 -03:00
David Capello
b519901cef Add support to specify tags in --filename-format option (related to #607)
Now we can use "{tag}" (or "{innertag}") and "{outertag}" in the filename
format.
2015-04-30 17:02:57 -03:00
David Capello
35e951ec70 Merge branch 'build-fixes' of https://github.com/agateau/aseprite into agateau-build-fixes 2015-04-30 12:03:29 -03:00
David Capello
2932add184 Fix BrushInkProcessing so we can use brushes between different pixel formats 2015-04-29 16:04:57 -03:00
David Capello
c5e79bb940 Optimize CompressedImage to get only bitmap information
When we create a CompressedImage from a Brush image, we want to know what
pixels are != the mask color, just to generate the PointShape (we don't
care the specific color of the scaneline/each pixel, that information is
used in the "ink processing" step).
2015-04-29 15:43:52 -03:00
David Capello
1b25c4e9e9 Add slots in the ContextBar to select brushes with Alt+1, Alt+2, etc.
Now the ContextBar contains a set of brushes. The ChangeBrushCommand
supports a new "slot" parameter and "change" = "custom" to select a
specific custom brush from the ContextBar. Alt+1, Alt+2, etc. are mapped
to this ChangeBrushCommand (see changes in gui.xml).

Also, as the ButtonSet that represent different brushes in the ContextBar
uses icons generated from the brush, we don't need the skin parts that
represent each brush type (we can generate those icons from some standard
brushes). Those skin parts were removed.
2015-04-29 12:32:44 -03:00
David Capello
b08b226aef Move active brush information to ContextBar 2015-04-28 18:21:33 -03:00
Aurélien Gâteau
ad1290b1c8 Fix build of document_api_test.cpp
Compiler could not find notifyActiveDocumentChanged.

/home/aurelien/src/aseprite/src/./doc/test_context.h: In instantiation of ‘void doc::TestContextT<Base>::onRemoveDocument(doc::Document*) [with Base = app::Context]’:
/home/aurelien/src/aseprite/src/app/document_api_tests.cpp:66:1:   required from here
/home/aurelien/src/aseprite/src/./doc/test_context.h:44:58: error: ‘notifyActiveDocumentChanged’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
         notifyActiveDocumentChanged(m_activeDoc = nullptr);
2015-04-27 18:08:21 +02:00
David Capello
96769d061e Rename BrushPattern::ALIGNED_FROM_SRC to ALIGNED_TO_SRC 2015-04-27 11:45:00 -03:00
David Capello
dfeff22b2f Add possibility to create brushes from selection
Changes:
* Add doc::kImageBrushType
* Add doc::BrushPattern enum
* Add pattern and pattern origin properties to doc::Brush
* Add NewBrush and DiscardBrush commands (new Ctrl+B shortcut to create
  brushes)
* Add BrushInkProcessing
2015-04-27 00:08:04 -03:00
David Capello
98cd5056b3 Remove now unused doc::draw_brush() function 2015-04-26 16:29:23 -03:00
David Capello
8382d1ca8f Replace Brush::m_scanline with doc::CompressedImage 2015-04-25 20:01:03 -03:00
David Capello
4a05436252 Replace internal doc::Brush image with a doc::ImageRef 2015-04-25 19:41:07 -03:00
David Capello
9fa26dc2f4 Fix problem saving transparent GIF and PNG files when the background layer is hidden 2015-04-21 13:20:36 -03:00
David Capello
21c4fd51d9 Move app::DocumentLocation to doc::Site
This is a first step to include the current selected range of layers
and frames inside the doc::Site structure. So in the future we'll not need
to know about the Timeline in commands that handle those ranges.
2015-04-20 16:27:09 -03:00
David Capello
43a0279a24 Fix crash converting sprite to grayscale 2015-04-15 13:58:35 -03:00
David Capello
13a977f0e6 Continue loading backup data if we fail loading one image 2015-04-15 12:20:41 -03:00
David Capello
045ece4114 Avoid reading invalid images in doc::read_image() 2015-04-10 11:26:36 -03:00
David Capello
989698dc6a Remove unused variable in doc::read_image() 2015-04-09 13:46:20 -03:00
David Capello
7b2b30564d Compress images in doc::read/write_image() functions 2015-04-09 11:02:26 -03:00
David Capello
a4478e9306 Add UI and logic to recover a backup session
Changes:
* Add DataRecoveryView
* Split SubObjectsIO into an interface and SubObjectsFromSprite
* Add a "setId" parameter to some doc::read_* functions (we need this
  functionality from session recovery)
2015-04-08 20:05:05 -03:00
David Capello
5cf0396d98 Add version to doc::Object to avoid making backups of unmodified objects 2015-04-07 17:53:31 -03:00
David Capello
f9a24096d3 Remove unused local variable in doc::write_layer() 2015-04-07 01:28:27 -03:00
David Capello
22c3c4f20e Remove implicit SharedPtr conversion to T* 2015-04-02 20:42:43 -03:00
David Capello
3d63e0e1b4 Move SharedPtr to base namespace 2015-04-01 12:35:18 -03:00
David Capello
b13601117f Add option to "remap" colors after a drag-and-drop (related to #563) 2015-03-23 12:57:59 -03:00
David Capello
d14e4e8896 Add support to drag-and-drop colors in ColorBar/PaletteView (fix #37) 2015-03-23 12:25:32 -03:00
David Capello
cedab5b553 Add const modifier to Sprite::rgbMap() member function 2015-03-19 18:47:57 -03:00
David Capello
50e9ed6326 Unify "Export Sprite Sheet" command with DocumentExporter 2015-03-17 16:43:51 -03:00
David Capello
b3232311ff Copy frame tags when we duplicate a sprite 2015-03-16 18:21:08 -03:00
Getty
85c569b2f1 Small fixes needed to build on Linux: missing #includes and shadowed templates 2015-03-14 17:28:02 -07:00
David Capello
e6dc94ddb2 Add undo info for FrameTags when frames are added/removed
Also we remove the entire FrameTag when all its frames are removed.
2015-03-12 15:05:20 -03:00
David Capello
cdc9b419c7 Fix crash adding/removing frames in sprites with frame tags 2015-03-11 18:45:35 -03:00
David Capello
a504ba3783 Delete all 'FrameTag's in ~FrameTags 2015-03-10 19:28:21 -03:00
David Capello
6d12deafe6 Use ObjectId to identify FrameTags in the Timeline/frame tags commands 2015-03-10 17:04:55 -03:00
David Capello
7c3e8326e6 Clicking on a tag name shows its properties 2015-03-10 16:25:20 -03:00
David Capello
1f4400b943 Keep FrameTags in order 2015-03-09 15:56:04 -03:00
David Capello
58d302749c Use a FrameTag for the loop section (fix #557)
Changes:
* Paint FrameTags in Timeline with labels
* Add app::ui::FrameTagWindow
* Fix FrameTag::m_aniDir initialization
* Add warning for files that doesn't support frame tags
* Remove document preferences related to the active loop
2015-03-09 13:57:54 -03:00
David Capello
e09cdd67cb Add support to compile with VS2013 x64 2015-03-06 17:01:08 -03:00
David Capello
b23194dfae Fix several warnings in MSVC, clang, and gcc 2015-03-05 15:19:00 -03:00
David Capello
7da6f3e857 Minor changes to some #include header files 2015-03-05 12:40:47 -03:00
David Capello
69d78a0add Add missing std:: so gcc on Linux works just fine (related to #604) 2015-03-04 23:24:01 -03:00
David Capello
2c7fe41d6d Fix minor problems with clang 2015-03-04 22:57:55 -03:00
David Capello
361a3084fd Merge branch 'new-workspace'
Conflicts:
	src/app/commands/cmd_open_file.cpp

Fixes:
	src/app/ui/timeline.cpp
2015-03-04 22:41:34 -03:00
David Capello
ad856b2a55 Use std:: when necessary, and std::numeric_limits instead of INT_MAX 2015-03-04 21:35:11 -03:00