Commit Graph

25 Commits

Author SHA1 Message Date
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
David Capello 3388eaffde Show onion skinning depending on the configured loop section (fix #555)
There is a new option (per document) to disable this behavior.
2015-05-27 17:42:41 -03:00
David Capello 625aa1ee55 Move onionskin options into render::OnionskinOptions class 2015-05-27 14:49:01 -03:00
David Capello 4e6db14cae Use a PreviewToolLoopImpl to preview the current tool ink/point shape/etc
With this we can see the exact preview in real-time of the the left
click paiting (e.g. using real Indexed composition, ink, point shape, etc.)
We are able to preview blur, eraser, or flood fill preview too (anyway
these are not enabled at this moment).
Changes:
* Add render::ExtraType enum to indicate if the extra cel acts like a
  patch for the current cel (e.g. cursor), or as an extra layer for
  composition (e.g. selection/moving pixels)
* Add ExtraCelType property to app::Document and to render::Render
* Add ToolBox::getPointShapeById()
* As the current cursor preview depends on the current layer, when
  we change the current layer we've to update the Preview editor
  with the new selected layer (now we listen to
  Document:.onAfterLayerChanged())
* Add create_tool_loop_preview() and PreviewToolLoopImpl
2015-04-26 15:59:28 -03:00
David Capello 827eddd459 Fix problem copying background cels in indexed images
Now index 0 is persisted in the copy.
2015-03-16 18:04:57 -03:00
David Capello 6dad428928 Remove unused variables 2015-01-21 11:22:28 -03:00
David Capello 603dde343f Replace doc::LayerImage::getCel() with doc::Layer::cel() 2014-12-28 21:04:08 -03:00
David Capello 06d18f1e8a Replace doc::FrameNumber with doc::frame_t 2014-12-28 20:39:11 -03:00
David Capello da1358c5dc Unify all render code in one library
Changes:
* Create render library (move util/render.cpp to render/render.cpp)
* Move app::Zoom class to render::Zoom
* Remove doc::Image::merge() member function
* Add gfx::Clip helper class (to clip dst/src rectangles before a blit)
* Move doc::composite_image() to render::composite_image()
* Remove doc::Sprite::render()
* Replace Sprite::getPixel() with render::get_sprite_pixel()
* Remove doc::layer_render() function
* Convert DitheringMethod to a enum class
* Add AppRender to configure a render::Render with the app configuration
* Move checked background preferences as document-specific configuration
* Add doc::Sprite::layer() and palette() member functions
* Add doc::Layer::cel() member function
* Add doc::Palette::entry() member function()
* Add doc::frame_t type
* Move create_palette_from_rgb/convert_pixel_format to render library
* ExportSpriteSheet doesn't need a temporary image now that we can specify
  the source rectangle in the render routine
2014-12-28 11:06:11 -03:00