libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
Art::Paperback::Graphics::Canvas::Path Class Reference

Path construction class. More...

#include <art/paperback/graphics/canvas.hxx>

Public Types

enum  Paint_mode { stroke , fill , fill_then_stroke }
 Paint mode enumeration. More...
 

Public Member Functions

 Path (Canvas &, Paint_mode)
 Constructor.
 
 ~Path () noexcept
 Destructor.
 
Canvascanvas ()
 Access parent canvas.
 
Canvas const & canvas () const
 Access parent canvas.
 
void move_to (double, double)
 Move starting point.
 
void line_to (double, double)
 Draw line.
 
void bezier_curve_to (double, double, double, double, double, double)
 Draw bezier curve.
 

Private Member Functions

 Path (Path const &)=delete
 
 Path (Path &&)=delete
 
Pathoperator= (Path const &)=delete
 
Pathoperator= (Path &&)=delete
 

Private Attributes

Canvas_canvas
 
Paint_mode _mode
 

Detailed Description

Path construction class.

Todo
Add example.

Member Enumeration Documentation

◆ Paint_mode

Paint mode enumeration.

Enumerator
stroke 

Stroke.

fill 

Fill.

fill_then_stroke 

Fill then stroke.

Constructor & Destructor Documentation

◆ Path()

Art::Paperback::Graphics::Canvas::Path::Path ( Canvas & canvas,
Paint_mode mode )

Constructor.

Parameters
canvasThe parent canvas.
modeThe paint mode.

◆ ~Path()

Art::Paperback::Graphics::Canvas::Path::~Path ( )
noexcept

Destructor.

Member Function Documentation

◆ canvas() [1/2]

Canvas & Art::Paperback::Graphics::Canvas::Path::canvas ( )

Access parent canvas.

Returns
Returns a reference to the parent canvas.

◆ canvas() [2/2]

Canvas const & Art::Paperback::Graphics::Canvas::Path::canvas ( ) const

Access parent canvas.

Returns
Returns a reference to the parent canvas.

◆ move_to()

void Art::Paperback::Graphics::Canvas::Path::move_to ( double x,
double y )

Move starting point.

◆ line_to()

void Art::Paperback::Graphics::Canvas::Path::line_to ( double x,
double y )

Draw line.

◆ bezier_curve_to()

void Art::Paperback::Graphics::Canvas::Path::bezier_curve_to ( double x1,
double y1,
double x2,
double y2,
double x3,
double y3 )

Draw bezier curve.