#include <path.h>

Public Member Functions

 Path ()
 
void bezier_to (const Pointf &control, const Pointf &point)
 
void bezier_to (const Pointf &control1, const Pointf &control2, const Pointf &point)
 
Path clone () const
 
void close ()
 
void fill (Canvas &canvas, const Brush &brush)
 Fills a path. More...
 
void fill_and_stroke (Canvas &canvas, const Pen &pen, const Brush &brush)
 First fills a path, then strokes on top. More...
 
std::shared_ptr< PathImpl > get_impl () const
 
void line_to (const Pointf &point)
 
void line_to (float x, float y)
 
void move_to (const Pointf &point)
 
void move_to (float x, float y)
 
void operator+= (const Path &path)
 += operator to concatenate a path onto this path. More...
 
void set_fill_mode (PathFillMode fill_mode)
 
void stroke (Canvas &canvas, const Pen &pen)
 Strokes a path. More...
 
Pathtransform_self (const Mat3f &transform)
 Transform this path. More...
 

Static Public Member Functions

static Path circle (float center_x, float center_y, float radius)
 
static Path circle (const Pointf &center, float radius)
 
static Path ellipse (float center_x, float center_y, float radius_x, float radius_y)
 
static Path ellipse (const Pointf &center, const Sizef &radius)
 
static Path glyph (Canvas &canvas, Font &font, unsigned int glyph, GlyphMetrics &out_metrics)
 
static Path line (const Pointf &start, const Pointf &end)
 
static Path line (float x1, float y1, float x2, float y2)
 
static Path rect (const Rectf &box)
 
static Path rect (float x, float y, float width, float height)
 
static Path rect (const Rectf &box, const clan::Sizef &corner)
 

Friends

class CanvasImpl
 

Constructor & Destructor Documentation

clan::Path::Path ( )

Member Function Documentation

void clan::Path::bezier_to ( const Pointf control,
const Pointf point 
)
void clan::Path::bezier_to ( const Pointf control1,
const Pointf control2,
const Pointf point 
)
static Path clan::Path::circle ( float  center_x,
float  center_y,
float  radius 
)
inlinestatic

References ellipse().

static Path clan::Path::circle ( const Pointf center,
float  radius 
)
inlinestatic

References ellipse().

Path clan::Path::clone ( ) const
void clan::Path::close ( )
static Path clan::Path::ellipse ( float  center_x,
float  center_y,
float  radius_x,
float  radius_y 
)
inlinestatic

Referenced by circle().

static Path clan::Path::ellipse ( const Pointf center,
const Sizef radius 
)
static
void clan::Path::fill ( Canvas canvas,
const Brush brush 
)

Fills a path.

void clan::Path::fill_and_stroke ( Canvas canvas,
const Pen pen,
const Brush brush 
)

First fills a path, then strokes on top.

std::shared_ptr<PathImpl> clan::Path::get_impl ( ) const
inline
static Path clan::Path::glyph ( Canvas canvas,
Font font,
unsigned int  glyph,
GlyphMetrics out_metrics 
)
static
static Path clan::Path::line ( const Pointf start,
const Pointf end 
)
static

Referenced by line().

static Path clan::Path::line ( float  x1,
float  y1,
float  x2,
float  y2 
)
inlinestatic

References line().

void clan::Path::line_to ( const Pointf point)
void clan::Path::line_to ( float  x,
float  y 
)
inline

References line_to().

Referenced by line_to().

void clan::Path::move_to ( const Pointf point)
void clan::Path::move_to ( float  x,
float  y 
)
inline

References move_to().

Referenced by move_to().

void clan::Path::operator+= ( const Path path)

+= operator to concatenate a path onto this path.

Useful when manually building complex paths from primitives

static Path clan::Path::rect ( const Rectf box)
static

Referenced by rect().

static Path clan::Path::rect ( float  x,
float  y,
float  width,
float  height 
)
inlinestatic

References rect().

static Path clan::Path::rect ( const Rectf box,
const clan::Sizef corner 
)
static
void clan::Path::set_fill_mode ( PathFillMode  fill_mode)
void clan::Path::stroke ( Canvas canvas,
const Pen pen 
)

Strokes a path.

Path& clan::Path::transform_self ( const Mat3f transform)

Transform this path.

Useful when manually building complex paths from primitives

Parameters
transform= Transform matrix
Returns
reference to this object

Friends And Related Function Documentation

friend class CanvasImpl
friend

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