cairomm: Cairo::Path Class Reference

cairomm 1.19.1

Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
Cairo::Path Class Reference

A data structure for holding a path. More...

`#include <cairomm/path.h>`

## Classes
class | Element
| A single element of a path. More...
class | const_iterator
| A custom const_iterator for iterating over a Path. More...

## Public Types
enum class | ElementType { MOVE_TO = CAIRO_PATH_MOVE_TO , LINE_TO = CAIRO_PATH_LINE_TO , CURVE_TO = CAIRO_PATH_CURVE_TO , CLOSE_PATH = CAIRO_PATH_CLOSE_PATH }
| Describes the type of one portion of a path when represented as a Path::Element. More...
using | cobject = cairo_path_t

## Public Member Functions
| Path (cairo_path_t *cobject, bool take_ownership=false)
| Path (const Path &)=delete
Path & | operator= (const Path &)=delete
virtual | ~Path ()
const_iterator | begin () const
| Returns a const_iterator pointing to the first Element of the Path.
const_iterator | cbegin () const
| Returns a const_iterator pointing to the first Element of the Path.
const_iterator | end () const
| Returns a const_iterator that is one past the last Element of the Path.
const_iterator | cend () const
| Returns a const_iterator that is one past the last Element of the Path.
cobject * | cobj ()
const cobject * | cobj () const

## Protected Attributes
cobject * | m_cobject

## Detailed Description

A data structure for holding a path.

Use Context::copy_path2() or Context::copy_path_flat2() to instantiate a new Path.

If you use the deprecated Context::copy_path() or Context::copy_path_flat() to instantiate a new Path, the application is responsible for freeing the Path object when it is no longer needed.

To access the path data, use begin() and end() or cbegin() and cend() to iterate through the Path Elements

See also
  Path::Element, Path::const_iterator

## Member Typedef Documentation

## ◆ cobject

using Cairo::Path::cobject = cairo_path_t

## Member Enumeration Documentation

## ◆ ElementType

enum class Cairo::Path::ElementType
| strong

Describes the type of one portion of a path when represented as a Path::Element.

See also
  Path::Element

Since cairomm 1.20

Enumerator
MOVE_TO | A move-to operation.
LINE_TO | A line-to operation.
CURVE_TO | A curve-to operation.
CLOSE_PATH | A close-path operation.

Examples
  path-iter.cc.

## Constructor & Destructor Documentation

## ◆ Path() [1/2]

Cairo::Path::Path | ( | cairo_path_t * | cobject,
|  | bool | take_ownership = false )
| explicit

## ◆ Path() [2/2]

Cairo::Path::Path | ( | const Path & |  | ) |
| delete

## ◆ ~Path()

virtual Cairo::Path::~Path | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ begin()

const_iterator Cairo::Path::begin | ( |  | ) | const
| inline

Returns a const_iterator pointing to the first Element of the Path.

Since cairomm 1.20

## ◆ cbegin()

const_iterator Cairo::Path::cbegin | ( |  | ) | const
| inline

Returns a const_iterator pointing to the first Element of the Path.

Since cairomm 1.20

## ◆ cend()

const_iterator Cairo::Path::cend | ( |  | ) | const
| inline

Returns a const_iterator that is one past the last Element of the Path.

Since cairomm 1.20

## ◆ cobj() [1/2]

cobject * Cairo::Path::cobj | ( |  | ) |
| inline

## ◆ cobj() [2/2]

const cobject * Cairo::Path::cobj | ( |  | ) | const
| inline

## ◆ end()

const_iterator Cairo::Path::end | ( |  | ) | const
| inline

Returns a const_iterator that is one past the last Element of the Path.

Since cairomm 1.20

## ◆ operator=()

Path & Cairo::Path::operator= | ( | const Path & |  | ) |
| delete

## Member Data Documentation

## ◆ m_cobject

cobject* Cairo::Path::m_cobject
| protected

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

- cairomm/path.h