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
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