clan::Path Class Reference - ClanLib SDK
Description: clan::Path Class Reference

Public Member Functions | Static Public Member Functions | Friends | List of all members
clan::Path Class Reference

`#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.
void | fill_and_stroke (Canvas &canvas, const Pen &pen, const Brush &brush)
| First fills a path, then strokes on top.
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.
void | set_fill_mode (PathFillMode fill_mode)
void | stroke (Canvas &canvas, const Pen &pen)
| Strokes a path.
Path & | transform_self (const Mat3f &transform)
| Transform this path.

## Static Public Member Functions
static Path | circle (const Pointf &center, float radius)
static Path | circle (float center_x, float center_y, float radius)
static Path | ellipse (const Pointf &center, const Sizef &radius)
static Path | ellipse (float center_x, float center_y, float radius_x, float radius_y)
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 (const Rectf &box, const clan::Sizef &corner)
static Path | rect (float x, float y, float width, float height)

## Friends
class | CanvasImpl

## Constructor & Destructor Documentation

## ◆ Path()

clan::Path::Path | ( |  | ) |

Referenced by circle(), circle(), clone(), ellipse(), ellipse(), glyph(), line(), line(), operator+=(), rect(), rect(), rect(), and transform_self().

## Member Function Documentation

## ◆ bezier_to() [1/2]

void clan::Path::bezier_to | ( | const Pointf & | control,
|  | const Pointf & | point )

References clan::point.

## ◆ bezier_to() [2/2]

void clan::Path::bezier_to | ( | const Pointf & | control1,
|  | const Pointf & | control2,
|  | const Pointf & | point )

References clan::point.

## ◆ circle() [1/2]

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

References Path(), clan::center, and ellipse().

## ◆ circle() [2/2]

Path clan::Path::circle | ( | float | center_x,
|  | float | center_y,
|  | float | radius )
| inlinestatic

References Path(), and ellipse().

## ◆ clone()

Path clan::Path::clone | ( |  | ) | const

References Path().

## ◆ close()

void clan::Path::close | ( |  | ) |

## ◆ ellipse() [1/2]

Path clan::Path::ellipse | ( | const Pointf & | center,
|  | const Sizef & | radius )
| static

References Path(), and clan::center.

## ◆ ellipse() [2/2]

Path clan::Path::ellipse | ( | float | center_x,
|  | float | center_y,
|  | float | radius_x,
|  | float | radius_y )
| inlinestatic

References Path(), and ellipse().

Referenced by circle(), circle(), and ellipse().

## ◆ fill()

void clan::Path::fill | ( | Canvas & | canvas,
|  | const Brush & | brush )

Fills a path.

## ◆ fill_and_stroke()

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

First fills a path, then strokes on top.

## ◆ get_impl()

std::shared_ptr< PathImpl > clan::Path::get_impl | ( |  | ) | const
| inline

## ◆ glyph()

Path clan::Path::glyph | ( | Canvas & | canvas,
|  | Font & | font,
|  | unsigned int | glyph,
|  | GlyphMetrics & | out_metrics )
| static

References Path(), and glyph().

Referenced by glyph().

## ◆ line() [1/2]

Path clan::Path::line | ( | const Pointf & | start,
|  | const Pointf & | end )
| static

References Path(), and clan::end.

Referenced by line().

## ◆ line() [2/2]

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

References Path(), and line().

## ◆ line_to() [1/2]

void clan::Path::line_to | ( | const Pointf & | point | ) |

References clan::point.

## ◆ line_to() [2/2]

void clan::Path::line_to | ( | float | x,
|  | float | y )
| inline

References line_to(), clan::x, and clan::y.

Referenced by line_to().

## ◆ move_to() [1/2]

void clan::Path::move_to | ( | const Pointf & | point | ) |

References clan::point.

## ◆ move_to() [2/2]

void clan::Path::move_to | ( | float | x,
|  | float | y )
| inline

References move_to(), clan::x, and clan::y.

Referenced by move_to().

## ◆ operator+=()

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

+= operator to concatenate a path onto this path.

Useful when manually building complex paths from primitives

References Path(), and clan::path.

## ◆ rect() [1/3]

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

References Path().

Referenced by rect().

## ◆ rect() [2/3]

Path clan::Path::rect | ( | const Rectf & | box,
|  | const clan::Sizef & | corner )
| static

References Path().

## ◆ rect() [3/3]

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

References Path(), rect(), clan::x, and clan::y.

## ◆ set_fill_mode()

void clan::Path::set_fill_mode | ( | PathFillMode | fill_mode | ) |

## ◆ stroke()

void clan::Path::stroke | ( | Canvas & | canvas,
|  | const Pen & | pen )

Strokes a path.

## ◆ transform_self()

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

References Path().

## Friends And Related Symbol Documentation

## ◆ CanvasImpl

friend class CanvasImpl
| friend

References CanvasImpl.

Referenced by CanvasImpl.

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

- path.h