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:

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
Constructor & Destructor Documentation
|
|
|
Member Function Documentation
|
|
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. |
|
|
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:
- vcf/GraphicsKit/Fill.h
