Commit Graph

3681 Commits

Author SHA1 Message Date
David Capello
43a3ee8bce Fix brush preview flicker 2015-07-31 16:18:53 -03:00
David Capello
1b217f257c Add missing src/render/onionskin_position.h file 2015-07-31 16:07:24 -03:00
David Capello
bf54fd26d3 Add option to put the onion skin behind the sprite
Fix #526 and fix #412
2015-07-31 15:55:06 -03:00
David Capello
80b47419fd Add an option to onionskin the current layer only (related to #526) 2015-07-31 14:30:11 -03:00
David Capello
cc90c3e6f4 Fix remapping decoded gif files to the global colormap when mask != 0 2015-07-31 13:32:23 -03:00
David Capello
3d70c0193d Don't duplicate global colormap as local colormap in GifEncoder 2015-07-31 12:49:04 -03:00
David Capello
40c0ef2d48 Don't use global colormap if the used sprite palette is bigger
This can happen when if an extra copy of the bg/transparent color was
added to the palette.
2015-07-31 12:27:57 -03:00
David Capello
a9097c3a1a Fix adding a copy of bg/transpart color for some special .gif files 2015-07-31 12:26:23 -03:00
David Capello
271750129c Fix new possible crash in GifDecoder::getFrameColormap() 2015-07-31 12:25:33 -03:00
David Capello
a6c24ac768 Create an optimized palette if GifDecoder generates a RGB image with more than 256 colors 2015-07-31 11:06:26 -03:00
David Capello
cd1ca4c68f Try to use the global colormap in GifDecoder when possible 2015-07-31 10:53:51 -03:00
David Capello
792502fc7b Remove invalid ASSERT() from PngFormat::onSave()
The assert can fail if we try to save an indexed image which contain
more than 256 colors.
2015-07-30 18:49:35 -03:00
David Capello
fba9213c9c Fix bug saving invalid .gif files when we use an indexed image with more than 256 colors 2015-07-30 18:46:56 -03:00
David Capello
4a1356cf78 Fix crash when the gif decoder cannot create the sprite 2015-07-30 17:12:53 -03:00
David Capello
32b12d17da Fix visual artifacts on Windows when the window is resized
Now when the user resizes the OS window (a she::Display), it generates
a kDisplayResize she::Event, and this is processed by the UI layer to
redraw the entire ui::Manager.

With this change we remove the obscure "bool" return value in
she::Display::flip() member function.
2015-07-30 16:15:21 -03:00
David Capello
f2d5242ff3 Redraw the entire ui::Manager after resizing
Regression introduced in dd94925cf7
2015-07-30 10:34:39 -03:00
David Capello
dd94925cf7 Move display flip logic to ui library (ui::Manager class) 2015-07-29 18:12:35 -03:00
David Capello
46fa7e18cf Remove MovingPixelsState as an Editor observer when the editor is destroyed 2015-07-29 16:48:34 -03:00
David Capello
7cfdf76b0e Add rotation pivot options in context bar (fix #370)
With these options we can configure to show the pivot and the default
location when we select a sprite area.
2015-07-29 16:35:34 -03:00
David Capello
9ca83e2624 Add support to include any kind of widget inside a Menu 2015-07-29 12:32:01 -03:00
David Capello
de3d408581 Unhighlight menu items when the mouse leaves them 2015-07-29 11:42:57 -03:00
David Capello
45b9df78d6 Fix compilation error on clang and gcc 2015-07-28 18:04:31 -03:00
David Capello
1b4ff37112 Simplify remap between old -> new palette
Now the remap is calculated from the old palette to the new palette when
the "Remap" button is pressed. In this way we can remap after loading
a new palette (fix #737), or after generating an optimized palette, or
changing colors (fix #563).
2015-07-28 17:16:32 -03:00
David Capello
056e365cc3 Use a PopupWindow instead of a TipWindow for SnapToGridWindow 2015-07-28 14:55:40 -03:00
David Capello
694b1c8da6 Rename blit_valid_rgn parameter to blitValidRegion 2015-07-28 14:48:19 -03:00
David Capello
a7ea0f7ec5 Add "Snap to Grid" indicator when it's enabled (fix #122) 2015-07-28 13:05:59 -03:00
David Capello
9e5ccbcca9 Remove StatusBar color names in status_bar.cpp 2015-07-28 12:25:15 -03:00
David Capello
0898d685c2 Fix minor UI bug in the initial ContextBar::TransparentColorField state 2015-07-28 11:14:12 -03:00
David Capello
58db0fba09 Fix bug clearing an Image with color=0 in rotsprite
Introduced in commit 35229e99a6
2015-07-28 11:06:35 -03:00
David Capello
8e2feb31bd Implement LockAlphaInkProcessing for indexed images 2015-07-28 10:45:35 -03:00
David Capello
bee6baf812 Select faster ink (INK_COPY) when we use an opaque color and opacity = 255 2015-07-28 10:31:09 -03:00
David Capello
88c4cd8d87 Don't show brush boundaries when the brush & zoom are too small
We can use the CROSS brush preview type instead of BRUSH_BOUNDARIES
2015-07-28 10:21:33 -03:00
David Capello
a1dcb05a99 Add support to copy cels from Indexed <-> Indexed with different palettes 2015-07-27 13:31:19 -03:00
David Capello
bdbffc8e6c Fix bug copying cels from Indexed to RGB sprites 2015-07-27 13:08:25 -03:00
David Capello
8f891a4e25 Add asserts to detect bugs adding cels w/pixel format != sprite's pixel format 2015-07-27 12:40:02 -03:00
David Capello
5a5579973c Add missing palette parameter to render::composite_image()
This is needed when we copy a cel (or cel range) from an Indexed image
to an RGB image.
2015-07-27 12:24:54 -03:00
David Capello
41bb23f1f1 Change opaque/transparent selection by default depending on the layer 2015-07-27 11:43:48 -03:00
David Capello
bc29cd4bc5 Set alpha compositing as default
And "replace pixel" and "set alpha" were merged into "copy color" ink.
2015-07-27 11:24:00 -03:00
David Capello
940dd5f45c Fix alpha compositing on background layer using colors with alpha < 255 2015-07-27 10:53:02 -03:00
David Capello
0f38a7dace Don't use the ColorBar bg color when Background is visible in Flatten 2015-07-27 08:34:05 -03:00
David Capello
64ae80f0d3 Remove some TODO items 2015-07-27 08:21:51 -03:00
David Capello
02d0d7203a Show background layer after Flatten command 2015-07-27 08:20:15 -03:00
David Capello
ea09ada11b Add custom clipboard format on Win32 to copy/paste image+mask+palette 2015-07-26 19:07:51 -03:00
David Capello
c5f898e6a7 Fix compilation error resolving doc::color_t type in gcc and clang 2015-07-23 22:52:49 -03:00
David Capello
35229e99a6 Add opaque/transparent mode in context bar for transformations (fix #546)
With this change now we add a "mask" image/parameter in rotation
functions. In this way we can identify which specific pixels are
inside the original mask/selection, and in opaque mode we can
include/scale/rotate all those pixels inside the mask, whatever
value they are, even if they are the mask color.

Fixes #730
2015-07-23 22:42:14 -03:00
David Capello
ba4c34a70f Add options to sort the palette by RGBA channels 2015-07-23 11:13:43 -03:00
David Capello
6aeee0b8fa Show opacity when brush is an image (ignoring the ink type) 2015-07-23 10:43:16 -03:00
David Capello
66ddc62a76 Add an option to share ink/opacity parameters between all tools 2015-07-23 10:07:07 -03:00
David Capello
692a4cf009 Include layer opacity on merge down command 2015-07-23 09:19:08 -03:00
David Capello
ce7c34bb72 Avoid 32-bit integer overflow in median cut algorithm (fix #727)
This fixes a problem generating invalid RGBA entries for an optimized
palette. (E.g. Generating non-opaque pixels when we feed the algorithm
only with opaque pixels.)
2015-07-23 09:05:48 -03:00