ASPiK SDK
VSTGUI::CGraphicsPath Class Referenceabstract

Graphics Path Object. More...

#include <cgraphicspath.h>

Inheritance diagram for VSTGUI::CGraphicsPath:
VSTGUI::ReferenceCounted< T > VSTGUI::IReference VSTGUI::Cairo::Path

Public Member Functions

Creating gradients
virtual CGradientcreateGradient (double color1Start, double color2Start, const CColor &color1, const CColor &color2)=0
 creates a new gradient object, you must release it with forget() when you're done with it More...
 
Adding Elements
virtual void addArc (const CRect &rect, double startAngle, double endAngle, bool clockwise)
 
virtual void addEllipse (const CRect &rect)
 
virtual void addRect (const CRect &rect)
 
virtual void addPath (const CGraphicsPath &path, CGraphicsTransform *transformation=nullptr)
 
virtual void addLine (const CPoint &to)
 
virtual void addBezierCurve (const CPoint &control1, const CPoint &control2, const CPoint &end)
 
virtual void beginSubpath (const CPoint &start)
 
virtual void closeSubpath ()
 
void beginSubpath (CCoord x, CCoord y)
 
void addLine (CCoord x, CCoord y)
 
void addBezierCurve (CCoord cp1x, CCoord cp1y, CCoord cp2x, CCoord cp2y, CCoord x, CCoord y)
 
Helpers
void addRoundRect (const CRect &size, CCoord radius)
 
Hit Testing
virtual bool hitTest (const CPoint &p, bool evenOddFilled=false, CGraphicsTransform *transform=nullptr)=0
 
States
virtual CPoint getCurrentPosition ()=0
 
virtual CRect getBoundingBox ()=0
 
- Public Member Functions inherited from VSTGUI::ReferenceCounted< T >
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
void forget () override
 decrease refcount and delete object if refcount == 0
 
void remember () override
 increase refcount
 
virtual int32_t getNbReference () const
 get refcount
 
virtual void beforeDelete ()
 

Protected Types

using ElementList = std::vector< Element >
 

Protected Member Functions

virtual void dirty ()=0
 platform object should be released
 

Protected Attributes

ElementList elements
 

Detailed Description

Graphics Path Object.

Member Function Documentation

◆ addArc()

void VSTGUI::CGraphicsPath::addArc ( const CRect rect,
double  startAngle,
double  endAngle,
bool  clockwise 
)
virtual

add an arc to the path. Begins a new subpath if no elements were added before.

◆ addBezierCurve()

void VSTGUI::CGraphicsPath::addBezierCurve ( const CPoint control1,
const CPoint control2,
const CPoint end 
)
virtual

add a bezier curve to the path. A subpath must begin before

◆ addEllipse()

void VSTGUI::CGraphicsPath::addEllipse ( const CRect rect)
virtual

add an ellipse to the path. Begins a new subpath if no elements were added before.

◆ addLine()

void VSTGUI::CGraphicsPath::addLine ( const CPoint to)
virtual

add a line to the path. A subpath must begin before

◆ addPath()

void VSTGUI::CGraphicsPath::addPath ( const CGraphicsPath path,
CGraphicsTransform transformation = nullptr 
)
virtual

add another path to the path. Begins a new subpath if no elements were added before.

◆ addRect()

void VSTGUI::CGraphicsPath::addRect ( const CRect rect)
virtual

add a rectangle to the path. Begins a new subpath if no elements were added before.

◆ beginSubpath()

void VSTGUI::CGraphicsPath::beginSubpath ( const CPoint start)
virtual

begin a new subpath.

◆ closeSubpath()

void VSTGUI::CGraphicsPath::closeSubpath ( )
virtual

close a subpath. A straight line will be added from the current point to the start point.

◆ createGradient()

virtual CGradient* VSTGUI::CGraphicsPath::createGradient ( double  color1Start,
double  color2Start,
const CColor color1,
const CColor color2 
)
pure virtual

creates a new gradient object, you must release it with forget() when you're done with it

Parameters
color1Startvalue between zero and one which defines the normalized start offset for color1
color2Startvalue between zero and one which defines the normalized start offset for color2
color1the first color of the gradient
color2the second color of the gradient
Returns
a new gradient object

Implemented in VSTGUI::Cairo::Path.


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