22 #ifndef VECTOR_RENDERER_SPEC_H 23 #define VECTOR_RENDERER_SPEC_H 25 #include "graphics/VectorRenderer.h" 54 template<
typename PixelType>
61 void drawLine(
int x1,
int y1,
int x2,
int y2)
override;
63 void drawSquare(
int x,
int y,
int w,
int h)
override;
65 void drawTriangle(
int x,
int y,
int base,
int height, TriangleOrientation orient)
override;
66 void drawTab(
int x,
int y,
int r,
int w,
int h,
int s)
override;
70 if (useClippingVersions) {
82 void setBevelColor(uint8 r, uint8 g, uint8 b)
override { _bevelColor = _format.
RGBToColor(r, g, b); }
83 void setGradientColors(uint8 r1, uint8 g1, uint8 b1, uint8 r2, uint8 g2, uint8 b2)
override;
107 inline void putPixel(
int x,
int y, PixelType color) {
121 inline void blendPixel(
int x,
int y, PixelType color, uint8 alpha) {
137 inline void blendPixelPtr(PixelType *ptr, PixelType color, uint8 alpha);
138 inline void blendPixelPtrClip(PixelType *ptr, PixelType color, uint8 alpha,
int x,
int y);
169 virtual void drawLineAlg(
int x1,
int y1,
int x2,
int y2,
170 uint dx, uint dy, PixelType color);
172 virtual void drawLineAlgClip(
int x1,
int y1,
int x2,
int y2,
173 uint dx, uint dy, PixelType color);
175 virtual void drawCircleAlg(
int x,
int y,
int r,
178 virtual void drawCircleAlgClip(
int x,
int y,
int r,
181 virtual void drawRoundedSquareAlg(
int x1,
int y1,
int r,
int w,
int h,
184 virtual void drawRoundedSquareAlgClip(
int x1,
int y1,
int r,
int w,
int h,
187 virtual void drawBorderRoundedSquareAlg(
int x1,
int y1,
int r,
int w,
int h,
188 PixelType color,
FillMode fill_m, uint8 alpha_t, uint8 alpha_r, uint8 alpha_b, uint8 alpha_l);
190 virtual void drawBorderRoundedSquareAlgClip(
int x1,
int y1,
int r,
int w,
int h,
191 PixelType color,
FillMode fill_m, uint8 alpha_t, uint8 alpha_r, uint8 alpha_b, uint8 alpha_l);
193 virtual void drawInteriorRoundedSquareAlg(
int x1,
int y1,
int r,
int w,
int h,
196 virtual void drawInteriorRoundedSquareAlgClip(
int x1,
int y1,
int r,
int w,
int h,
199 virtual void drawSquareAlg(
int x,
int y,
int w,
int h,
202 virtual void drawSquareAlgClip(
int x,
int y,
int w,
int h,
205 virtual void drawTriangleHorzAlg(
int x,
int y,
int w,
int h,
206 bool inverted, PixelType color,
FillMode fill_m);
208 virtual void drawTriangleHorzAlgClip(
int x,
int y,
int w,
int h,
209 bool inverted, PixelType color,
FillMode fill_m);
211 virtual void drawTriangleFastH(
int x,
int y,
int size,
212 bool inverted, PixelType color,
FillMode fill_m);
214 virtual void drawTriangleVertAlg(
int x,
int y,
int w,
int h,
215 bool inverted, PixelType color,
FillMode fill_m);
217 virtual void drawTriangleVertAlgClip(
int x,
int y,
int w,
int h,
218 bool inverted, PixelType color,
FillMode fill_m);
220 virtual void drawTriangleFastV(
int x,
int y,
int size,
221 bool inverted, PixelType color,
FillMode fill_m);
223 virtual void drawBevelSquareAlg(
int x,
int y,
int w,
int h,
224 int bevel, PixelType top_color, PixelType bottom_color);
226 virtual void drawBevelSquareAlgClip(
int x,
int y,
int w,
int h,
227 int bevel, PixelType top_color, PixelType bottom_color);
229 virtual void drawTabAlg(
int x,
int y,
int w,
int h,
int r,
231 int baseLeft,
int baseRight,
bool vFlip);
233 virtual void drawTabAlgClip(
int x,
int y,
int w,
int h,
int r,
235 int baseLeft,
int baseRight,
bool vFlip);
237 virtual void drawTabShadow(
int x,
int y,
int w,
int h,
int r,
int offset, uint32 shadowIntensity,
bool vFlip);
239 virtual void drawTabShadowClip(
int x,
int y,
int w,
int h,
int r,
int offset, uint32 shadowIntensity,
bool vFlip);
241 virtual void drawBevelTabAlg(
int x,
int y,
int w,
int h,
242 int bevel, PixelType topColor, PixelType bottomColor,
243 int baseLeft,
int baseRight,
bool vFlip);
245 virtual void drawBevelTabAlgClip(
int x,
int y,
int w,
int h,
246 int bevel, PixelType topColor, PixelType bottomColor,
247 int baseLeft,
int baseRight,
bool vFlip);
260 virtual void drawSquareShadowClip(
int x,
int y,
int w,
int h,
int offset);
261 virtual void drawRoundedSquareShadow(
int x,
int y,
int r,
int w,
int h,
int offset, uint32 shadowIntensity);
262 virtual void drawRoundedSquareShadowClip(
int x,
int y,
int r,
int w,
int h,
int offset, uint32 shadowIntensity);
275 void precalcGradient(
int h);
276 void gradientFill(PixelType *first,
int width,
int x,
int y);
277 void gradientFillClip(PixelType *first,
int width,
int x,
int y,
int realX,
int realY);
289 inline void blendFill(PixelType *first, PixelType *last, PixelType color, uint8 alpha) {
294 inline void blendFillClip(PixelType *first, PixelType *last, PixelType color, uint8 alpha,
int realX,
int realY) {
295 if (_clippingArea.top <= realY && realY < _clippingArea.bottom) {
296 while (first < last) {
297 if (_clippingArea.
left <= realX && realX < _clippingArea.
right)
306 void darkenFill(PixelType *first, PixelType *last);
307 void darkenFillClip(PixelType *first, PixelType *last,
int x,
int y);
310 const PixelType _redMask, _greenMask, _blueMask, _alphaMask;
323 PixelType _bevelColor;
327 #ifndef DISABLE_FANCY_THEMES 340 template<
typename PixelType>
357 virtual void drawLineAlg(
int x1,
int y1,
int x2,
int y2, uint dx, uint dy, PixelType color);
377 virtual void drawRoundedSquareAlg(
int x1,
int y1,
int r,
int w,
int h, PixelType color,
VectorRenderer::FillMode fill_m);
379 virtual void drawBorderRoundedSquareAlg(
int x1,
int y1,
int r,
int w,
int h, PixelType color,
VectorRenderer::FillMode fill_m, uint8 alpha_t, uint8 alpha_l, uint8 alpha_r, uint8 alpha_b);
381 virtual void drawInteriorRoundedSquareAlg(
int x1,
int y1,
int r,
int w,
int h, PixelType color,
VectorRenderer::FillMode fill_m);
383 virtual void drawRoundedSquareShadow(
int x,
int y,
int r,
int w,
int h,
int offset, uint32 shadowIntensity) {
384 Base::drawRoundedSquareShadow(x, y, r, w, h, offset, shadowIntensity);
387 virtual void drawTabAlg(
int x,
int y,
int w,
int h,
int r,
389 int baseLeft,
int baseRight,
bool vFlip);
Definition: managed_surface.h:51
int16 & w
Definition: managed_surface.h:117
TextAlign
Definition: font.h:48
ShadingStyle
Function used to process areas other than the current dialog.
Definition: ThemeEngine.h:297
void copyWholeFrame(OSystem *sys) override
Definition: VectorRendererSpec.h:87
void drawCircle(int x, int y, int r) override
PixelType calcGradient(uint32 pos, uint32 max)
ManagedSurface * _activeSurface
Definition: VectorRenderer.h:552
bool contains(int16 x, int16 y) const
Definition: rect.h:210
int16 right
Definition: rect.h:146
TextAlignVertical
Vertical alignment of the text.
Definition: ThemeEngine.h:218
const void * getBasePtr(int x, int y) const
Definition: managed_surface.h:250
void setGradientColors(uint8 r1, uint8 g1, uint8 b1, uint8 r2, uint8 g2, uint8 b2) override
void drawLine(int x1, int y1, int x2, int y2) override
Definition: VectorRendererSpec.h:341
Definition: VectorRenderer.h:139
void copyFrame(OSystem *sys, const Common::Rect &r) override
FillMode
Definition: VectorRenderer.h:149
void applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) override
void blendPixel(int x, int y, PixelType color, uint8 alpha)
Definition: VectorRendererSpec.h:121
virtual void drawSquareShadow(int x, int y, int w, int h, int offset)
int16 & h
Definition: managed_surface.h:118
void drawRoundedSquare(int x, int y, int r, int w, int h) override
PixelType _fgColor
Definition: VectorRendererSpec.h:312
int _gradientBytes[3]
Definition: VectorRendererSpec.h:318
void drawTriangle(int x, int y, int base, int height, TriangleOrientation orient) override
void fillSurface() override
Definition: formatinfo.h:28
virtual void drawLineAlg(int x1, int y1, int x2, int y2, uint dx, uint dy, PixelType color)
void blendFill(PixelType *first, PixelType *last, PixelType color, uint8 alpha)
Definition: VectorRendererSpec.h:289
int16 left
Definition: rect.h:145
PixelType _bgColor
Definition: VectorRendererSpec.h:313
void drawTab(int x, int y, int r, int w, int h, int s) override
Definition: VectorRendererSpec.h:55
void setBgColor(uint8 r, uint8 g, uint8 b) override
Definition: VectorRendererSpec.h:81
void blendPixelPtr(PixelType *ptr, PixelType color, uint8 alpha)
void blendPixelDestAlphaPtr(PixelType *ptr, PixelType color, uint8 alpha)
PixelType _gradientEnd
Definition: VectorRendererSpec.h:316
Definition: commandLine.h:32
PixelType _gradientStart
Definition: VectorRendererSpec.h:315
void drawBeveledSquare(int x, int y, int w, int h) override
Definition: VectorRendererSpec.h:68
void blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) override
void drawString(const Graphics::Font *font, const Common::U32String &text, const Common::Rect &area, Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool elipsis, const Common::Rect &textDrawableArea=Common::Rect(0, 0, 0, 0)) override
void setClippingRect(const Common::Rect &clippingArea) override
Definition: VectorRendererSpec.h:84
void drawSquare(int x, int y, int w, int h) override
void putPixel(int x, int y, PixelType color)
Definition: VectorRendererSpec.h:107
void setFgColor(uint8 r, uint8 g, uint8 b) override
Definition: VectorRendererSpec.h:80
int _bevel
Definition: VectorRenderer.h:558