13 #ifndef OGLPLUS_EXT_NV_PATH_RENDERING_PATH_SPEC_1203031902_HPP
14 #define OGLPLUS_EXT_NV_PATH_RENDERING_PATH_SPEC_1203031902_HPP
16 #if OGLPLUS_DOCUMENTATION_ONLY || GL_NV_path_rendering
31 template <
typename PathCoordType>
37 std::vector<PathNVCommand> _commands;
38 std::vector<PathCoordType> _coords;
40 typedef PathCoordType T;
44 _commands.push_back(command);
51 _commands.push_back(command);
52 _coords.push_back(coord);
57 template <
typename ... C>
60 const std::size_t N =
sizeof ... (coord);
61 const T coords[N] = { T(coord)... };
63 _commands.push_back(command);
64 _coords.insert(_coords.end(), coords, coords+N);
76 PathNVSpec(GLuint command_count_hint, GLuint coord_count_hint)
78 _commands.reserve(command_count_hint);
79 _coords.reserve(coord_count_hint);
83 : _commands(std::move(tmp._commands))
84 , _coords(std::move(tmp._coords))
178 c0, c1, c2, c3, c4, c5
187 c0, c1, c2, c3, c4, c5
355 c0, c1, c2, c3, c4, c5, c6
364 c0, c1, c2, c3, c4, c5, c6
375 template <
typename PathCoordType>
381 typedef PathCoordType CT;
391 :
Base(command_count_hint, coord_count_hint)
397 return self(this->
Close());
403 return self(this->
MoveTo(c0, c1));
415 return self(this->
LineTo(c0, c1));
463 return self(this->
CubicCurveTo(c0, c1, c2, c3, c4, c5));
499 return self(this->
ArcTo(c0, c1, c2, c3, c4, c5, c6));
505 return self(this->
RelativeArcTo(c0, c1, c2, c3, c4, c5, c6));
511 #endif // NV_path_rendering
513 #endif // include guard
BriefPathNVSpec & L(CT c0, CT c1)
LineTo.
Definition: path_spec.hpp:413
PathNVSpec & RelativeSmoothCubicCurveTo(T c0, T c1, T c2, T c3)
Draw a smooth cubic curve with specified relative control points.
Definition: path_spec.hpp:219
PathNVSpec & CubicCurveTo(T c0, T c1, T c2, T c3, T c4, T c5)
Draw a cubic curve with the specified absolute control points.
Definition: path_spec.hpp:174
DUP_FIRST_CUBIC_CURVE_TO_NV.
PathNVSpec & LargeCCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a large-sweep CCW elliptical arc with absolute parameters.
Definition: path_spec.hpp:264
BriefPathNVSpec & c(CT c0, CT c1, CT c2, CT c3, CT c4, CT c5)
RelativeCubicCurveTo.
Definition: path_spec.hpp:467
PathNVCommand
Path specification command enumeration.
Definition: command.hpp:27
PathNVSpec & RelativeQuadraticCurveTo(T c0, T c1, T c2, T c3)
Draw a quadratic curve with the specified relative control points.
Definition: path_spec.hpp:165
BriefPathNVSpec & A(CT c0, CT c1, CT c2, CT c3, CT c4, CT c5, CT c6)
ArcTo.
Definition: path_spec.hpp:497
SMOOTH_QUADRATIC_CURVE_TO_NV.
PathNVSpec & RelativeSmoothQuadraticCurveTo(T c0, T c1)
Draw a smooth quadratic curve with specified relative control points.
Definition: path_spec.hpp:201
RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV.
PathNVSpec & MoveTo(T c0, T c1)
Move to absolute coordinates.
Definition: path_spec.hpp:108
BriefPathNVSpec & C(CT c0, CT c1, CT c2, CT c3, CT c4, CT c5)
CubicCurveTo.
Definition: path_spec.hpp:461
PathNVSpec & RelativeCubicCurveTo(T c0, T c1, T c2, T c3, T c4, T c5)
Draw a cubic curve with the specified relative control points.
Definition: path_spec.hpp:183
RELATIVE_HORIZONTAL_LINE_TO_NV.
PathNVSpec & CircularCCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a circular CCW arc with the specified absolute coordinates.
Definition: path_spec.hpp:324
BriefPathNVSpec & s(CT c0, CT c1, CT c2, CT c3)
RelativeSmoothCubicCurveTo.
Definition: path_spec.hpp:491
BriefPathNVSpec & q(CT c0, CT c1, CT c2, CT c3)
RelativeQuadraticCurveTo.
Definition: path_spec.hpp:455
PathNVSpec & RelativeLineTo(T c0, T c1)
Draw a line in the specified direction.
Definition: path_spec.hpp:126
PathNVSpec & DupLastCubicCurveTo(T c0, T c1, T c2, T c3)
Draw a cubic curve segment duplicating last control point.
Definition: path_spec.hpp:309
PathNVSpec & VerticalLineTo(T c0)
Draw a vertical line to the specified horizontal coordinate.
Definition: path_spec.hpp:144
DUP_LAST_CUBIC_CURVE_TO_NV.
RELATIVE_SMALL_CW_ARC_TO_NV.
PathNVSpec(void)
Creates an empty path specification.
Definition: path_spec.hpp:70
BriefPathNVSpec & T(CT c0, CT c1)
SmoothQuadraticCurveTo.
Definition: path_spec.hpp:473
PathNVSpec(GLuint command_count_hint, GLuint coord_count_hint)
Creates an empty path specification with storage size hints.
Definition: path_spec.hpp:76
PathNVSpec & CircularCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a circular CW arc with the specified absolute coordinates.
Definition: path_spec.hpp:333
PathNVSpec & SmallCCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a small-sweep CCW elliptical arc with absolute parameters.
Definition: path_spec.hpp:228
Implements operations applicable to named (non-zero) objects.
Definition: wrap_tpl.hpp:45
PathNVSpec & Rect(T c0, T c1, T c2, T c3)
Draw a rectangle with the specified absolute coordinates.
Definition: path_spec.hpp:318
BriefPathNVSpec & S(CT c0, CT c1, CT c2, CT c3)
SmoothCubicCurveTo.
Definition: path_spec.hpp:485
BriefPathNVSpec & t(CT c0, CT c1)
RelativeSmoothQuadraticCurveTo.
Definition: path_spec.hpp:479
RELATIVE_VERTICAL_LINE_TO_NV.
BriefPathNVSpec & a(CT c0, CT c1, CT c2, CT c3, CT c4, CT c5, CT c6)
RelativeArcTo.
Definition: path_spec.hpp:503
PathNVSpec & HorizontalLineTo(T c0)
Draw a horizontal line to the specified vertical coordinate.
Definition: path_spec.hpp:132
PathNVSpec & RelativeSmallCCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a small-sweep CCW elliptical arc with relative parameters.
Definition: path_spec.hpp:237
PathNVSpec & RelativeLargeCCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a large-sweep CCW elliptical arc with relative parameters.
Definition: path_spec.hpp:273
PathNVSpec & SmallCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a small-sweep CW elliptical arc with absolute parameters.
Definition: path_spec.hpp:246
PathNVSpec & RelativeArcTo(T c0, T c1, T c2, T c3, T c4, T c5, T c6)
Draw a general elliptical arc with specified relative coordinates.
Definition: path_spec.hpp:360
CIRCULAR_TANGENT_ARC_TO_NV.
BriefPathNVSpec & Q(CT c0, CT c1, CT c2, CT c3)
QuadraticCurveTo.
Definition: path_spec.hpp:449
Template class for convenient specifying of path commands and coordinates.
Definition: path_spec.hpp:32
Wrapper for the NV_path_rendering command enumeration.
BriefPathNVSpec & l(CT c0, CT c1)
RelativeLineTo.
Definition: path_spec.hpp:419
BriefPathNVSpec & m(CT c0, CT c1)
RelativeMoveTo.
Definition: path_spec.hpp:407
BriefPathNVSpec & H(CT c0)
HorizontalLineTo.
Definition: path_spec.hpp:425
RELATIVE_SMALL_CCW_ARC_TO_NV.
SMOOTH_CUBIC_CURVE_TO_NV.
BriefPathNVSpec & h(CT c0)
RelativeHorizontalLineTo.
Definition: path_spec.hpp:431
PathNVSpec & RelativeVerticalLineTo(T c0)
Draw a vertical line in the specified direction.
Definition: path_spec.hpp:150
RELATIVE_QUADRATIC_CURVE_TO_NV.
PathNVSpec & SmoothCubicCurveTo(T c0, T c1, T c2, T c3)
Draw a smooth cubic curve with specified absolute control points.
Definition: path_spec.hpp:210
PathNVSpec & RelativeSmallCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a small-sweep CW elliptical arc with relative parameters.
Definition: path_spec.hpp:255
RELATIVE_LARGE_CW_ARC_TO_NV.
PathNVSpec & RelativeMoveTo(T c0, T c1)
Move by specified amount.
Definition: path_spec.hpp:114
PathNVSpec & RelativeHorizontalLineTo(T c0)
Draw a horizontal line in the specified direction.
Definition: path_spec.hpp:138
PathNVSpec & LargeCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a large-sweep CW elliptical arc with absolute parameters.
Definition: path_spec.hpp:282
RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV.
BriefPathNVSpec & v(CT c0)
RelativeVerticalLineTo.
Definition: path_spec.hpp:443
PathNVSpec & LineTo(T c0, T c1)
Draw a line to absolute coordinates.
Definition: path_spec.hpp:120
PathNVSpec & QuadraticCurveTo(T c0, T c1, T c2, T c3)
Draw a quadratic curve with the specified absolute control points.
Definition: path_spec.hpp:156
RELATIVE_LARGE_CCW_ARC_TO_NV.
PathNVSpec & RelativeLargeCWArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a large-sweep CW elliptical arc with relative parameters.
Definition: path_spec.hpp:291
PathNVSpec & DupFirstCubicCurveTo(T c0, T c1, T c2, T c3)
Draw a cubic curve segment duplicating first control point.
Definition: path_spec.hpp:300
PathNVSpec & CircularTangentArcTo(T c0, T c1, T c2, T c3, T c4)
Draw a circular tangential arc with specified absolute coordinates.
Definition: path_spec.hpp:342
PathNVSpec & Close(void)
Definition: path_spec.hpp:96
PathNVSpec & SmoothQuadraticCurveTo(T c0, T c1)
Draw a smooth quadratic curve with specified absolute control points.
Definition: path_spec.hpp:192
PathNVSpec & Restart(void)
Restart path.
Definition: path_spec.hpp:102
Object< PathNVOps > PathNV
An oglplus_object encapsulating the nVidia path functionality.
Definition: path.hpp:1019
RELATIVE_CUBIC_CURVE_TO_NV.
Facade over PathNVSpec for even more convenient path specification.
Definition: path_spec.hpp:376
BriefPathNVSpec & V(CT c0)
VerticalLineTo.
Definition: path_spec.hpp:437
PathNVSpec & ArcTo(T c0, T c1, T c2, T c3, T c4, T c5, T c6)
Draw a general elliptical arc with specified absolute coordinates.
Definition: path_spec.hpp:351
BriefPathNVSpec & Z(void)
Close.
Definition: path_spec.hpp:395
BriefPathNVSpec & M(CT c0, CT c1)
MoveTo.
Definition: path_spec.hpp:401