#include <cairomm/cairomm.h>
{
return out;
}
{
{
switch (data_type)
{
break;
assert(elt.size() == 1);
break;
assert(elt.size() == 3);
break;
assert(elt.size() == 0);
break;
default:
break;
}
}
}
int main(int , char** )
{
cr->move_to(10.0, 10.0);
cr->line_to(500.0, 300.0);
cr->curve_to(250.0, 250.0, 100.0, 100.0, 300.0, 300.0);
cr->close_path();
cr->rectangle(50.0, 50.0, 200.0, 150.0);
cr->arc(300.0, 200.0, 75.0, 0.0, 1.8 * M_PI);
print_path(cr->copy_path2());
print_path(cr->copy_path_flat2());
}
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
basic_ostream< _CharT, _Traits > & operator<<(basic_ostream< _CharT, _Traits > &__os, const basic_string< _CharT, _Traits, _Alloc > &__str)
static RefPtr< Context > create(const RefPtr< Surface > &target)
static RefPtr< ImageSurface > create(Format format, int width, int height)
Creates an image surface of the specified format and dimensions.
A single element of a path.
Definition path.h:119
ElementType type() const
Gets the type of element for this path element.
Definition path.h:166
unsigned int size() const
Get the number of points in this path element.
A custom const_iterator for iterating over a Path.
Definition path.h:189
ElementType
Describes the type of one portion of a path when represented as a Path::Element.
Definition path.h:98
@ MOVE_TO
A move-to operation.
@ LINE_TO
A line-to operation.
@ CURVE_TO
A curve-to operation.
@ CLOSE_PATH
A close-path operation.
@ ARGB32
Each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then red, then green,...
A simple structure for holding an X and Y coordinate pair.
Definition path.h:146
double y
Definition path.h:147
double x
Definition path.h:147