cairomm 1.19.0
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  const_iterator
 A custom const_iterator for iterating over a Path. More...
 
class  Element
 A single element of 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
 
Pathoperator= (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.
 
cobjectcobj ()
 
const cobjectcobj () const
 

Protected Attributes

cobjectm_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

Member Enumeration Documentation

◆ ElementType

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.

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: