dg2d.pathiterator

This module provides path iterator related stuff.

Members

Functions

append
auto append(T path0, P path1)

Append two paths

boundingBox
auto boundingBox(T path)

Calculate the bounding box of path.

centerOf
auto centerOf(T path)

Calculate center of path.

offset
auto offset(T path, Scalar x, Scalar y)

Offset the path by x,y.

retro
auto retro(T path)

The path in reverse.

rotate
auto rotate(T path, Scalar angle)

Rotate the path around (0,0)

rotate
auto rotate(T path, Scalar pivot_x, Scalar pivot_y, Scalar angle)

Rotate path around (x,y)

scale
auto scale(T path, F sx, F sy)

Scale the path by sx,sy

scale
auto scale(T path, F sx, F sy, F focus_x, F focus_y)

Scale the path by sx,sy relative to focus_x,focus_y

segments
auto segments(T path)

Iterate the path one command / segment at a time.

slice
auto slice(T path, size_t from, size_t to)

Returns a PathIterator slice of pathfrom..to.

Variables

isPathIterator
enum bool isPathIterator(T);

Returns true if T is a PathIterator. Not exactly an iterator in traditional sense, its an array like API but you still use it to iterate over the path.

Meta

License

Boost Software License, Version 1.0

Authors

Chris Jones