Commit Graph

58 Commits

Author SHA1 Message Date
David Capello 3d57184b56 Render extra/preview cels correctly on linked cels (fix #1664) 2018-02-14 13:29:03 -03:00
David Capello 1b4ffdfbe9 Fix glitch rendering background with colors w/alpha = 0 2017-07-03 19:49:13 -03:00
David Capello cbee0862f3 Add a Color Mode conversion dialog with preview 2017-05-16 17:18:55 -03:00
David Capello cc7bde6cd1 Fix some compiler warnings (implicit casts & unused vars) 2017-04-19 19:26:23 -03:00
David Capello 70f1df4d6b Avoid def variables that aren't used NDEBUG 2017-03-15 15:13:50 -03:00
David Capello 5e711690bf Fix crash with certain reference layers 2017-02-03 15:35:44 -03:00
David Capello 95da8a2441 Fix rendering artifacts when Apply Zoom is disabled and bg grid isn't aligned with pixels (fix #1349) 2016-12-28 12:28:43 -03:00
David Capello 0a68c4626d Fix rendering issues with multiples of 3 zoom factors (fix #1349) 2016-12-28 11:38:28 -03:00
David Capello 08445fbbcb Fix crash resizing reference layers 2016-12-26 13:30:14 -03:00
David Capello dfa90d15c8 Don't use general renderer when "apply zoom" is enabled
Related to #1349
2016-12-16 12:05:54 -03:00
David Capello c3c664874d Fix bug where selection tools don't show active layer
Bug introduced in 26b1a2ebb4
2016-12-07 17:05:31 -03:00
David Capello 26b1a2ebb4 Add option to reduce opacity of non-active layers 2016-12-01 15:20:35 -03:00
David Capello 4e6832782e Fix rendering issues w/ref layers 2016-11-03 12:26:33 -03:00
David Capello bcb775a88b Render reference layers only in the sprite editor 2016-10-26 15:16:22 -03:00
David Capello 1b053de2f2 Fix eyedropper/move tool for reference layers 2016-10-13 19:58:42 -03:00
David Capello bf4d6f1e4e Ask for a file when we add a new reference layer
Also the new reference layer is added centered in the sprite and scaling
it to make it fully visible in the canvas.
2016-10-12 14:41:58 -03:00
David Capello b83eb89ce4 Use old composite code (faster code) when possible
We use the new general image composite code in case that there is a
reference layer or the background grid is so small that we need a
pixel-by-pixel color blending.
2016-10-11 16:43:37 -03:00
David Capello 0068a2024a Improve composite_image_general() performance 2016-10-11 11:27:47 -03:00
David Capello 080e7e3f68 Add subpixel bounds for reference layer cels
Now we can move a reference layer cel in a X,Y position with floating
point coordinates (i.e. in a subpixel position).
2016-10-10 23:42:47 -03:00
David Capello 4a7d601d5d Add composite_image_general() as a generic (slow) image composer 2016-10-05 21:37:53 -03:00
David Capello f838b8787e Merge branch 'beta' into layer-folder 2016-07-07 12:47:42 -03:00
David Capello f2dc76a844 Fix image composition for non square pixel ratio and odd zoom levels
This new composition function is used in sprites with 1:2 or 2:1 pixel
ratios and odd zoom levels < 100% (e.g. 33%)
2016-07-07 12:27:46 -03:00
David Capello fb3873f396 Fix crash in render w/zoom < 100% for pixel ratio 1:2 or 2:1 2016-07-07 12:08:30 -03:00
David Capello 36ffc8d2bd Merge branch 'master' into beta 2016-07-06 15:46:22 -03:00
David Capello d566604205 Fix several bugs applying filters to cels smaller than the sprite bounds
Now if we apply a 3x3 (or bigger) convolution matrix to a cel, the cel
will be expanded to so new pixels are included in the new cel content.
2016-07-01 18:49:58 -03:00
David Capello ca3b72ee08 Merge branch 'beta' into layer-folder 2016-06-30 12:30:21 -03:00
David Capello d84ba2db32 Merge branch 'master' into beta 2016-06-30 12:26:41 -03:00
David Capello 9e6d7632d9 Minor Render improvement
We can return the specific function to composite images depending on the
actual zoom level. In this commit I include a new
composite_image_without_scale() to completely ignore the zoom level when
it's possible.
2016-06-29 10:01:14 -03:00
David Capello 58f8ed6476 Prefer LayerGroup::layers() instead of iterators 2016-06-08 16:46:15 -03:00
David Capello 2f91122c26 Rename layer folder/set -> layer group 2016-06-07 19:38:56 -03:00
David Capello 37209a0f5b Add pixel ratio support to the Editor & Render 2016-05-23 19:22:02 -03:00
David Capello 640025e84b Fix selection UX to show white/black negative for the stroke
With this patch now we can use the selection tool in locked or hidden
layers, because the selection doesn't modify the layers (only the
selection). Also we can use the selection tool on any layer and we'll
always see the feedback stroke/shape/rectangle while we're creating
the new selection.
2016-05-02 18:42:02 -03:00
David Capello 6814136252 render: change blend function to return the result instead of output param 2016-04-27 12:48:30 -03:00
David Capello 5f97e66a8b Include base/base.h on files that use MIN/MID/MAX 2016-03-03 19:18:46 -03:00
David Capello a08352d4b5 Add minor ASSERT() in Render::renderLayer() to check preview image pixel format 2015-08-19 12:53:15 -03:00
David Capello 1cd551554b Fix possible ambiguous condition on Render::renderLayer() 2015-08-18 14:29:17 -03:00
David Capello 1b930d4d42 Draw document's extra cel (brush preview) in the current frame only 2015-08-12 17:24:48 -03:00
David Capello 45219abfec Fix brush preview in transparent layers
This bug was introduced bf54fd26d3
2015-08-11 19:58:39 -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 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 318bc2e2f9 Add alpha channel to palette/color bar/color selector (issue #286) 2015-06-30 17:36:37 -03:00
David Capello fb4b2e76c8 Add layer opacity property (fix #225) 2015-06-14 20:23:49 -03:00
David Capello 21ca87862c Add layer blending modes (fix #318)
- Added doc::BlendMode enum and doc::BlendFunc type
- Renamed LayerImage::getBlendMode() -> blendMode()
- BLEND_MODE_COPY is BlendMode::SRC now
- BLEND_MODE_NORMAL is BlendMode::NORMAL now
- Added app::cmd::SetLayerBlendMode
2015-06-13 21:29:16 -03:00
David Capello 9a6ac48bfa Fix circular dependencies between image_impl.h <-> image_iterator.h
This problem was introduced in d732f5b05f

Now image_iterator.h and image_bits.h use forward declarations. And if
someone want to use the Image implementation, ImageBits, LockImageBits,
ImageIterators, or some function inside primitive_fast.h, they just have
to include image_impl.h file.
2015-06-12 13:56:18 -03:00
David Capello 4d055a7170 Rename gfx::Rect::createIntersect -> createIntersection 2015-06-09 16:22:47 -03:00
David Capello 1eb94d746d Fix red/blue onion skin for Indexed images 2015-06-08 19:58:23 -03:00
David Capello 0a1dfe0633 Merge branch 'onionskin'
Conflicts:
	src/app/ui/editor/play_state.cpp
	src/render/render.cpp
	third_party/gtest
2015-06-05 15:53:15 -03:00
David Capello 557c7854bc Fix random crash using Eyedropper with Alt+click
This was a problem related to uninitialized memory in Render class.
The Render::renderLayer() member function was accessing to an invalid
m_previewImage pointer.
2015-06-05 01:05:35 -03:00