CUGL 2.1
Cornell University Game Library
|
#include <CUPathFactory.h>
Public Member Functions | |
PathFactory () | |
PathFactory (float tol) | |
float | getTolerance () const |
void | setTolerance (float tol) |
Path2 | makeLine (const Vec2 origin, const Vec2 dest) const |
Path2 | makeLine (float ox, float oy, float dx, float dy) const |
Path2 * | makeLine (Path2 *path, const Vec2 origin, const Vec2 dest) const |
Path2 * | makeLine (Path2 *path, float ox, float oy, float dx, float dy) const |
Path2 | makeTriangle (const Vec2 a, const Vec2 b, const Vec2 c) const |
Path2 | makeTriangle (float ax, float ay, float bx, float by, float cx, float cy) const |
Path2 * | makeTriangle (Path2 *path, const Vec2 a, const Vec2 b, const Vec2 c) const |
Path2 * | makeTriangle (Path2 *path, float ax, float ay, float bx, float by, float cx, float cy) const |
Path2 | makeRect (const Vec2 origin, const Vec2 size) const |
Path2 | makeRect (const Rect rect) const |
Path2 | makeRect (float x, float y, float w, float h) const |
Path2 * | makeRect (Path2 *path, const Vec2 origin, const Vec2 size) const |
Path2 * | makeRect (Path2 *path, const Rect rect) const |
Path2 * | makeRect (Path2 *path, float x, float y, float w, float h) const |
Path2 | makeNgon (const Vec2 center, float radius, Uint32 sides) const |
Path2 | makeNgon (float cx, float cy, float radius, Uint32 sides) const |
Path2 * | makeNgon (Path2 *path, const Vec2 center, float radius, float sides) const |
Path2 * | makeNgon (Path2 *path, float cx, float cy, float radius, Uint32 sides) const |
Path2 | makeEllipse (const Vec2 center, const Vec2 size) const |
Path2 | makeEllipse (float cx, float cy, float sx, float sy) const |
Path2 * | makeEllipse (Path2 *path, const Vec2 center, const Vec2 size) const |
Path2 * | makeEllipse (Path2 *path, float cx, float cy, float sx, float sy) const |
Path2 | makeCircle (const Vec2 center, float radius) const |
Path2 | makeCircle (float cx, float cy, float radius) const |
Path2 * | makeCircle (Path2 *path, const Vec2 center, float radius) const |
Path2 * | makeCircle (Path2 *path, float cx, float cy, float radius) const |
Path2 | makeArc (const Vec2 center, float radius, float start, float degrees) const |
Path2 | makeArc (float cx, float cy, float radius, float start, float degrees) const |
Path2 * | makeArc (Path2 *path, const Vec2 center, float radius, float start, float degrees) const |
Path2 * | makeArc (Path2 *path, float cx, float cy, float radius, float start, float degrees) const |
Path2 | makeRoundedRect (const Vec2 origin, const Size size, float radius) const |
Path2 | makeRoundedRect (const Rect rect, float radius) const |
Path2 | makeRoundedRect (float x, float y, float w, float h, float r) const |
Path2 * | makeRoundedRect (Path2 *path, const Vec2 origin, const Size size, float radius) const |
Path2 * | makeRoundedRect (Path2 *path, const Rect rect, float radius) const |
Path2 * | makeRoundedRect (Path2 *path, float x, float y, float w, float h, float r) const |
Path2 | makeCapsule (const Vec2 origin, const Size size) const |
Path2 | makeCapsule (const Rect rect) const |
Path2 | makeCapsule (float x, float y, float w, float h) const |
Path2 * | makeCapsule (Path2 *path, const Vec2 origin, const Size size) const |
Path2 * | makeCapsule (Path2 *path, const Rect rect) const |
Path2 * | makeCapsule (Path2 *path, float x, float y, float w, float h) const |
Path2 | makeCapsule (poly2::Capsule shape, const Vec2 origin, const Size size) const |
Path2 | makeCapsule (poly2::Capsule shape, const Rect rect) const |
Path2 | makeCapsule (poly2::Capsule shape, float x, float y, float w, float h) const |
Path2 * | makeCapsule (Path2 *path, poly2::Capsule shape, const Vec2 origin, const Size size) const |
Path2 * | makeCapsule (Path2 *path, poly2::Capsule shape, const Rect rect) const |
Path2 * | makeCapsule (Path2 *path, poly2::Capsule shape, float x, float y, float w, float h) const |
std::vector< Path2 > | makeTraversal (const Poly2 &src, poly2::Traversal type) const |
std::vector< Path2 > * | makeTraversal (std::vector< Path2 > *paths, const Poly2 &src, poly2::Traversal type) const |
This class is a factory for generating common Path2 objects.
Most of the time that we create a path, we are using it to approximate a common shape, like a circle, or a rounded rectangle. Instead of embedding all of this functionality into Path2 (which already has enough to do on its own), we have factored this out into a a separate factory class. This factory can generate new path or reset existing ones (conserving memory).
Note that this factory only generates path, and does not create Path2 objects. It is intended for shapes that will be drawn as lines or extruded later. If you want a solid (e.g. triangulated) shape, use PolyFactory instead.
cugl::PathFactory::PathFactory | ( | ) |
Creates a factory for generating common paths.
This factory will use the default tolerance.
cugl::PathFactory::PathFactory | ( | float | tol | ) |
Creates a factory for generating common paths with the given tolerance.
tol | The curve tolerance for rounded shapes |
|
inline |
Returns the curve tolerance for rounded shapes.
The tolerance guarantees that curved shapes have enough segments so that any points on the true shape are always within tolerance of the segmented approximation.
Rounded shapes include makeEllipse, makeCircle, makeArc, and makeRoundedRect.
|
inline |
Returns a path that represents an arc of the given dimensions.
All arc measurements are in degrees, not radians.
center | The arc center point (of the defining circle |
radius | The radius from the center point |
start | The starting angle in degrees |
degrees | The number of degrees to generate |
Path2 cugl::PathFactory::makeArc | ( | float | cx, |
float | cy, | ||
float | radius, | ||
float | start, | ||
float | degrees | ||
) | const |
Returns a path that represents an arc of the given dimensions.
All arc measurements are in degrees, not radians.
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
radius | The radius from the center point |
start | The starting angle in degrees |
degrees | The number of degrees to generate |
|
inline |
Stores an arc in the provided buffer.
All arc measurements are in degrees, not radians.
The arc will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
center | The arc center point (of the defining circle |
radius | The radius from the center point |
start | The starting angle in degrees |
degrees | The number of degrees to generate |
Path2* cugl::PathFactory::makeArc | ( | Path2 * | path, |
float | cx, | ||
float | cy, | ||
float | radius, | ||
float | start, | ||
float | degrees | ||
) | const |
Stores an arc in the provided buffer.
All arc measurements are in degrees, not radians.
The arc will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
radius | The radius from the center point |
start | The starting angle in degrees |
degrees | The number of degrees to generate |
Returns a path that represents a (full) capsule of the given dimensions.
A capsule is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
rect | The enclosing rectangle |
Returns a path that represents a (full) capsule of the given dimensions.
A capsule is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
origin | The enclosing rectangle origin |
size | The enclosing rectangle size |
Path2 cugl::PathFactory::makeCapsule | ( | float | x, |
float | y, | ||
float | w, | ||
float | h | ||
) | const |
Returns a path that represents a (full) capsule of the given dimensions.
A capsule is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
x | The x-coordinate of the bottom left corner of the bounding box |
y | The y-coordinate of the bottom left corner of the bounding box |
w | The capsule width |
h | The capsule height |
Stores a (full) capsule in the provided buffer.
A capsule is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
The capsule will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
rect | The enclosing rectangle |
|
inline |
Stores a (full) capsule in the provided buffer.
A capsule is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
The capsule will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
origin | The enclosing rectangle origin |
size | The enclosing rectangle size |
Stores a (full) capsule in the provided buffer.
A capsule is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom.Otherwise it will be oriented horizontally.
The capsule will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
x | The x-coordinate of the bottom left corner of the bounding box |
y | The y-coordinate of the bottom left corner of the bounding box |
w | The capsule width |
h | The capsule height |
|
inline |
Stores a capsule in the provided buffer.
A capsule typically is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
This method allows for the creation of half-capsules, simply by using the enumeration poly2::Capsule. The enumeration specifies which side should be rounded in case of a half-capsule. Half-capsules are sized so that the corresponding full capsule would fit in the bounding box.
The capsule will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
shape | The capsule shape |
rect | The enclosing rectangle |
|
inline |
Stores a capsule in the provided buffer.
A capsule typically is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
This method allows for the creation of half-capsules, simply by using the enumeration poly2::Capsule. The enumeration specifies which side should be rounded in case of a half-capsule. Half-capsules are sized so that the corresponding full capsule would fit in the bounding box.
The capsule will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
shape | The capsule shape |
origin | The enclosing rectangle origin |
size | The enclosing rectangle size |
Path2* cugl::PathFactory::makeCapsule | ( | Path2 * | path, |
poly2::Capsule | shape, | ||
float | x, | ||
float | y, | ||
float | w, | ||
float | h | ||
) | const |
Stores a capsule in the provided buffer.
A capsule typically is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
This method allows for the creation of half-capsules, simply by using the enumeration poly2::Capsule. The enumeration specifies which side should be rounded in case of a half-capsule. Half-capsules are sized so that the corresponding full capsule would fit in the bounding box.
The capsule will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
shape | The capsule shape |
x | The x-coordinate of the bottom left corner of the bounding box |
y | The y-coordinate of the bottom left corner of the bounding box |
w | The capsule width |
h | The capsule height |
|
inline |
Returns a path that represents a capsule of the given dimensions.
A capsule typically is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
This method allows for the creation of half-capsules, simply by using the enumeration poly2::Capsule. The enumeration specifies which side should be rounded in case of a half-capsule. Half-capsules are sized so that the corresponding full capsule would fit in the bounding box.
shape | The capsule shape |
rect | The enclosing rectangle |
|
inline |
Returns a path that represents a capsule of the given dimensions.
A capsule typically is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
This method allows for the creation of half-capsules, simply by using the enumeration poly2::Capsule. The enumeration specifies which side should be rounded in case of a half-capsule. Half-capsules are sized so that the corresponding full capsule would fit in the bounding box.
shape | The capsule shape |
origin | The enclosing rectangle origin |
size | The enclosing rectangle size |
Path2 cugl::PathFactory::makeCapsule | ( | poly2::Capsule | shape, |
float | x, | ||
float | y, | ||
float | w, | ||
float | h | ||
) | const |
Returns a path that represents a (full) capsule of the given dimensions.
A capsule typically is a pill-like shape that fits inside of given rectangle. If width < height, the capsule will be oriented vertically with the rounded portions at the top and bottom. Otherwise it will be oriented horizontally.
This method allows for the creation of half-capsules, simply by using the enumeration poly2::Capsule. The enumeration specifies which side should be rounded in case of a half-capsule. Half-capsules are sized so that the corresponding full capsule would fit in the bounding box.
shape | The capsule shape |
x | The x-coordinate of the bottom left corner of the bounding box |
y | The y-coordinate of the bottom left corner of the bounding box |
w | The capsule width |
h | The capsule height |
Returns a path that represents a circle of the given dimensions.
center | The circle center point |
radius | The circle radius |
Path2 cugl::PathFactory::makeCircle | ( | float | cx, |
float | cy, | ||
float | radius | ||
) | const |
Returns a path that represents a circle of the given dimensions.
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
radius | The circle radius |
Stores a circle in the provided buffer.
The circle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
center | The circle center point |
radius | The circle radius |
Stores a circle in the provided buffer.
The circle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
radius | The circle radius |
Returns a path that represents an ellipse of the given dimensions.
center | The ellipse center point |
size | The size of the ellipse |
Path2 cugl::PathFactory::makeEllipse | ( | float | cx, |
float | cy, | ||
float | sx, | ||
float | sy | ||
) | const |
Returns a path that represents an ellipse of the given dimensions.
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
sx | The size (diameter) along the x-axis |
sy | The size (diameter) along the y-axis |
|
inline |
Stores an ellipse in the provided buffer.
The ellipse will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
center | The ellipse center point |
size | The size of the ellipse |
Path2* cugl::PathFactory::makeEllipse | ( | Path2 * | path, |
float | cx, | ||
float | cy, | ||
float | sx, | ||
float | sy | ||
) | const |
Stores an ellipse in the provided buffer.
The ellipse will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
sx | The size (diameter) along the x-axis |
sy | The size (diameter) along the y-axis |
Returns a path that represents a line segment from origin to dest.
origin | The line origin |
dest | The line destination |
Path2 cugl::PathFactory::makeLine | ( | float | ox, |
float | oy, | ||
float | dx, | ||
float | dy | ||
) | const |
Returns a path that represents a line segment from origin to dest.
ox | The x-coordinate of the origin |
oy | The y-coordinate of the origin |
dx | The x-coordinate of the destination |
dy | The y-coordinate of the destination |
|
inline |
Stores a line segment from origin to dest in the provided buffer.
The line will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
origin | The line origin |
dest | The line destination |
Stores a line segment from origin to dest in the provided buffer.
The line will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
ox | The x-coordinate of the origin |
oy | The y-coordinate of the origin |
dx | The x-coordinate of the destination |
dy | The y-coordinate of the destination |
Returns a path that represents a regular, many-sided polygon.
The polygon will be centered at the given origin with the given radius. A regular polygon is essentially a circle where the number of segments is explicit (instead of implicit from the curve tolerance).
center | The polygon center point |
radius | The polygon radius |
sides | The number of sides |
Path2 cugl::PathFactory::makeNgon | ( | float | cx, |
float | cy, | ||
float | radius, | ||
Uint32 | sides | ||
) | const |
Returns a path that represents a regular, many-sided polygon.
The polygon will be centered at the given origin with the given radius. A regular polygon is essentially a circle where the number of segments is explicit (instead of implicit from the curve tolerance).
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
radius | The polygon radius |
sides | The number of sides |
|
inline |
Stores a regular, many-sided polygon in the provided buffer.
The polygon will be centered at the given origin with the given radius. A regular polygon is essentially a circle where the number of segments is explicit (instead of implicit from the curve tolerance).
The polygon will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
center | The polygon center point |
radius | The polygon radius |
sides | The number of sides |
Path2* cugl::PathFactory::makeNgon | ( | Path2 * | path, |
float | cx, | ||
float | cy, | ||
float | radius, | ||
Uint32 | sides | ||
) | const |
Stores a regular, many-sided polygon in the provided buffer.
The polygon will be centered at the given origin with the given radius. A regular polygon is essentially a circle where the number of segments is explicit (instead of implicit from the curve tolerance).
The polygon will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
cx | The x-coordinate of the center point |
cy | The y-coordinate of the center point |
radius | The polygon radius |
sides | The number of sides |
Returns a path that represents a rectangle
rect | The rectangle |
Returns a path that represents a rectangle
origin | The rectangle origin |
size | The rectangle size |
Path2 cugl::PathFactory::makeRect | ( | float | x, |
float | y, | ||
float | w, | ||
float | h | ||
) | const |
Returns a path that represents a rectangle
x | The x-coordinate of the bottom left corner |
y | The y-coordinate of the bottom left corner |
w | The rectangle width |
h | The rectangle height |
Stores a rectangle in the provided buffer.
The rectangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
rect | The rectangle to create |
|
inline |
Stores a rectangle in the provided buffer.
The rectangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
origin | The rectangle origin |
size | The rectangle size |
Stores a rectangle in the provided buffer.
The rectangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
x | The x-coordinate of the bottom left corner |
y | The y-coordinate of the bottom left corner |
w | The rectangle width |
h | The rectangle height |
Returns a path that represents a rounded rectangle of the given dimensions.
The radius should not exceed either half the width or half the height.
rect | The enclosing rectangle |
radius | The radius of each corner |
|
inline |
Returns a path that represents a rounded rectangle of the given dimensions.
The radius should not exceed either half the width or half the height.
origin | The enclosing rectangle origin |
size | The enclosing rectangle size |
radius | The radius of each corner |
Path2 cugl::PathFactory::makeRoundedRect | ( | float | x, |
float | y, | ||
float | w, | ||
float | h, | ||
float | r | ||
) | const |
Returns a path that represents a rounded rectangle of the given dimensions.
The radius should not exceed either half the width or half the height.
x | The x-coordinate of the bottom left corner of the bounding box |
y | The y-coordinate of the bottom left corner of the bounding box |
w | The rectangle width |
h | The rectangle height |
r | The radius of each corner |
|
inline |
Stores a rounded rectangle in the provided buffer.
The radius should not exceed either half the width or half the height.
The rounded rectangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
rect | The enclosing rectangle |
radius | The radius of each corner |
|
inline |
Stores a rounded rectangle in the provided buffer.
The radius should not exceed either half the width or half the height.
The rounded rectangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
origin | The enclosing rectangle origin |
size | The enclosing rectangle size |
radius | The radius of each corner |
Path2* cugl::PathFactory::makeRoundedRect | ( | Path2 * | path, |
float | x, | ||
float | y, | ||
float | w, | ||
float | h, | ||
float | r | ||
) | const |
Stores a rounded rectangle in the provided buffer.
The radius should not exceed either half the width or half the height.
The rounded rectangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
x | The x-coordinate of the bottom left corner of the bounding box |
y | The y-coordinate of the bottom left corner of the bounding box |
w | The rectangle width |
h | The rectangle height |
r | The radius of each corner |
std::vector<Path2> cugl::PathFactory::makeTraversal | ( | const Poly2 & | src, |
poly2::Traversal | type | ||
) | const |
Returns a path set representing a wire frame of an existing polygon.
Traversals generate not just one path, but a sequence of paths (which may all be either open or closed). This method provides four types of traversals: NONE
, OPEN
, CLOSED
and INTERIOR
. The open and closed traversals apply to the boundary of the polygon. If there is more than one boundary, then each boundary is traversed separately.
The interior traversal creates a wire frame a polygon triangulation. That means it will generate a separate path for each triangle.
src | The source polygon to traverse |
type | The traversal type |
std::vector<Path2>* cugl::PathFactory::makeTraversal | ( | std::vector< Path2 > * | paths, |
const Poly2 & | src, | ||
poly2::Traversal | type | ||
) | const |
Stores a wire frame of an existing polygon in the provided buffer.
Traversals generate not just one path, but a sequence of paths (which may all be either open or closed). This method provides four types of traversals: NONE
, OPEN
, CLOSED
and INTERIOR
. The open and closed traversals apply to the boundary of the polygon. If there is more than one boundary, then each boundary is traversed separately.
The interior traversal creates a wire frame a polygon triangulation. That means it will generate a separate path for each triangle.
The traversal will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
paths | The container to store the result |
src | The source polygon to traverse |
type | The traversal type |
Returns a path that represents a simple triangle.
a | The first vertex. |
b | The second vertex. |
c | The third vertex. |
Path2 cugl::PathFactory::makeTriangle | ( | float | ax, |
float | ay, | ||
float | bx, | ||
float | by, | ||
float | cx, | ||
float | cy | ||
) | const |
Returns a path that represents a simple triangle.
ax | The x-coordinate of the first vertex. |
ay | The y-coordinate of the first vertex. |
bx | The x-coordinate of the second vertex. |
by | The y-coordinate of the second vertex. |
cx | The x-coordinate of the third vertex. |
cy | The y-coordinate of the third vertex. |
|
inline |
Stores a simple triangle in the provided buffer.
The triangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
a | The first vertex |
b | The second vertex |
c | The third vertex |
Path2* cugl::PathFactory::makeTriangle | ( | Path2 * | path, |
float | ax, | ||
float | ay, | ||
float | bx, | ||
float | by, | ||
float | cx, | ||
float | cy | ||
) | const |
Stores a simple triangle in the provided buffer.
The triangle will be appended to the buffer. You should clear the buffer first if you do not want to preserve the original data.
path | The path to store the result |
ax | The x-coordinate of the first vertex |
ay | The y-coordinate of the first vertex |
bx | The x-coordinate of the second vertex |
by | The y-coordinate of the second vertex |
cx | The x-coordinate of the third vertex |
cy | The y-coordinate of the third vertex |
|
inline |
Sets the curve tolerance for rounded shapes.
The tolerance guarantees that curved shapes have enough segments so that any points on the true shape are always within tolerance of the segmented approximation.
Rounded shapes include makeEllipse, makeCircle, makeArc, and makeRoundedRect.
tol | The curve tolerance for rounded shapes. |