Commit Graph

3204 Commits

Author SHA1 Message Date
blackmiaool
00b45c3bd7 Fix crash using NewBrush when Home tab is selected 2015-05-04 22:38:15 +08:00
David Capello
9bf11e0b40 Merge pull request #648 from blackmiaool/patch-2
Show checkbox in View > Timeline menu item when the Timeline is visible
2015-05-02 10:35:33 -03:00
blackmiaool
ffab635acd add override
add onChecked() function to Timeline command
2015-05-02 20:51:49 +08:00
blackmiaool
e646ee7047 add onChecked() function to Timeline command 2015-05-02 17:28:22 +08:00
David Capello
20120f432a Fix crash trying to move an empty cel with Move tool 2015-04-30 17:26:46 -03:00
David Capello
91bacca270 Fix bug introduced in a2cbf3f285: trim transparent layers correctly 2015-04-30 17:04:11 -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
c81aa88fc7 Add --format option to specify JSON array format (fix #641) 2015-04-30 12:33:32 -03:00
David Capello
90dd876654 Merge branch 'agateau-build-fixes' 2015-04-30 12:30:52 -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
88a0e8c806 Merge branch 'brush' 2015-04-30 12:00:49 -03:00
David Capello
f1d522f548 Replace brush slots until the user presses the shortcut
We replace brush slots until the user presses its keyboard shortcut, which
means he is interested in reusing the brush. In this way, if we want to
keep a brush, we can press Ctrl+B, select the brush area, and then Alt+1
to keep the first brush, then the next brush slot will be used/replaced
until Alt+2 is pressed, etc.
2015-04-30 11:59:47 -03:00
David Capello
03faee9ce4 Add option to delete all brushes 2015-04-29 17:26:25 -03:00
David Capello
733d0a8e74 Minor fix in ButtonSet 2015-04-29 17:16:48 -03:00
David Capello
562df34f40 Show brushes in a ButtonSet with 3 columns 2015-04-29 17:16:43 -03:00
David Capello
f5b7fd84dc Connect to BrushPopup::BrushChange just one time 2015-04-29 16:34:21 -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
57156bddb7 Remove unused param 2015-04-29 15:00:17 -03:00
David Capello
edbff42dc8 We can delete brushes right-clicking them and selecting "Delete" 2015-04-29 15:00:05 -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
David Capello
303bd120dc Keep one instance of BrushPopup in memory 2015-04-28 12:53:02 -03:00
David Capello
058682bcaa Avoid creating consecutive SelectBoxStates with Ctrl+B
If we press several times Ctrl+B, we could create several SelectBoxStates,
and as it backs to the previous state, it's like we will select several
brushes instead of backing to the original state.
2015-04-28 12:46:50 -03:00
David Capello
f09db4d9aa Add new BrushPopup (now the image brush is previewed)
This is the first step to create a bigger BrushPopup to select brushes
from an history of brushes. The general idea is to use Alt+1, Alt+2, etc.
to select different brushes from a stock.

Also the "discard brush" was removed. As the brush can be discarded
changing the brush type.
2015-04-28 12:38:15 -03:00
David Capello
274b903aad We can cancel the selection of the brush using the other mouse button 2015-04-27 15:28:17 -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
8f500178fc Creating a brush with right-click clear the selected region with bg color (#154) 2015-04-27 13:03:02 -03:00
Aurélien Gâteau
db8f0e1f0d Fix aseprite binary link error
Was getting this when linking aseprite:

check_update.cpp:113: undefined reference to
net::HttpHeaders::setHeader(std::string const&, std::string const&)
2015-04-27 17:59:42 +02:00
David Capello
73fa7b2107 Define CURL_STATICLIB if we don't use libcurl shared version (might be related to #640)
This problem was introduced in d7bf504887
2015-04-27 12:23:54 -03:00
David Capello
51b6def023 Remove the "New Brush" button from the ContextBar 2015-04-27 12:07:23 -03:00
David Capello
955383f91a Add xor-ed bounding box in SelectBoxState when QUICKBOX style is enabled
This is useful when we want to select a brush in a black image (the
DARKOUTSIDE style is not useful in this case).
2015-04-27 12:03:18 -03:00
David Capello
96769d061e Rename BrushPattern::ALIGNED_FROM_SRC to ALIGNED_TO_SRC 2015-04-27 11:45:00 -03:00
David Capello
d9fb81e5d1 Now we can create brushes selecting the box directly (fix #154) 2015-04-27 11:31:48 -03:00
David Capello
215f594273 Minor renames in SelectBoxState 2015-04-27 10:19:53 -03:00
David Capello
be946ceab1 Minor change in cursor.cpp 2015-04-27 10:08:58 -03:00
David Capello
ceb469339d Draw transformation handles only in active editor (fix #82, fix #632) 2015-04-27 10:08:48 -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
4e6db14cae Use a PreviewToolLoopImpl to preview the current tool ink/point shape/etc
With this we can see the exact preview in real-time of the the left
click paiting (e.g. using real Indexed composition, ink, point shape, etc.)
We are able to preview blur, eraser, or flood fill preview too (anyway
these are not enabled at this moment).
Changes:
* Add render::ExtraType enum to indicate if the extra cel acts like a
  patch for the current cel (e.g. cursor), or as an extra layer for
  composition (e.g. selection/moving pixels)
* Add ExtraCelType property to app::Document and to render::Render
* Add ToolBox::getPointShapeById()
* As the current cursor preview depends on the current layer, when
  we change the current layer we've to update the Preview editor
  with the new selected layer (now we listen to
  Document:.onAfterLayerChanged())
* Add create_tool_loop_preview() and PreviewToolLoopImpl
2015-04-26 15:59:28 -03:00
David Capello
ae63d52027 Prepare sub point shape in SprayPointShape 2015-04-26 01:32:06 -03:00
David Capello
91eb3eecd4 Fix usage of CompressedImage scanelines width in BrushPointShape::transformPoint() 2015-04-25 21:36:33 -03:00
David Capello
bca87067eb Minor format changes in point_shapes.h 2015-04-25 20:03:25 -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
3810cfc1fa Minor fix calling Alert::show() in ColorSelector:onFixWarningClick() 2015-04-25 16:52:14 -03:00
David Capello
eb60a4c3e7 Tabs: disable mouse wheel when we are dragging tabs 2015-04-24 19:29:57 -03:00
David Capello
c63ccf914f Keep last update information so we can show it again (fix #639)
Now the last update information retrieved from the HTTP request, is saved
in the configuration file so we can reuse it when the program is restarted.
Changes:
* Add support to compare two semvers
* Add new_version/new_url options to preferences
* Remove convert_to for base::Version (now this class is constructed from
  strings only)
2015-04-24 12:45:01 -03:00
David Capello
7e52e6d882 Use Preferences class to save the updater information 2015-04-23 19:51:53 -03:00
David Capello
d7bf504887 Fix flags to always compile with libcurl (as HomeView needs net-lib to load news) 2015-04-23 19:14:13 -03:00