A single element of a path.
More...
#include <cairomm/path.h>
|
| struct | Point |
| | A simple structure for holding an X and Y coordinate pair. More...
|
|
| using | cobject = cairo_path_data_t |
| | The base C cairo type.
|
|
| | Element (cobject * pData) |
| cobject * | cobj () |
| | Get a pointer to the base cairo type.
|
| const cobject * | cobj () const |
| | Get a const pointer to the base cairo type.
|
| Point | operator[] (unsigned int idx) const |
| | You can access the datapoints that make up a path Element by using array notation.
|
| unsigned int | size () const |
| | Get the number of points in this path element.
|
| ElementType | type () const |
| | Gets the type of element for this path element.
|
A single element of a path.
Each element has a 'type', which determines how many Points are contained in this element. Use the subscript operator[] to access the sub-points.
Most people will rarely need access to the underlying path data, so this will not be needed very often.
- Since cairomm 1.20
- Examples
- path-iter.cc.
◆ cobject
◆ Element()
| Cairo::Path::Element::Element |
( |
cobject * | pData | ) |
|
◆ cobj() [1/2]
| cobject * Cairo::Path::Element::cobj |
( |
| ) |
|
|
inline |
Get a pointer to the base cairo type.
◆ cobj() [2/2]
| const cobject * Cairo::Path::Element::cobj |
( |
| ) |
const |
|
inline |
Get a const pointer to the base cairo type.
◆ operator[]()
| Point Cairo::Path::Element::operator[] |
( |
unsigned int | idx | ) |
const |
You can access the datapoints that make up a path Element by using array notation.
The index is zero-based, so element[0] gives you the first point.
- Exceptions
-
◆ size()
| unsigned int Cairo::Path::Element::size |
( |
| ) |
const |
Get the number of points in this path element.
This is tightly coupled with the type of Path Element that it is. MOVE_TO and LINE_TO both have a single data point, CURVE_TO has three data points, and CLOSE_PATH has none.
- Examples
- path-iter.cc.
◆ type()
Gets the type of element for this path element.
- Examples
- path-iter.cc.
◆ m_cobject
| cobject* Cairo::Path::Element::m_cobject |
|
protected |
The documentation for this class was generated from the following file: