Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::Fill Class Reference

The Fill class is a high level class used to fill in a Path. More...

#include <vcf/GraphicsKit/Fill.h>

Inheritance diagram for VCF::Fill:

VCF::Interface VCF::BasicFill VCF::GradientFill VCF::ShadowFill VCF::ConicGradientFill VCF::HorizontalGradientFill VCF::RadialGradientFill VCF::VerticalGradientFill List of all members.

Public Member Functions

virtual ~Fill ()
virtual void setContext (GraphicsContext *context)=0
 sets the context for the fill.
virtual void render (Path *path)=0
 renders the fill using the current path.

Detailed Description

The Fill class is a high level class used to fill in a Path.

A fill is set on the current graphics context, and then a path is drawn.

Fill* myFill = new MyFill();
GraphicsContext* ctx = getSomeGraphiceContext();//imaginary function to get a graphics context

Path* path = getSomePath();//imaginary function to get a path

//sets the fill
ctx->setCurrrentFill( myFill );

//draws the path!
ctx->draw( path );

delete myFill;
delete path;

See the StrokesAndFills example (in vcf/examples/StrokesAndFills ) for a more complete example of this.

The interface is quite simple, and more concrete details are completely up to the implement of the interface.

See also:
BasicFill

GraphicsContext

Path


Constructor & Destructor Documentation

virtual VCF::Fill::~Fill  )  [inline, virtual]
 


Member Function Documentation

virtual void VCF::Fill::render Path path  )  [pure virtual]
 

renders the fill using the current path.

The fill can retrieve the points for the path by calling either Path::getPoints() or Path::flattenPoints().

Implemented in VCF::BasicFill, VCF::GradientFill, and VCF::ShadowFill.

virtual void VCF::Fill::setContext GraphicsContext context  )  [pure virtual]
 

sets the context for the fill.

The GraphicsContext will call this when the GraphicsContext::setCurrrentFill() method is called.

Implemented in VCF::BasicFill, VCF::GradientFill, and VCF::ShadowFill.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information