22#ifndef VECTOR_RENDERER_SPEC_H
23#define VECTOR_RENDERER_SPEC_H
25#include "graphics/VectorRenderer.h"
54template<
typename PixelType>
61 void drawLine(
int x1,
int y1,
int x2,
int y2)
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) {
138 inline void blendPixelPtrClip(PixelType *ptr, PixelType color, uint8 alpha,
int x,
int y);
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);
309 const PixelFormat _format;
310 const PixelType _redMask, _greenMask, _blueMask, _alphaMask;
323 PixelType _bevelColor;
327#ifndef DISABLE_FANCY_THEMES
340template<
typename PixelType>
357 void drawLineAlg(
int x1,
int y1,
int x2,
int y2, uint dx, uint dy, PixelType color)
override;
379 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)
override;
381 void drawInteriorRoundedSquareAlg(
int x1,
int y1,
int r,
int w,
int h, PixelType color,
VectorRenderer::FillMode fill_m)
override;
383 void drawRoundedSquareShadow(
int x,
int y,
int r,
int w,
int h,
int offset, uint32 shadowIntensity)
override {
384 Base::drawRoundedSquareShadow(x, y, r, w, h, offset, shadowIntensity);
387 void drawTabAlg(
int x,
int y,
int w,
int h,
int r,
389 int baseLeft,
int baseRight,
bool vFlip)
override;
ShadingStyle
Function used to process areas other than the current dialog.
Definition: ThemeEngine.h:297
TextAlignVertical
Vertical alignment of the text.
Definition: ThemeEngine.h:218
Definition: managed_surface.h:51
const void * getBasePtr(int x, int y) const
Definition: managed_surface.h:252
int16 & w
Definition: managed_surface.h:134
int16 & h
Definition: managed_surface.h:135
Definition: VectorRendererSpec.h:341
void drawRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) override
void drawLineAlg(int x1, int y1, int x2, int y2, uint dx, uint dy, PixelType color) override
void drawCircleAlg(int x, int y, int r, PixelType color, VectorRenderer::FillMode fill_m) override
Definition: VectorRenderer.h:138
FillMode
Definition: VectorRenderer.h:148
ManagedSurface * _activeSurface
Definition: VectorRenderer.h:551
int _bevel
Definition: VectorRenderer.h:557
Definition: VectorRendererSpec.h:55
int _gradientBytes[3]
Definition: VectorRendererSpec.h:318
void applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) override
virtual void drawSquareShadow(int x, int y, int w, int h, int offset)
void drawRoundedSquare(int x, int y, int r, int w, int h) 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 fillSurface() override
void blendFill(PixelType *first, PixelType *last, PixelType color, uint8 alpha)
Definition: VectorRendererSpec.h:289
void setClippingRect(const Common::Rect &clippingArea) override
Definition: VectorRendererSpec.h:84
void drawCircle(int x, int y, int r) override
void drawTab(int x, int y, int r, int w, int h, int s) override
PixelType _gradientEnd
Definition: VectorRendererSpec.h:316
PixelType _fgColor
Definition: VectorRendererSpec.h:312
void setBgColor(uint8 r, uint8 g, uint8 b) override
Definition: VectorRendererSpec.h:81
PixelType calcGradient(uint32 pos, uint32 max)
void copyWholeFrame(OSystem *sys) override
Definition: VectorRendererSpec.h:87
void setFgColor(uint8 r, uint8 g, uint8 b) override
Definition: VectorRendererSpec.h:80
void putPixel(int x, int y, PixelType color)
Definition: VectorRendererSpec.h:107
void drawSquare(int x, int y, int w, int h) override
void blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) override
void blendPixelDestAlphaPtr(PixelType *ptr, PixelType color, uint8 alpha)
void drawTriangle(int x, int y, int base, int height, TriangleOrientation orient) override
virtual void drawLineAlg(int x1, int y1, int x2, int y2, uint dx, uint dy, PixelType color)
void setGradientColors(uint8 r1, uint8 g1, uint8 b1, uint8 r2, uint8 g2, uint8 b2) override
void drawBeveledSquare(int x, int y, int w, int h) override
Definition: VectorRendererSpec.h:68
PixelType _gradientStart
Definition: VectorRendererSpec.h:315
PixelType _bgColor
Definition: VectorRendererSpec.h:313
void blendPixel(int x, int y, PixelType color, uint8 alpha)
Definition: VectorRendererSpec.h:121
void copyFrame(OSystem *sys, const Common::Rect &r) override
void drawLine(int x1, int y1, int x2, int y2) override
void blendPixelPtr(PixelType *ptr, PixelType color, uint8 alpha)
TextAlign
Definition: font.h:48
Definition: formatinfo.h:28
T right
Definition: rect.h:171
T left
Definition: rect.h:170
bool contains(T x, T y) const
Definition: rect.h:246