DrawablePath Class Reference

Inheritance diagram for DrawablePath:

Drawable List of all members.

Detailed Description

A drawable object which renders a filled or outlined shape.

See also:
Drawable


Public Member Functions

 DrawablePath ()
 Creates a DrawablePath.
virtual ~DrawablePath ()
 Destructor.
void setPath (const Path &newPath)
 Changes the path that will be drawn.
const PathgetPath () const throw ()
 Returns the current path.
void setSolidFill (const Colour &newColour)
 Sets a colour to fill the path with.
void setFillBrush (const Brush &newBrush)
 Sets a custom brush to use to fill the path.
BrushgetCurrentBrush () const throw ()
 Returns the brush currently being used to fill the shape.
void setOutline (const float thickness, const Colour &outlineColour)
 Changes the properties of the outline that will be drawn around the path.
void setOutline (const PathStrokeType &strokeType, const Brush &strokeBrush)
 Changes the properties of the outline that will be drawn around the path.
const PathStrokeTypegetOutlineStroke () const throw ()
 Returns the current outline style.
BrushgetOutlineBrush () const throw ()
 Returns the brush currently being used to draw the outline.
void draw (Graphics &g, const AffineTransform &transform) const
void getBounds (float &x, float &y, float &width, float &height) const
bool hitTest (float x, float y) const
DrawablecreateCopy () const


Constructor & Destructor Documentation

DrawablePath::DrawablePath  ) 
 

Creates a DrawablePath.

virtual DrawablePath::~DrawablePath  )  [virtual]
 

Destructor.


Member Function Documentation

void DrawablePath::setPath const Path newPath  ) 
 

Changes the path that will be drawn.

See also:
setSolidFill, setOutline

const Path& DrawablePath::getPath  )  const throw ()
 

Returns the current path.

void DrawablePath::setSolidFill const Colour newColour  ) 
 

Sets a colour to fill the path with.

This colour is used to fill the path - if you don't want the path to be filled (e.g. if you're just drawing an outline), set this colour to be transparent.

See also:
setPath, setOutline

void DrawablePath::setFillBrush const Brush newBrush  ) 
 

Sets a custom brush to use to fill the path.

See also:
setSolidFill

Brush* DrawablePath::getCurrentBrush  )  const throw ()
 

Returns the brush currently being used to fill the shape.

void DrawablePath::setOutline const float  thickness,
const Colour outlineColour
 

Changes the properties of the outline that will be drawn around the path.

If the thickness value is 0, no outline will be drawn. If one is drawn, the colour passed-in here will be used for it.

See also:
setPath, setSolidFill

void DrawablePath::setOutline const PathStrokeType strokeType,
const Brush strokeBrush
 

Changes the properties of the outline that will be drawn around the path.

If the stroke type has 0 thickness, no outline will be drawn.

See also:
setPath, setSolidFill

const PathStrokeType& DrawablePath::getOutlineStroke  )  const throw ()
 

Returns the current outline style.

Brush* DrawablePath::getOutlineBrush  )  const throw ()
 

Returns the brush currently being used to draw the outline.

void DrawablePath::draw Graphics g,
const AffineTransform transform
const [virtual]
 

For internal use only.

Implements Drawable.

void DrawablePath::getBounds float &  x,
float &  y,
float &  width,
float &  height
const [virtual]
 

For internal use only.

Implements Drawable.

bool DrawablePath::hitTest float  x,
float  y
const [virtual]
 

For internal use only.

Implements Drawable.

Drawable* DrawablePath::createCopy  )  const [virtual]
 

For internal use only.

Implements Drawable.


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