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

Graphics::VectorRenderer Class Reference

VectorRenderer: The core Vector Renderer Class. More...

#include <VectorRenderer.h>

Inheritance diagram for Graphics::VectorRenderer:
Collaboration diagram for Graphics::VectorRenderer:

List of all members.

Public Types

enum  FillMode { kFillDisabled = 0, kFillForeground = 1, kFillBackground = 2, kFillGradient = 3 }
 

Specifies the way in which a shape is filled.

More...
enum  TriangleOrientation {
  kTriangleAuto = 0, kTriangleUp, kTriangleDown, kTriangleLeft,
  kTriangleRight
}
enum  ShadowFillMode { kShadowLinear = 0, kShadowExponential = 1 }

Public Member Functions

 VectorRenderer ()
virtual ~VectorRenderer ()
virtual void drawLine (int x1, int y1, int x2, int y2)=0
 Draws a line by considering the special cases for optimization.
virtual void drawLineClip (int x1, int y1, int x2, int y2, Common::Rect clipping)=0
virtual void drawCircle (int x, int y, int r)=0
 Draws a circle centered at (x,y) with radius r.
virtual void drawCircleClip (int x, int y, int r, Common::Rect clipping)=0
virtual void drawSquare (int x, int y, int w, int h)=0
 Draws a square starting at (x,y) with the given width and height.
virtual void drawSquareClip (int x, int y, int w, int h, Common::Rect clipping)=0
virtual void drawRoundedSquare (int x, int y, int r, int w, int h)=0
 Draws a rounded square starting at (x,y) with the given width and height.
virtual void drawRoundedSquareClip (int x, int y, int r, int w, int h, Common::Rect clipping)=0
virtual void drawTriangle (int x, int y, int base, int height, TriangleOrientation orient)=0
 Draws a triangle starting at (x,y) with the given base and height.
virtual void drawTriangleClip (int x, int y, int base, int height, TriangleOrientation orient, Common::Rect clipping)=0
virtual void drawBeveledSquare (int x, int y, int w, int h, int bevel)=0
 Draws a beveled square like the ones in the Classic GUI themes.
virtual void drawBeveledSquareClip (int x, int y, int w, int h, int bevel, Common::Rect clipping)=0
virtual void drawTab (int x, int y, int r, int w, int h)=0
 Draws a tab-like shape, specially thought for the Tab widget.
virtual void drawTabClip (int x, int y, int r, int w, int h, Common::Rect clipping)=0
virtual void drawCross (int x, int y, int w, int h)
 Simple helper function to draw a cross.
virtual void drawCrossClip (int x, int y, int w, int h, Common::Rect clipping)
virtual void setFgColor (uint8 r, uint8 g, uint8 b)=0
 Set the active foreground painting color for the renderer.
virtual void setBgColor (uint8 r, uint8 g, uint8 b)=0
 Set the active background painting color for the renderer.
virtual void setBevelColor (uint8 r, uint8 g, uint8 b)=0
virtual void setGradientColors (uint8 r1, uint8 g1, uint8 b1, uint8 r2, uint8 g2, uint8 b2)=0
 Set the active gradient color.
virtual void setSurface (TransparentSurface *surface)
 Sets the active drawing surface.
virtual TransparentSurfacegetActiveSurface ()
 Returns the currently active drawing surface.
virtual void fillSurface ()=0
 Fills the active surface with the specified fg/bg color or the active gradient.
virtual void fillSurfaceClip (Common::Rect clipping)=0
virtual void clearSurface ()
 Clears the active surface.
virtual void setFillMode (FillMode mode)
 Sets the active fill mode for all shapes.
virtual void setShadowFillMode (ShadowFillMode mode)
virtual void setStrokeWidth (int width)
 Sets the stroke width.
virtual void setShadowOffset (int offset)
 Enables adding shadows to all drawn primitives.
virtual void setBevel (int amount)
virtual void setGradientFactor (int factor)
 Sets the multiplication factor of the active gradient.
void stepGetPositions (const DrawStep &step, const Common::Rect &area, uint16 &in_x, uint16 &in_y, uint16 &in_w, uint16 &in_h)
 Translates the position data inside a DrawStep into actual screen drawing positions.
int stepGetRadius (const DrawStep &step, const Common::Rect &area)
 Translates the radius data inside a drawstep into the real radius for the shape.
void drawCallback_CIRCLE (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
 DrawStep callback functions for each drawing feature.
void drawCallback_SQUARE (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_LINE (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_ROUNDSQ (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_FILLSURFACE (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_TRIANGLE (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_BEVELSQ (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_TAB (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_BITMAP (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_ALPHABITMAP (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_CROSS (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
void drawCallback_VOID (const Common::Rect &area, const DrawStep &step, const Common::Rect &clip)
virtual void drawStep (const Common::Rect &area, const DrawStep &step, uint32 extra=0)
 Draws the specified draw step on the screen.
virtual void drawStepClip (const Common::Rect &area, const Common::Rect &clip, const DrawStep &step, uint32 extra=0)
virtual void copyFrame (OSystem *sys, const Common::Rect &r)=0
 Copies the part of the current frame to the system overlay.
virtual void copyWholeFrame (OSystem *sys)=0
 Copies the current surface to the system overlay.
virtual void blitSurface (const Graphics::Surface *source, const Common::Rect &r)=0
 Blits a given graphics surface on top of the current drawing surface.
virtual void blitSubSurface (const Graphics::Surface *source, const Common::Rect &r)=0
 Blits a given graphics surface into a small area of the current drawing surface.
virtual void blitSubSurfaceClip (const Graphics::Surface *source, const Common::Rect &r, const Common::Rect &clipping)=0
virtual void blitKeyBitmap (const Graphics::Surface *source, const Common::Rect &r)=0
virtual void blitKeyBitmapClip (const Graphics::Surface *source, const Common::Rect &r, const Common::Rect &clipping)=0
virtual 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)=0
virtual void 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)=0
 Draws a string into the screen.
virtual void disableShadows ()
 Allows to temporarily enable/disable all shadows drawing.
virtual void enableShadows ()
virtual void applyScreenShading (GUI::ThemeEngine::ShadingStyle)=0
 Applies a whole-screen shading effect, used before opening a new dialog.

Protected Attributes

TransparentSurface_activeSurface
 Pointer to the surface currently being drawn.
FillMode _fillMode
 Defines in which way (if any) are filled the drawn shapes.
ShadowFillMode _shadowFillMode
int _shadowOffset
 offset for drawn shadows
int _bevel
 amount of fake bevel
bool _disableShadows
 Disables temporarily shadow drawing for overlayed images.
int _strokeWidth
 Width of the stroke of all drawn shapes.
uint32 _dynamicData
 Dynamic data from the GUI Theme that modifies the drawing of the current shape.
int _gradientFactor
 Multiplication factor of the active gradient.

Detailed Description

VectorRenderer: The core Vector Renderer Class.

This virtual class exposes the API with all the vectorial rendering functions that may be used to draw on a given Surface.

This class must be instantiated as one of its children, which implement the actual rendering functionality for each Byte Depth / Byte Format combination, and may also contain platform specific code.

When specifying define DISABLE_FANCY_THEMES eye candy related code gets stripped off. This is especially useful for small devices like NDS.

TODO: Expand documentation.

See also:
VectorRendererSpec
VectorRendererAA

Definition at line 110 of file VectorRenderer.h.


Member Enumeration Documentation

Specifies the way in which a shape is filled.

Enumerator:
kFillDisabled 
kFillForeground 
kFillBackground 
kFillGradient 

Definition at line 120 of file VectorRenderer.h.

Enumerator:
kShadowLinear 
kShadowExponential 

Definition at line 135 of file VectorRenderer.h.

Enumerator:
kTriangleAuto 
kTriangleUp 
kTriangleDown 
kTriangleLeft 
kTriangleRight 

Definition at line 127 of file VectorRenderer.h.


Constructor & Destructor Documentation

Graphics::VectorRenderer::VectorRenderer (  )  [inline]

Definition at line 112 of file VectorRenderer.h.

virtual Graphics::VectorRenderer::~VectorRenderer (  )  [inline, virtual]

Definition at line 117 of file VectorRenderer.h.


Member Function Documentation

virtual void Graphics::VectorRenderer::applyScreenShading ( GUI::ThemeEngine::ShadingStyle   )  [pure virtual]

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

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

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::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 
) [pure virtual]
virtual void Graphics::VectorRenderer::blitKeyBitmap ( const Graphics::Surface source,
const Common::Rect r 
) [pure virtual]
virtual void Graphics::VectorRenderer::blitKeyBitmapClip ( const Graphics::Surface source,
const Common::Rect r,
const Common::Rect clipping 
) [pure virtual]
virtual void Graphics::VectorRenderer::blitSubSurface ( const Graphics::Surface source,
const Common::Rect r 
) [pure virtual]

Blits a given graphics surface into a small area of the current drawing surface.

Note that the given surface is expected to be smaller than the active drawing surface, hence the WHOLE source surface will be blitted into the active surface, at the position specified by "r".

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::blitSubSurfaceClip ( const Graphics::Surface source,
const Common::Rect r,
const Common::Rect clipping 
) [pure virtual]
virtual void Graphics::VectorRenderer::blitSurface ( const Graphics::Surface source,
const Common::Rect r 
) [pure 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.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::clearSurface (  )  [inline, virtual]

Clears the active surface.

Definition at line 309 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::copyFrame ( OSystem sys,
const Common::Rect r 
) [pure 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.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::copyWholeFrame ( OSystem sys  )  [pure virtual]

Copies the current surface to the system overlay.

Parameters:
sys Pointer to the global System class

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::disableShadows (  )  [inline, virtual]

Allows to temporarily enable/disable all shadows drawing.

i.e. for performance issues, blitting, etc

Definition at line 523 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::drawBeveledSquare ( int  x,
int  y,
int  w,
int  h,
int  bevel 
) [pure 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.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawBeveledSquareClip ( int  x,
int  y,
int  w,
int  h,
int  bevel,
Common::Rect  clipping 
) [pure virtual]
void Graphics::VectorRenderer::drawCallback_ALPHABITMAP ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 437 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_BEVELSQ ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 419 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_BITMAP ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 431 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_CIRCLE ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

DrawStep callback functions for each drawing feature.

Definition at line 382 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_CROSS ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 443 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_FILLSURFACE ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 409 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_LINE ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 397 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_ROUNDSQ ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 403 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_SQUARE ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 391 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_TAB ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 425 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_TRIANGLE ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 413 of file VectorRenderer.h.

void Graphics::VectorRenderer::drawCallback_VOID ( const Common::Rect area,
const DrawStep step,
const Common::Rect clip 
) [inline]

Definition at line 449 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::drawCircle ( int  x,
int  y,
int  r 
) [pure virtual]

Draws a circle centered at (x,y) with radius r.

Parameters:
x Horizontal (X) coordinate for the center of the circle
y Vertical (Y) coordinate for the center of the circle
r Radius of the circle.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawCircleClip ( int  x,
int  y,
int  r,
Common::Rect  clipping 
) [pure virtual]
virtual void Graphics::VectorRenderer::drawCross ( int  x,
int  y,
int  w,
int  h 
) [inline, virtual]

Simple helper function to draw a cross.

Definition at line 231 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::drawCrossClip ( int  x,
int  y,
int  w,
int  h,
Common::Rect  clipping 
) [inline, virtual]

Definition at line 236 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::drawLine ( int  x1,
int  y1,
int  x2,
int  y2 
) [pure 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

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawLineClip ( int  x1,
int  y1,
int  x2,
int  y2,
Common::Rect  clipping 
) [pure virtual]
virtual void Graphics::VectorRenderer::drawRoundedSquare ( int  x,
int  y,
int  r,
int  w,
int  h 
) [pure virtual]

Draws a rounded square starting at (x,y) with the given width and height.

The corners of the square are rounded with the given radius.

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
r Radius of the corners.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawRoundedSquareClip ( int  x,
int  y,
int  r,
int  w,
int  h,
Common::Rect  clipping 
) [pure virtual]
virtual void Graphics::VectorRenderer::drawSquare ( int  x,
int  y,
int  w,
int  h 
) [pure virtual]

Draws a square starting at (x,y) with the given width and height.

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

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawSquareClip ( int  x,
int  y,
int  w,
int  h,
Common::Rect  clipping 
) [pure virtual]
void Graphics::VectorRenderer::drawStep ( const Common::Rect area,
const DrawStep step,
uint32  extra = 0 
) [virtual]

Draws the specified draw step on the screen.

See also:
DrawStep
Parameters:
area Zone to paint on
step Pointer to a DrawStep struct.

Definition at line 35 of file VectorRenderer.cpp.

void Graphics::VectorRenderer::drawStepClip ( const Common::Rect area,
const Common::Rect clip,
const DrawStep step,
uint32  extra = 0 
) [virtual]

Definition at line 62 of file VectorRenderer.cpp.

virtual void Graphics::VectorRenderer::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 
) [pure virtual]

Draws a string into the screen.

Wrapper for the Graphics::Font string drawing method.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawTab ( int  x,
int  y,
int  r,
int  w,
int  h 
) [pure 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).

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawTabClip ( int  x,
int  y,
int  r,
int  w,
int  h,
Common::Rect  clipping 
) [pure virtual]
virtual void Graphics::VectorRenderer::drawTriangle ( int  x,
int  y,
int  base,
int  height,
TriangleOrientation  orient 
) [pure 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.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::drawTriangleClip ( int  x,
int  y,
int  base,
int  height,
TriangleOrientation  orient,
Common::Rect  clipping 
) [pure virtual]
virtual void Graphics::VectorRenderer::enableShadows (  )  [inline, virtual]

Definition at line 524 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::fillSurface (  )  [pure virtual]

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

Defaults to using the active Foreground color for filling.

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::fillSurfaceClip ( Common::Rect  clipping  )  [pure virtual]
virtual TransparentSurface* Graphics::VectorRenderer::getActiveSurface (  )  [inline, virtual]

Returns the currently active drawing surface.

Definition at line 295 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::setBevel ( int  amount  )  [inline, virtual]

Definition at line 351 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::setBevelColor ( uint8  r,
uint8  g,
uint8  b 
) [pure virtual]
virtual void Graphics::VectorRenderer::setBgColor ( uint8  r,
uint8  g,
uint8  b 
) [pure 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

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::setFgColor ( uint8  r,
uint8  g,
uint8  b 
) [pure 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

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::setFillMode ( FillMode  mode  )  [inline, virtual]

Sets the active fill mode for all shapes.

See also:
VectorRenderer::FillMode
Parameters:
mode Specified fill mode.

Definition at line 320 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::setGradientColors ( uint8  r1,
uint8  g1,
uint8  b1,
uint8  r2,
uint8  g2,
uint8  b2 
) [pure 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

Implemented in Graphics::VectorRendererSpec< PixelType >.

virtual void Graphics::VectorRenderer::setGradientFactor ( int  factor  )  [inline, virtual]

Sets the multiplication factor of the active gradient.

See also:
_gradientFactor
Parameters:
factor Multiplication factor.

Definition at line 362 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::setShadowFillMode ( ShadowFillMode  mode  )  [inline, virtual]

Definition at line 324 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::setShadowOffset ( int  offset  )  [inline, virtual]

Enables adding shadows to all drawn primitives.

Shadows are drawn automatically under the shapes. The given offset controls their intensity and size (the higher the offset, the bigger the shadows). If the offset is 0, no shadows are drawn.

Parameters:
offset Shadow offset.

Definition at line 346 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::setStrokeWidth ( int  width  )  [inline, virtual]

Sets the stroke width.

All shapes drawn with a stroke will have that width. Pass 0 to disable shape stroking.

Parameters:
width Width of the stroke in pixels.

Definition at line 334 of file VectorRenderer.h.

virtual void Graphics::VectorRenderer::setSurface ( TransparentSurface surface  )  [inline, virtual]

Sets the active drawing surface.

All drawing from this point on will be done on that surface.

Parameters:
surface Pointer to a Surface object.

Definition at line 288 of file VectorRenderer.h.

void Graphics::VectorRenderer::stepGetPositions ( const DrawStep step,
const Common::Rect area,
uint16 in_x,
uint16 in_y,
uint16 in_w,
uint16 in_h 
)

Translates the position data inside a DrawStep into actual screen drawing positions.

Definition at line 102 of file VectorRenderer.cpp.

int Graphics::VectorRenderer::stepGetRadius ( const DrawStep step,
const Common::Rect area 
)

Translates the radius data inside a drawstep into the real radius for the shape.

Used for automatic radius calculations.

Definition at line 88 of file VectorRenderer.cpp.


Member Data Documentation

Pointer to the surface currently being drawn.

Definition at line 533 of file VectorRenderer.h.

amount of fake bevel

Definition at line 539 of file VectorRenderer.h.

Disables temporarily shadow drawing for overlayed images.

Definition at line 540 of file VectorRenderer.h.

Dynamic data from the GUI Theme that modifies the drawing of the current shape.

Definition at line 542 of file VectorRenderer.h.

Defines in which way (if any) are filled the drawn shapes.

Definition at line 535 of file VectorRenderer.h.

Multiplication factor of the active gradient.

Definition at line 544 of file VectorRenderer.h.

offset for drawn shadows

Definition at line 538 of file VectorRenderer.h.

Width of the stroke of all drawn shapes.

Definition at line 541 of file VectorRenderer.h.


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


Generated on Sat Jul 20 2019 05:02:56 for ResidualVM by doxygen 1.7.1
curved edge   curved edge