ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Graphics::VectorRendererSpec< PixelType > Class Template Reference

VectorRendererSpec: Specialized Vector Renderer Class. More...

#include <VectorRendererSpec.h>

Inheritance diagram for Graphics::VectorRendererSpec< PixelType >:
Collaboration diagram for Graphics::VectorRendererSpec< PixelType >:

List of all members.

Public Member Functions

 VectorRendererSpec (PixelFormat format)
void drawLine (int x1, int y1, int x2, int y2)
 Draws a line by considering the special cases for optimization.
void drawCircle (int x, int y, int r)
 CIRCLES.
void drawSquare (int x, int y, int w, int h)
 SQUARES.
void drawRoundedSquare (int x, int y, int r, int w, int h)
 ROUNDED SQUARES.
void drawTriangle (int x, int y, int base, int height, TriangleOrientation orient)
 Draws a triangle starting at (x,y) with the given base and height.
void drawTab (int x, int y, int r, int w, int h)
 Draws a tab-like shape, specially thought for the Tab widget.
void drawBeveledSquare (int x, int y, int w, int h)
 Draws a beveled square like the ones in the Classic GUI themes.
void drawString (const Graphics::Font *font, const Common::String &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))
 Draws a string into the screen.
void setFgColor (uint8 r, uint8 g, uint8 b)
 Set the active foreground painting color for the renderer.
void setBgColor (uint8 r, uint8 g, uint8 b)
 Set the active background painting color for the renderer.
void setBevelColor (uint8 r, uint8 g, uint8 b)
void setGradientColors (uint8 r1, uint8 g1, uint8 b1, uint8 r2, uint8 g2, uint8 b2)
 Set the active gradient color.
void setClippingRect (const Common::Rect &clippingArea) override
 Sets the clipping rectangle to be used by draw calls.
void copyFrame (OSystem *sys, const Common::Rect &r)
 Copies the part of the current frame to the system overlay.
void copyWholeFrame (OSystem *sys)
 Copies the current surface to the system overlay.
void fillSurface ()
 Fills the active surface with the specified fg/bg color or the active gradient.
void blitSurface (const Graphics::Surface *source, const Common::Rect &r)
 Blits a given graphics surface on top of the current drawing surface.
void blitSubSurface (const Graphics::Surface *source, const Common::Point &p)
 Blits a given graphics surface at the specified position of the current drawing surface.
void blitKeyBitmap (const Graphics::Surface *source, const Common::Point &p)
void blitAlphaBitmap (Graphics::TransparentSurface *source, const Common::Rect &r, GUI::ThemeEngine::AutoScaleMode autoscale=GUI::ThemeEngine::kAutoScaleNone, Graphics::DrawStep::VectorAlignment xAlign=Graphics::DrawStep::kVectorAlignManual, Graphics::DrawStep::VectorAlignment yAlign=Graphics::DrawStep::kVectorAlignManual, int alpha=255)
void applyScreenShading (GUI::ThemeEngine::ShadingStyle shadingStyle)
 Applies a whole-screen shading effect, used before opening a new dialog.

Protected Member Functions

void putPixel (int x, int y, PixelType color)
 Draws a single pixel on the surface with the given coordinates and the given color.
void blendPixel (int x, int y, PixelType color, uint8 alpha)
 Blends a single pixel on the surface with the given coordinates, color and Alpha intensity.
void blendPixelPtr (PixelType *ptr, PixelType color, uint8 alpha)
 Blends a single pixel on the surface in the given pixel pointer, using supplied color and Alpha intensity.
void blendPixelPtrClip (PixelType *ptr, PixelType color, uint8 alpha, int x, int y)
void blendPixelDestAlphaPtr (PixelType *ptr, PixelType color, uint8 alpha)
 Blends a single pixel on the surface in the given pixel pointer, using supplied color and Alpha intensity.
virtual void drawLineAlg (int x1, int y1, int x2, int y2, uint dx, uint dy, PixelType color)
 PRIMITIVE DRAWING ALGORITHMS.
virtual void drawLineAlgClip (int x1, int y1, int x2, int y2, uint dx, uint dy, PixelType color)
virtual void drawCircleAlg (int x, int y, int r, PixelType color, FillMode fill_m)
 CIRCLE ALGORITHM.
virtual void drawCircleAlgClip (int x, int y, int r, PixelType color, FillMode fill_m)
virtual void drawRoundedSquareAlg (int x1, int y1, int r, int w, int h, PixelType color, FillMode fill_m)
virtual void drawRoundedSquareAlgClip (int x1, int y1, int r, int w, int h, PixelType color, FillMode fill_m)
virtual void drawBorderRoundedSquareAlg (int x1, int y1, int r, int w, int h, PixelType color, FillMode fill_m, uint8 alpha_t, uint8 alpha_r, uint8 alpha_b, uint8 alpha_l)
 ROUNDED SQUARE ALGORITHM.
virtual void drawBorderRoundedSquareAlgClip (int x1, int y1, int r, int w, int h, PixelType color, FillMode fill_m, uint8 alpha_t, uint8 alpha_r, uint8 alpha_b, uint8 alpha_l)
virtual void drawInteriorRoundedSquareAlg (int x1, int y1, int r, int w, int h, PixelType color, FillMode fill_m)
virtual void drawInteriorRoundedSquareAlgClip (int x1, int y1, int r, int w, int h, PixelType color, FillMode fill_m)
virtual void drawSquareAlg (int x, int y, int w, int h, PixelType color, FillMode fill_m)
 SQUARE ALGORITHM.
virtual void drawSquareAlgClip (int x, int y, int w, int h, PixelType color, FillMode fill_m)
virtual void drawTriangleVertAlg (int x, int y, int w, int h, bool inverted, PixelType color, FillMode fill_m)
virtual void drawTriangleVertAlgClip (int x, int y, int w, int h, bool inverted, PixelType color, FillMode fill_m)
virtual void drawTriangleFast (int x, int y, int size, bool inverted, PixelType color, FillMode fill_m)
 VERTICAL TRIANGLE DRAWING - FAST VERSION FOR SQUARED TRIANGLES.
virtual void drawBevelSquareAlg (int x, int y, int w, int h, int bevel, PixelType top_color, PixelType bottom_color)
 SQUARE ALGORITHM.
virtual void drawBevelSquareAlgClip (int x, int y, int w, int h, int bevel, PixelType top_color, PixelType bottom_color)
virtual void drawTabAlg (int x, int y, int w, int h, int r, PixelType color, VectorRenderer::FillMode fill_m, int baseLeft=0, int baseRight=0)
 TAB ALGORITHM - NON AA.
virtual void drawTabAlgClip (int x, int y, int w, int h, int r, PixelType color, VectorRenderer::FillMode fill_m, int baseLeft=0, int baseRight=0)
virtual void drawTabShadow (int x, int y, int w, int h, int r)
virtual void drawTabShadowClip (int x, int y, int w, int h, int r)
virtual void drawBevelTabAlg (int x, int y, int w, int h, int bevel, PixelType topColor, PixelType bottomColor, int baseLeft=0, int baseRight=0)
 BEVELED TABS FOR CLASSIC THEME.
virtual void drawBevelTabAlgClip (int x, int y, int w, int h, int bevel, PixelType topColor, PixelType bottomColor, int baseLeft=0, int baseRight=0)
virtual void drawSquareShadow (int x, int y, int w, int h, int offset)
 SHADOW DRAWING ALGORITHMS.
virtual void drawSquareShadowClip (int x, int y, int w, int h, int offset)
virtual void drawRoundedSquareShadow (int x, int y, int r, int w, int h, int offset)
virtual void drawRoundedSquareShadowClip (int x, int y, int r, int w, int h, int offset)
PixelType calcGradient (uint32 pos, uint32 max)
 Calculates the color gradient on a given point.
void precalcGradient (int h)
void gradientFill (PixelType *first, int width, int x, int y)
void gradientFillClip (PixelType *first, int width, int x, int y, int realX, int realY)
void blendFill (PixelType *first, PixelType *last, PixelType color, uint8 alpha)
 Fills several pixels in a row with a given color and the specified alpha blending.
void blendFillClip (PixelType *first, PixelType *last, PixelType color, uint8 alpha, int realX, int realY)
void darkenFill (PixelType *first, PixelType *last)
void darkenFillClip (PixelType *first, PixelType *last, int x, int y)

Protected Attributes

Common::Rect _clippingArea
const PixelFormat _format
const PixelType _redMask
const PixelType _greenMask
const PixelType _blueMask
const PixelType _alphaMask
PixelType _fgColor
 Foreground color currently being used to draw on the renderer.
PixelType _bgColor
 Background color currently being used to draw on the renderer.
PixelType _gradientStart
 Start color for the fill gradient.
PixelType _gradientEnd
 End color for the fill gradient.
int _gradientBytes [3]
 Color bytes of the active gradient, used to speed up calculation.
Common::Array< PixelType > _gradCache
Common::Array< int > _gradIndexes
PixelType _bevelColor
PixelType _bitmapAlphaColor

Private Types

typedef VectorRenderer Base

Detailed Description

template<typename PixelType>
class Graphics::VectorRendererSpec< PixelType >

VectorRendererSpec: Specialized Vector Renderer Class.

This templated class implements the basic subset of vector operations for all platforms by allowing the user to provide the actual Pixel Type and pixel information structs.

This class takes two template parameters:

Parameters:
PixelType Defines a type which may hold the color value of a single pixel, such as "byte" or "uint16" for 8 and 16 BPP respectively.

TODO: Expand documentation.

See also:
VectorRenderer

Definition at line 47 of file VectorRendererSpec.h.


Member Typedef Documentation

template<typename PixelType >
typedef VectorRenderer Graphics::VectorRendererSpec< PixelType >::Base [private]

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 48 of file VectorRendererSpec.h.


Constructor & Destructor Documentation

template<typename PixelType >
Graphics::VectorRendererSpec< PixelType >::VectorRendererSpec ( PixelFormat  format  ) 

Definition at line 535 of file VectorRendererSpec.cpp.


Member Function Documentation

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::applyScreenShading ( GUI::ThemeEngine::ShadingStyle   )  [virtual]

Applies a whole-screen shading effect, used before opening a new dialog.

Currently supports screen dimmings and luminance (b&w).

Implements Graphics::VectorRenderer.

Definition at line 859 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blendFill ( PixelType *  first,
PixelType *  last,
PixelType  color,
uint8  alpha 
) [inline, protected]

Fills several pixels in a row with a given color and the specified alpha blending.

See also:
blendPixelPtr
blendPixel
Parameters:
first Pointer to the first pixel to fill.
last Pointer to the last pixel to fill.
color Color of the pixel
alpha Alpha intensity of the pixel (0-255)

Definition at line 278 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blendFillClip ( PixelType *  first,
PixelType *  last,
PixelType  color,
uint8  alpha,
int  realX,
int  realY 
) [inline, protected]

Definition at line 283 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blendPixel ( int  x,
int  y,
PixelType  color,
uint8  alpha 
) [inline, protected]

Blends a single pixel on the surface with the given coordinates, color and Alpha intensity.

Parameters:
x Horizontal coordinate of the pixel.
y Vertical coordinate of the pixel.
color Color of the pixel
alpha Alpha intensity of the pixel (0-255)

Definition at line 119 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blendPixelDestAlphaPtr ( PixelType *  ptr,
PixelType  color,
uint8  alpha 
) [inline, protected]

Blends a single pixel on the surface in the given pixel pointer, using supplied color and Alpha intensity.

If the destination pixel has 0 alpha, set the color and alpha channels, overwriting the destination pixel entirely. If the destination pixel has non-zero alpha, blend dest with src.

This is implemented to prevent blendPixel() to calculate the surface pointer on each call. Optimized drawing algorithms should call this function when possible.

See also:
blendPixel
Parameters:
ptr Pointer to the pixel to blend on top of
color Color of the pixel
alpha Alpha intensity of the pixel (0-255)

Definition at line 943 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blendPixelPtr ( PixelType *  ptr,
PixelType  color,
uint8  alpha 
) [inline, protected]

Blends a single pixel on the surface in the given pixel pointer, using supplied color and Alpha intensity.

This is implemented to prevent blendPixel() to calculate the surface pointer on each call. Optimized drawing algorithms should call this function when possible.

See also:
blendPixel
Parameters:
ptr Pointer to the pixel to blend on top of
color Color of the pixel
alpha Alpha intensity of the pixel (0-255)

Definition at line 889 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blendPixelPtrClip ( PixelType *  ptr,
PixelType  color,
uint8  alpha,
int  x,
int  y 
) [inline, protected]

Definition at line 936 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blitAlphaBitmap ( Graphics::TransparentSurface source,
const Common::Rect r,
GUI::ThemeEngine::AutoScaleMode  autoscale = GUI::ThemeEngine::kAutoScaleNone,
Graphics::DrawStep::VectorAlignment  xAlign = Graphics::DrawStep::kVectorAlignManual,
Graphics::DrawStep::VectorAlignment  yAlign = Graphics::DrawStep::kVectorAlignManual,
int  alpha = 255 
) [virtual]

Implements Graphics::VectorRenderer.

Definition at line 825 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blitKeyBitmap ( const Graphics::Surface source,
const Common::Point p 
) [virtual]

Implements Graphics::VectorRenderer.

Definition at line 788 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blitSubSurface ( const Graphics::Surface source,
const Common::Point p 
) [virtual]

Blits a given graphics surface at the specified position of the current drawing surface.

Implements Graphics::VectorRenderer.

Definition at line 759 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::blitSurface ( const Graphics::Surface source,
const Common::Rect r 
) [virtual]

Blits a given graphics surface on top of the current drawing surface.

Note that the source surface and the active surface are expected to be of the same size, hence the area delimited by "r" in the source surface will be blitted into the area delimited by "r" on the current surface.

If you wish to blit a smaller surface into the active drawing area, use VectorRenderer::blitSubSurface().

Parameters:
source Surface to blit into the drawing surface.
r Position in the active drawing surface to do the blitting.

Implements Graphics::VectorRenderer.

Definition at line 738 of file VectorRendererSpec.cpp.

template<typename PixelType >
PixelType Graphics::VectorRendererSpec< PixelType >::calcGradient ( uint32  pos,
uint32  max 
) [inline, protected]

Calculates the color gradient on a given point.

This function assumes that the gradient start/end colors have been set beforehand from the API function call.

Parameters:
pos Progress of the gradient.
max Maximum amount of the progress.
Returns:
Composite color of the gradient at the given "progress" amount.

Definition at line 569 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::copyFrame ( OSystem sys,
const Common::Rect r 
) [virtual]

Copies the part of the current frame to the system overlay.

Parameters:
sys Pointer to the global System class
r Zone of the surface to copy into the overlay.

Implements Graphics::VectorRenderer.

Definition at line 727 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::copyWholeFrame ( OSystem sys  )  [inline, virtual]

Copies the current surface to the system overlay.

Parameters:
sys Pointer to the global System class

Implements Graphics::VectorRenderer.

Definition at line 79 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::darkenFill ( PixelType *  first,
PixelType *  last 
) [inline, protected]

Definition at line 960 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::darkenFillClip ( PixelType *  first,
PixelType *  last,
int  x,
int  y 
) [inline, protected]

Definition at line 988 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawBeveledSquare ( int  x,
int  y,
int  w,
int  h 
) [inline, virtual]

Draws a beveled square like the ones in the Classic GUI themes.

Beveled squares are always drawn with a transparent background. Draw them on top of a standard square to fill it.

Parameters:
x Horizontal (X) coordinate for the center of the square
y Vertical (Y) coordinate for the center of the square
w Width of the square.
h Height of the square
bevel Amount of bevel. Must be positive.

Implements Graphics::VectorRenderer.

Definition at line 60 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawBevelSquareAlg ( int  x,
int  y,
int  w,
int  h,
int  bevel,
PixelType  top_color,
PixelType  bottom_color 
) [protected, virtual]

SQUARE ALGORITHM.

Definition at line 1962 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawBevelSquareAlgClip ( int  x,
int  y,
int  w,
int  h,
int  bevel,
PixelType  top_color,
PixelType  bottom_color 
) [protected, virtual]

Definition at line 2022 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawBevelTabAlg ( int  x,
int  y,
int  w,
int  h,
int  bevel,
PixelType  topColor,
PixelType  bottomColor,
int  baseLeft = 0,
int  baseRight = 0 
) [protected, virtual]

BEVELED TABS FOR CLASSIC THEME.

Definition at line 1789 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawBevelTabAlgClip ( int  x,
int  y,
int  w,
int  h,
int  bevel,
PixelType  topColor,
PixelType  bottomColor,
int  baseLeft = 0,
int  baseRight = 0 
) [protected, virtual]

Definition at line 1832 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawBorderRoundedSquareAlg ( int  x1,
int  y1,
int  r,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m,
uint8  alpha_t,
uint8  alpha_r,
uint8  alpha_b,
uint8  alpha_l 
) [protected, virtual]

ROUNDED SQUARE ALGORITHM.

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 2663 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawBorderRoundedSquareAlgClip ( int  x1,
int  y1,
int  r,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m,
uint8  alpha_t,
uint8  alpha_r,
uint8  alpha_b,
uint8  alpha_l 
) [protected, virtual]

Definition at line 2725 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawCircle ( int  x,
int  y,
int  r 
) [virtual]

CIRCLES.

Implements Graphics::VectorRenderer.

Definition at line 1153 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawCircleAlg ( int  x,
int  y,
int  r,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

CIRCLE ALGORITHM.

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 3014 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawCircleAlgClip ( int  x,
int  y,
int  r,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Definition at line 3057 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawInteriorRoundedSquareAlg ( int  x1,
int  y1,
int  r,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 2793 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawInteriorRoundedSquareAlgClip ( int  x1,
int  y1,
int  r,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Definition at line 2865 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawLine ( int  x1,
int  y1,
int  x2,
int  y2 
) [virtual]

Draws a line by considering the special cases for optimization.

Parameters:
x1 Horizontal (X) coordinate for the line start
x2 Horizontal (X) coordinate for the line end
y1 Vertical (Y) coordinate for the line start
y2 Vertical (Y) coordinate for the line end

Implements Graphics::VectorRenderer.

Definition at line 1067 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawLineAlg ( int  x1,
int  y1,
int  x2,
int  y2,
uint  dx,
uint  dy,
PixelType  color 
) [protected, virtual]

PRIMITIVE DRAWING ALGORITHMS.

GENERIC LINE ALGORITHM.

Generic algorithms for drawing all kinds of aliased primitive shapes. These may be overloaded in inheriting classes to implement platform-specific optimizations or improve looks.

See also:
VectorRendererAA
VectorRendererAA::drawLineAlg
VectorRendererAA::drawCircleAlg

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 2094 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawLineAlgClip ( int  x1,
int  y1,
int  x2,
int  y2,
uint  dx,
uint  dy,
PixelType  color 
) [protected, virtual]

Definition at line 2141 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawRoundedSquare ( int  x,
int  y,
int  r,
int  w,
int  h 
) [virtual]

ROUNDED SQUARES.

Implements Graphics::VectorRenderer.

Definition at line 1272 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawRoundedSquareAlg ( int  x1,
int  y1,
int  r,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 2950 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawRoundedSquareAlgClip ( int  x1,
int  y1,
int  r,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Definition at line 2981 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawRoundedSquareShadow ( int  x,
int  y,
int  r,
int  w,
int  h,
int  offset 
) [protected, virtual]

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 3194 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawRoundedSquareShadowClip ( int  x,
int  y,
int  r,
int  w,
int  h,
int  offset 
) [protected, virtual]

Definition at line 3279 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawSquare ( int  x,
int  y,
int  w,
int  h 
) [virtual]

SQUARES.

Implements Graphics::VectorRenderer.

Definition at line 1214 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawSquareAlg ( int  x,
int  y,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

SQUARE ALGORITHM.

Definition at line 1884 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawSquareAlgClip ( int  x,
int  y,
int  w,
int  h,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Definition at line 1921 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawSquareShadow ( int  x,
int  y,
int  w,
int  h,
int  offset 
) [protected, virtual]

SHADOW DRAWING ALGORITHMS.

Optimized versions of the primitive drawing algorithms with alpha blending for shadow drawing. There functions may be overloaded in inheriting classes to improve performance in the slowest platforms where pixel alpha blending just doesn't cut it.

Parameters:
offset Intensity/size of the shadow.

Definition at line 3105 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawSquareShadowClip ( int  x,
int  y,
int  w,
int  h,
int  offset 
) [protected, virtual]

Definition at line 3146 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawString ( const Graphics::Font font,
const Common::String text,
const Common::Rect area,
Graphics::TextAlign  alignH,
GUI::ThemeEngine::TextAlignVertical  alignV,
int  deltax,
bool  useEllipsis,
const Common::Rect textDrawableArea = Common::Rect(0, 0, 0, 0) 
) [virtual]

Draws a string into the screen.

Wrapper for the Graphics::Font string drawing method.

Implements Graphics::VectorRenderer.

Definition at line 1023 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTab ( int  x,
int  y,
int  r,
int  w,
int  h 
) [virtual]

Draws a tab-like shape, specially thought for the Tab widget.

If a radius is given, the tab will have rounded corners. Otherwise, the tab will be squared.

Parameters:
x Horizontal (X) coordinate for the tab
y Vertical (Y) coordinate for the tab
w Width of the tab
h Height of the tab
r Radius of the corners of the tab (0 for squared tabs).

Implements Graphics::VectorRenderer.

Definition at line 1305 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTabAlg ( int  x,
int  y,
int  w,
int  h,
int  r,
PixelType  color,
VectorRenderer::FillMode  fill_m,
int  baseLeft = 0,
int  baseRight = 0 
) [protected, virtual]

TAB ALGORITHM - NON AA.

Reimplemented in Graphics::VectorRendererAA< PixelType >.

Definition at line 1444 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTabAlgClip ( int  x,
int  y,
int  w,
int  h,
int  r,
PixelType  color,
VectorRenderer::FillMode  fill_m,
int  baseLeft = 0,
int  baseRight = 0 
) [protected, virtual]

Definition at line 1546 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTabShadow ( int  x,
int  y,
int  w,
int  h,
int  r 
) [protected, virtual]

Definition at line 1661 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTabShadowClip ( int  x,
int  y,
int  w,
int  h,
int  r 
) [protected, virtual]

Definition at line 1722 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTriangle ( int  x,
int  y,
int  base,
int  height,
TriangleOrientation  orient 
) [virtual]

Draws a triangle starting at (x,y) with the given base and height.

The triangle will always be isosceles, with the given base and height. The orientation parameter controls the position of the base of the triangle.

Parameters:
x Horizontal (X) coordinate for the top left corner of the triangle
y Vertical (Y) coordinate for the top left corner of the triangle
base Width of the base of the triangle
height Height of the triangle
orient Orientation of the triangle.

Implements Graphics::VectorRenderer.

Definition at line 1358 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTriangleFast ( int  x,
int  y,
int  size,
bool  inverted,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

VERTICAL TRIANGLE DRAWING - FAST VERSION FOR SQUARED TRIANGLES.

Definition at line 2599 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTriangleVertAlg ( int  x,
int  y,
int  w,
int  h,
bool  inverted,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Definition at line 2213 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::drawTriangleVertAlgClip ( int  x,
int  y,
int  w,
int  h,
bool  inverted,
PixelType  color,
VectorRenderer::FillMode  fill_m 
) [protected, virtual]

Definition at line 2394 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::fillSurface (  )  [virtual]

Fills the active surface with the specified fg/bg color or the active gradient.

Defaults to using the active Foreground color for filling.

Implements Graphics::VectorRenderer.

Definition at line 691 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::gradientFill ( PixelType *  first,
int  width,
int  x,
int  y 
) [protected]

Definition at line 607 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::gradientFillClip ( PixelType *  first,
int  width,
int  x,
int  y,
int  realX,
int  realY 
) [protected]

Definition at line 648 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::precalcGradient ( int  h  )  [protected]

Definition at line 589 of file VectorRendererSpec.cpp.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::putPixel ( int  x,
int  y,
PixelType  color 
) [inline, protected]

Draws a single pixel on the surface with the given coordinates and the given color.

Parameters:
x Horizontal coordinate of the pixel.
y Vertical coordinate of the pixel.
color Color of the pixel

Definition at line 105 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::setBevelColor ( uint8  r,
uint8  g,
uint8  b 
) [inline, virtual]

Implements Graphics::VectorRenderer.

Definition at line 74 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::setBgColor ( uint8  r,
uint8  g,
uint8  b 
) [inline, virtual]

Set the active background painting color for the renderer.

All the background drawing from then on will be done with that color, unless specified otherwise.

Background drawing means all the shape filling.

Parameters:
r value of the red color byte
g value of the green color byte
b value of the blue color byte

Implements Graphics::VectorRenderer.

Definition at line 73 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::setClippingRect ( const Common::Rect clippingArea  )  [inline, override, virtual]

Sets the clipping rectangle to be used by draw calls.

Draw calls are restricted to pixels that are inside of the clipping rectangle. Pixels outside the clipping rectangle are not modified. To disable the clipping rectangle, call this method with a rectangle the same size as the target surface.

Implements Graphics::VectorRenderer.

Definition at line 76 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::setFgColor ( uint8  r,
uint8  g,
uint8  b 
) [inline, virtual]

Set the active foreground painting color for the renderer.

All the foreground drawing from then on will be done with that color, unless specified otherwise.

Foreground drawing means all outlines and basic shapes.

Parameters:
r value of the red color byte
g value of the green color byte
b value of the blue color byte

Implements Graphics::VectorRenderer.

Definition at line 72 of file VectorRendererSpec.h.

template<typename PixelType >
void Graphics::VectorRendererSpec< PixelType >::setGradientColors ( uint8  r1,
uint8  g1,
uint8  b1,
uint8  r2,
uint8  g2,
uint8  b2 
) [virtual]

Set the active gradient color.

All shapes drawn using kFillGradient as their fill mode will use this VERTICAL gradient as their fill color.

Parameters:
r1 value of the red color byte for the start color
g1 value of the green color byte for the start color
b1 value of the blue color byte for the start color
r2 value of the red color byte for the end color
g2 value of the green color byte for the end color
b2 value of the blue color byte for the end color

Implements Graphics::VectorRenderer.

Definition at line 552 of file VectorRendererSpec.cpp.


Member Data Documentation

template<typename PixelType >
const PixelType Graphics::VectorRendererSpec< PixelType >::_alphaMask [protected]

Definition at line 299 of file VectorRendererSpec.h.

template<typename PixelType >
PixelType Graphics::VectorRendererSpec< PixelType >::_bevelColor [protected]

Definition at line 312 of file VectorRendererSpec.h.

template<typename PixelType >
PixelType Graphics::VectorRendererSpec< PixelType >::_bgColor [protected]

Background color currently being used to draw on the renderer.

Definition at line 302 of file VectorRendererSpec.h.

template<typename PixelType >
PixelType Graphics::VectorRendererSpec< PixelType >::_bitmapAlphaColor [protected]

Definition at line 313 of file VectorRendererSpec.h.

template<typename PixelType >
const PixelType Graphics::VectorRendererSpec< PixelType >::_blueMask [protected]

Definition at line 299 of file VectorRendererSpec.h.

template<typename PixelType >
Common::Rect Graphics::VectorRendererSpec< PixelType >::_clippingArea [protected]

Definition at line 95 of file VectorRendererSpec.h.

template<typename PixelType >
PixelType Graphics::VectorRendererSpec< PixelType >::_fgColor [protected]

Foreground color currently being used to draw on the renderer.

Definition at line 301 of file VectorRendererSpec.h.

template<typename PixelType >
const PixelFormat Graphics::VectorRendererSpec< PixelType >::_format [protected]

Definition at line 298 of file VectorRendererSpec.h.

template<typename PixelType >
Common::Array<PixelType> Graphics::VectorRendererSpec< PixelType >::_gradCache [protected]

Definition at line 309 of file VectorRendererSpec.h.

template<typename PixelType >
int Graphics::VectorRendererSpec< PixelType >::_gradientBytes[3] [protected]

Color bytes of the active gradient, used to speed up calculation.

Definition at line 307 of file VectorRendererSpec.h.

template<typename PixelType >
PixelType Graphics::VectorRendererSpec< PixelType >::_gradientEnd [protected]

End color for the fill gradient.

Definition at line 305 of file VectorRendererSpec.h.

template<typename PixelType >
PixelType Graphics::VectorRendererSpec< PixelType >::_gradientStart [protected]

Start color for the fill gradient.

Definition at line 304 of file VectorRendererSpec.h.

template<typename PixelType >
Common::Array<int> Graphics::VectorRendererSpec< PixelType >::_gradIndexes [protected]

Definition at line 310 of file VectorRendererSpec.h.

template<typename PixelType >
const PixelType Graphics::VectorRendererSpec< PixelType >::_greenMask [protected]

Definition at line 299 of file VectorRendererSpec.h.

template<typename PixelType >
const PixelType Graphics::VectorRendererSpec< PixelType >::_redMask [protected]

Definition at line 299 of file VectorRendererSpec.h.


The documentation for this class was generated from the following files:


Generated on Sat Feb 15 2020 05:02:18 for ResidualVM by doxygen 1.7.1
curved edge   curved edge