1 | // Aseprite |
2 | // Copyright (C) 2022 Igara Studio S.A. |
3 | // |
4 | // This program is distributed under the terms of |
5 | // the End-User License Agreement for Aseprite. |
6 | |
7 | #ifdef HAVE_CONFIG_H |
8 | #include "config.h" |
9 | #endif |
10 | |
11 | #include "app/render/simple_renderer.h" |
12 | |
13 | namespace app { |
14 | |
15 | void SimpleRenderer::setRefLayersVisiblity(const bool visible) |
16 | { |
17 | m_render.setRefLayersVisiblity(visible); |
18 | } |
19 | |
20 | void SimpleRenderer::setNonactiveLayersOpacity(const int opacity) |
21 | { |
22 | m_render.setNonactiveLayersOpacity(opacity); |
23 | } |
24 | |
25 | void SimpleRenderer::setNewBlendMethod(const bool newBlend) |
26 | { |
27 | m_render.setNewBlend(newBlend); |
28 | } |
29 | |
30 | void SimpleRenderer::setBgOptions(const render::BgOptions& bg) |
31 | { |
32 | m_render.setBgOptions(bg); |
33 | } |
34 | |
35 | void SimpleRenderer::setProjection(const render::Projection& projection) |
36 | { |
37 | m_render.setProjection(projection); |
38 | } |
39 | |
40 | void SimpleRenderer::setSelectedLayer(const doc::Layer* layer) |
41 | { |
42 | m_render.setSelectedLayer(layer); |
43 | } |
44 | |
45 | void SimpleRenderer::setPreviewImage(const doc::Layer* layer, |
46 | const doc::frame_t frame, |
47 | const doc::Image* image, |
48 | const doc::Tileset* tileset, |
49 | const gfx::Point& pos, |
50 | const doc::BlendMode blendMode) |
51 | { |
52 | m_render.setPreviewImage(layer, frame, image, tileset, |
53 | pos, blendMode); |
54 | } |
55 | |
56 | void SimpleRenderer::removePreviewImage() |
57 | { |
58 | m_render.removePreviewImage(); |
59 | } |
60 | |
61 | void SimpleRenderer::(render::ExtraType type, |
62 | const doc::Cel* cel, |
63 | const doc::Image* image, |
64 | const doc::BlendMode blendMode, |
65 | const doc::Layer* currentLayer, |
66 | const doc::frame_t currentFrame) |
67 | { |
68 | m_render.setExtraImage(type, cel, image, blendMode, |
69 | currentLayer, currentFrame); |
70 | } |
71 | |
72 | void SimpleRenderer::() |
73 | { |
74 | m_render.removeExtraImage(); |
75 | } |
76 | |
77 | void SimpleRenderer::setOnionskin(const render::OnionskinOptions& options) |
78 | { |
79 | m_render.setOnionskin(options); |
80 | } |
81 | |
82 | void SimpleRenderer::disableOnionskin() |
83 | { |
84 | m_render.disableOnionskin(); |
85 | } |
86 | |
87 | void SimpleRenderer::renderSprite(doc::Image* dstImage, |
88 | const doc::Sprite* sprite, |
89 | const doc::frame_t frame) |
90 | { |
91 | m_render.renderSprite(dstImage, sprite, frame); |
92 | } |
93 | |
94 | void SimpleRenderer::renderSprite(doc::Image* dstImage, |
95 | const doc::Sprite* sprite, |
96 | const doc::frame_t frame, |
97 | const gfx::ClipF& area) |
98 | { |
99 | m_render.renderSprite(dstImage, sprite, frame, area); |
100 | } |
101 | |
102 | void SimpleRenderer::renderCheckeredBackground(doc::Image* dstImage, |
103 | const gfx::Clip& area) |
104 | { |
105 | m_render.renderCheckeredBackground(dstImage, area); |
106 | } |
107 | |
108 | void SimpleRenderer::renderImage(doc::Image* dstImage, |
109 | const doc::Image* srcImage, |
110 | const doc::Palette* pal, |
111 | const int x, |
112 | const int y, |
113 | const int opacity, |
114 | const doc::BlendMode blendMode) |
115 | { |
116 | m_render.renderImage(dstImage, srcImage, pal, |
117 | x, y, opacity, blendMode); |
118 | } |
119 | |
120 | } // namespace app |
121 | |