Commit Graph

3584 Commits

Author SHA1 Message Date
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
David Capello
60a3da7b7c Fix PaletteView::setColumns() to set a correct number of columns for small palettes
If we have a palette with few colors (e.g. just one row of colors), we
would like to setup a columns number equal to the whole available
PaletteView width. This is because when we drag colors, we can drop them
in position that are outside the current palette size.
2015-06-29 12:33:41 -03:00
David Capello
b7122b0ab3 Change label for ColorQuantization 2015-06-29 12:03:20 -03:00
David Capello
1ee0b0413d Fix redrawing problems moving several cels or updating several editors after the move 2015-06-29 11:29:51 -03:00
David Capello
49b3502318 Keep fg/bg color indexes in the palette range 2015-06-29 11:00:46 -03:00
David Capello
34183ba207 Enable reverse frames command only when we have two or more selected frames (fix #711) 2015-06-27 12:17:18 -03:00
David Capello
e6ca8c9463 Use a 1x1 brush for flood fill preview 2015-06-26 16:26:51 -03:00
David Capello
f5d5d495c7 Fix selection ink for union and subtraction modes 2015-06-25 19:40:27 -03:00
David Capello
4b213f3039 Improve selection tools performance
This commit reduce the number of computations needed to calculate the new
mask bounds. (E.g. avoiding get pixel calls in Mask::shrink().)
2015-06-25 17:53:11 -03:00
David Capello
3159acdc5c Reduce the area generated for cmd::CopyRegion when we move a selection 2015-06-25 17:36:14 -03:00
David Capello
4aa56ff703 Improve PixelsMovement performance creating a smaller extra cel 2015-06-25 17:31:27 -03:00
David Capello
adc4050201 Improve PixelsMovement::redrawCurrentMask() performance 2015-06-25 16:51:41 -03:00
David Capello
710e640174 Fix preview of transformations (PixelsMovement) 2015-06-25 14:54:06 -03:00
David Capello
f571e4ceb2 Add BrushPreview class to wrap all code related to brush preview/editor cursor 2015-06-25 12:44:47 -03:00
David Capello
ac82dcdd49 Fix several brush preview problems in Indexed images when fg color = transparent color
Now we don't need to change the extral cel mask color because we use
the new render::ExtraType::PATCH extra cel type.
2015-06-24 16:08:21 -03:00
David Capello
e0d1f77b0f Fix problem with brush preview on layers with opacity < 255 2015-06-24 15:14:11 -03:00
David Capello
b12e6c3398 Add ui::MenuSeparator widget 2015-06-24 13:14:41 -03:00
David Capello
e4df25f4df Merge ui::Widget::m_align with m_flags field
Here we remove Widget::setFlags() member function, as it's not used.
2015-06-24 12:06:33 -03:00
David Capello
e6d22e7e38 Reimplement Box resize algorithm 2015-06-23 22:46:05 -03:00
David Capello
a2538628c7 Convert ui::Widget::border_width/child_spacing to private fields 2015-06-23 19:20:49 -03:00
David Capello
1922a27b38 Make ui::Widget::flags field private 2015-06-23 16:07:41 -03:00
David Capello
7f2cd3b6a9 Rename ui::Widget::min/max_w/h fields to m_min/maxSize and make them private 2015-06-23 15:13:42 -03:00
David Capello
80a62f8ed5 Include config.h in ui/event.cpp 2015-06-23 14:40:54 -03:00
David Capello
325e9245bf Rename ui::Widget::type -> m_type and make it private 2015-06-23 14:37:22 -03:00
David Capello
0517cd1b98 Remove _ji_ prefix in some ui-lib functions 2015-06-23 14:14:06 -03:00
David Capello
f01b816fb5 Remove JI_ prefix from ui/base.h constants 2015-06-23 14:00:00 -03:00
David Capello
66330dc39a Remove unused libart library source code 2015-06-23 12:45:05 -03:00
David Capello
150afe4305 Merge branch 'mouse-callback' 2015-06-23 12:39:45 -03:00