NovaSVG 0.10.0
A header-only SVG library
Loading...
Searching...
No Matches
novasvg::Path Class Reference

#include <canvas.h>

Public Member Functions

 Path ()=default
 
 Path (const Path &path)
 
 Path (Path &&path)
 
 ~Path ()
 
Path & operator= (const Path &path)
 
Path & operator= (Path &&path)
 
void swap (Path &path)
 
void moveTo (float x, float y)
 
void lineTo (float x, float y)
 
void quadTo (float x1, float y1, float x2, float y2)
 
void cubicTo (float x1, float y1, float x2, float y2, float x3, float y3)
 
void arcTo (float rx, float ry, float xAxisRotation, bool largeArcFlag, bool sweepFlag, float x, float y)
 
void close ()
 
void addEllipse (float cx, float cy, float rx, float ry)
 
void addRoundRect (float x, float y, float w, float h, float rx, float ry)
 
void addRect (float x, float y, float w, float h)
 
void addEllipse (const Point &center, const Size &radii)
 
void addRoundRect (const Rect &rect, const Size &radii)
 
void addRect (const Rect &rect)
 
void reset ()
 
Rect boundingRect () const
 
bool isEmpty () const
 
bool isUnique () const
 
bool isNull () const
 
path_t * data () const
 
bool parse (const char *data, size_t length)
 

Detailed Description

Definition at line 313 of file canvas.h.

Constructor & Destructor Documentation

◆ Path() [1/3]

novasvg::Path::Path ( )
default

Referenced by operator=(), and operator=().

◆ Path() [2/3]

NOVASVG_INLINE novasvg::Path::Path ( const Path &  path)

Definition at line 722 of file canvas.h.

◆ Path() [3/3]

NOVASVG_INLINE novasvg::Path::Path ( Path &&  path)

Definition at line 727 of file canvas.h.

◆ ~Path()

NOVASVG_INLINE novasvg::Path::~Path ( )

Definition at line 732 of file canvas.h.

References novasvg::render::path_destroy().

Member Function Documentation

◆ addEllipse() [1/2]

NOVASVG_INLINE void novasvg::Path::addEllipse ( const Point &  center,
const Size &  radii 
)

◆ addEllipse() [2/2]

NOVASVG_INLINE void novasvg::Path::addEllipse ( float  cx,
float  cy,
float  rx,
float  ry 
)

Definition at line 779 of file canvas.h.

References novasvg::render::path_add_ellipse().

Referenced by addEllipse().

◆ addRect() [1/2]

NOVASVG_INLINE void novasvg::Path::addRect ( const Rect &  rect)

◆ addRect() [2/2]

NOVASVG_INLINE void novasvg::Path::addRect ( float  x,
float  y,
float  w,
float  h 
)

Definition at line 789 of file canvas.h.

References novasvg::render::path_add_rect().

Referenced by addRect(), and novasvg::ForeignObjectSimple::render().

◆ addRoundRect() [1/2]

NOVASVG_INLINE void novasvg::Path::addRoundRect ( const Rect &  rect,
const Size &  radii 
)

◆ addRoundRect() [2/2]

NOVASVG_INLINE void novasvg::Path::addRoundRect ( float  x,
float  y,
float  w,
float  h,
float  rx,
float  ry 
)

Definition at line 784 of file canvas.h.

References novasvg::render::path_add_round_rect().

Referenced by addRoundRect().

◆ arcTo()

NOVASVG_INLINE void novasvg::Path::arcTo ( float  rx,
float  ry,
float  xAxisRotation,
bool  largeArcFlag,
bool  sweepFlag,
float  x,
float  y 
)

Definition at line 769 of file canvas.h.

References NOVASVG_DEG2RAD, and novasvg::render::path_arc_to().

◆ boundingRect()

NOVASVG_INLINE Rect novasvg::Path::boundingRect ( ) const

Definition at line 821 of file canvas.h.

References novasvg::Rect::Empty, and novasvg::render::path_extents().

◆ close()

NOVASVG_INLINE void novasvg::Path::close ( )

Definition at line 774 of file canvas.h.

References novasvg::render::path_close().

◆ cubicTo()

NOVASVG_INLINE void novasvg::Path::cubicTo ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3 
)

Definition at line 764 of file canvas.h.

References novasvg::render::path_cubic_to().

◆ data()

path_t * novasvg::Path::data ( ) const
inline

Definition at line 346 of file canvas.h.

Referenced by parse().

◆ isEmpty()

NOVASVG_INLINE bool novasvg::Path::isEmpty ( ) const

◆ isNull()

bool novasvg::Path::isNull ( ) const
inline

Definition at line 345 of file canvas.h.

◆ isUnique()

NOVASVG_INLINE bool novasvg::Path::isUnique ( ) const

Definition at line 837 of file canvas.h.

References novasvg::render::path_get_reference_count().

Referenced by reset().

◆ lineTo()

NOVASVG_INLINE void novasvg::Path::lineTo ( float  x,
float  y 
)

Definition at line 754 of file canvas.h.

References novasvg::render::path_line_to().

◆ moveTo()

NOVASVG_INLINE void novasvg::Path::moveTo ( float  x,
float  y 
)

Definition at line 749 of file canvas.h.

References novasvg::render::path_move_to().

◆ operator=() [1/2]

NOVASVG_INLINE Path & novasvg::Path::operator= ( const Path &  path)

Definition at line 737 of file canvas.h.

References Path(), and swap().

◆ operator=() [2/2]

NOVASVG_INLINE Path & novasvg::Path::operator= ( Path &&  path)

Definition at line 743 of file canvas.h.

References Path(), and swap().

◆ parse()

NOVASVG_INLINE bool novasvg::Path::parse ( const char *  data,
size_t  length 
)

Definition at line 842 of file canvas.h.

References data(), novasvg::render::path_parse(), and novasvg::render::path_reset().

Referenced by novasvg::SVGPath::parse().

◆ quadTo()

NOVASVG_INLINE void novasvg::Path::quadTo ( float  x1,
float  y1,
float  x2,
float  y2 
)

Definition at line 759 of file canvas.h.

References novasvg::render::path_quad_to().

◆ reset()

NOVASVG_INLINE void novasvg::Path::reset ( )

◆ swap()

void novasvg::Path::swap ( Path &  path)
inline

Definition at line 356 of file canvas.h.

Referenced by operator=(), and operator=().


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