Commit Graph

3611 Commits

Author SHA1 Message Date
David Capello
7281ef1467 Include Allegro flags in PLATFORM_LIBS when the shared version is used 2015-07-13 13:02:34 -03:00
David Capello
e4138fdf69 Fix order of target_link_libraries() for tests
Generic libraries at the end.
2015-07-13 13:01:48 -03:00
David Capello
55f90d8b8b Add target_link_libraries() for sublibraries
With this change we remove some internal variables/lists like sys_libs,
libs3rdparty, etc. And we fix dependencies problems between targets.
2015-07-13 12:16:55 -03:00
David Capello
420b38e426 Fix HSV Alpha slider in Palette Editor when only one entry is selected 2015-07-10 17:37:09 -03:00
David Capello
3dcffc828d Fix crash on Linux with the new mouse callback introduced in PR #709
The callback is called when the unique_display is null, or display
scale is == 0.
2015-07-09 15:08:05 -03:00
David Capello
56fcf76fc7 Fix base/debug.cpp compilation error with gcc 2015-07-09 15:02:24 -03:00
David Capello
65045c0e2c Fix interoperability problem with layer opacity between v1.0 and v1.1
Saving a file with v1.1, loading it with v1.0, and then loading it back
with v1.1 was generating a layer with flag 32 enabled ("layer has opacity
bit") and opacity = 0 (the opacity was overwritten by v1.0, but the flag
was persisted).

Now the "layers have opacity" bit is saved in the file header. This
flag can be used because v1.0 saves it with value = 0.
2015-07-07 12:58:05 -03:00
David Capello
98297de464 Add backward compatibility for color palette in .ase files
With this change we save the new palette chunk when it's necessary, and
the old color2 chunk will be always present only for backward
compatibility. (So we can open a .ase file saved with v1.1 in v1.0.)
2015-07-07 12:18:56 -03:00
David Capello
a344313f7d Minor rename in ase_format.cpp 2015-07-07 12:01:13 -03:00
David Capello
8fd756c32a Add Edit > Shift commands (fix #681) 2015-07-06 18:48:55 -03:00
David Capello
115b5d36f4 Include Aseprite version in crash dump file name 2015-07-06 16:57:30 -03:00
David Capello
9fc7cee782 Fix Tabs text style (TextRule padding) when UI Scaling > 100% 2015-07-06 16:51:03 -03:00
David Capello
17bffc81c3 Fix Ctrl+mouse wheel in ColorBar to modify the size of each color box when UI Scaling > 100% 2015-07-06 16:46:12 -03:00
David Capello
b547960984 Fix ButtonSet::Item preferred size when UI Scaling > 100% (fix #713) 2015-07-06 16:43:28 -03:00
David Capello
8572bb8ffc Fix bug copying layers below the Background layer (fix #716) 2015-07-06 16:22:27 -03:00
David Capello
210d9c7591 Add warning and correct undo information for unsafe remaps in 8-bit images (fix #715) 2015-07-06 16:15:54 -03:00
David Capello
f6bf4e36a8 Fix PaletteView::onPaint() when multiple entries are being dragged 2015-07-06 13:56:53 -03:00
David Capello
a94fbe7fd8 Fix Eraser brush preview problems when the brush size is changed with the slider 2015-07-06 13:38:34 -03:00
David Capello
c6de475556 Add ContextBar::BrushChange signal 2015-07-06 13:05:06 -03:00
David Capello
803d9e7a17 Fix minor glitch with Eraser brush preview when Timeline is switched with Tab key 2015-07-06 12:05:24 -03:00
David Capello
e0ad704af1 Remove unused Editor member functions 2015-07-06 11:16:25 -03:00
David Capello
204e2a28b7 Fix problem with brush preview after using a drawing tool 2015-07-06 11:05:49 -03:00
David Capello
8923e04a33 Change format to save default palette from .gpl to .ase
In this way the default palette can contain colors with alpha channel.
Also, we migrate the old .gpl to .ase format, removing extra black entries
in the default palette (the old format contains 256 colors, and now we
can handle less colors).
2015-07-06 10:59:44 -03:00
David Capello
32785562dd Show new palette size feedback in StatusBar when we drag-and-drop colors 2015-07-05 19:41:11 -03:00
David Capello
b085fee918 Improve drag-and-drop in ColorBar/PaletteView widget 2015-07-04 19:11:50 -03:00
David Capello
be70c1645b Minor change in initBestfit() and Palette::findBestfit() 2015-07-03 14:35:01 -03:00
David Capello
66168d6b06 Change RgbMap behavior to act like a cache of Palette::findBestfit() calls
Instead of calling findBestfit() for all RGBA colors in
RgbMap::regenerate(), we mark all entries as invalid, and then we
validate them only when the user require one specific entry from
RgbMap::mapColor(). With this we avoid a lot of unnecessary computations
each time the palette changes.
2015-07-03 14:34:54 -03:00
David Capello
48a1af7342 Revert "Make Manager::freeMouse() to select a new visible widget"
This reverts commit 3accd85662.
2015-07-03 13:43:05 -03:00
David Capello
17e1c22a65 Hide brush angle when it's not necessary 2015-07-03 13:41:50 -03:00
David Capello
6d6894c48e Fix color_tests 2015-07-03 12:44:59 -03:00
David Capello
48541af433 Merge branch 'palette-with-alpha' 2015-07-02 18:16:04 -03:00
David Capello
be6779631b Modify eyedropper tool to pick colors with alpha and support several modes
Issue #286
2015-07-02 18:13:47 -03:00
David Capello
d80b984f00 Adjust default ink to be more pixel-art friendly (just replace RGBA values)
Now that we have alpha channel in color selector and palette entries, it's
nice to have as a default ink a more pixel-art friendly, i.e.
an ink that just replace RGBA values instead of doing alpha compositing.

Issue #286
2015-07-02 13:16:06 -03:00
David Capello
e9308c2d35 Add alpha channel in quantization (related to #286) 2015-07-02 11:18:43 -03:00
David Capello
a35828d3eb Fix ChangeColorCommand to select colors only inside palette range (fix #714) 2015-07-02 10:33:51 -03:00
David Capello
372d604d93 Add support for alpha channel in RgbMap and Palette::findBestfit()
This include several changes:
- Color::getIndex() can return palette values with alpha != 255
- Fix Transparent and Blurs ink for indexed images to make better use
  of palette entries with alpha values
- Fix bilinear resize algorithm for indexed images with alpha
- New RgbMap with four parameters: R, G, B, A
- Add one extra color scale function used in the alpha channel of the
  new RgbMap
- Fix color curve, convolution matrix, invert color, and median filters
  to take care of this new alpha channel on indexed images
- Fix ordered dithering and quantization

Related to #286
2015-07-01 21:33:30 -03:00
David Capello
8f24c05451 Fix indexed -> RGB/grayscale conversion when palette colors have alpha 2015-06-30 21:25:27 -03:00
David Capello
c856faee3e Add support to load/save smaller palettes in png files 2015-06-30 18:16:10 -03:00
David Capello
8f62baedb3 Add support for 8-bit png files with alpha channel 2015-06-30 18:08:14 -03:00
David Capello
6796e9f9be Check for palette with alpha channel when we save 2015-06-30 17:41:25 -03:00
David Capello
318bc2e2f9 Add alpha channel to palette/color bar/color selector (issue #286) 2015-06-30 17:36:37 -03:00
David Capello
b54a9d85bf Add required <climits> header file in cmd_palette_size.cpp 2015-06-30 16:29:29 -03:00
David Capello
78918c0df8 Improve ColorQuantization UI to select the # of colors for the new palette 2015-06-30 15:25:23 -03:00
David Capello
26d09efc0d Avoid creating a cmd::SetPalette() when the palette size isn't modified 2015-06-30 15:05:49 -03:00
David Capello
7a63476a98 Add support to save .ase files with more than 256 palette color entries
We've added a new chunk type in .ase files to save palettes with alpha
channel, color name, and palettes with more than 256 colors.

Related to #668, #467, and #286
2015-06-30 13:34:55 -03:00
David Capello
a12816c04e Add command to change the palette size manually with a number 2015-06-30 12:21:41 -03:00
David Capello
3accd85662 Make Manager::freeMouse() to select a new visible widget
In this way we generate a SetCursor message when a widget is hidden.
2015-06-29 15:46:08 -03:00
David Capello
0b0cb56c1e Replace some UI_FOREACH_WIDGET() with range-based for loops 2015-06-29 15:42:34 -03:00
David Capello
8f66e75cb0 Don't change the hand cursor for StyledButton if the widget is disabled 2015-06-29 15:18:20 -03:00
David Capello
269ff609b7 Move warning icons from ColorSelector to ColorBar 2015-06-29 15:17:52 -03:00