15 #ifndef AGG_RASTERIZER_OUTLINE_INCLUDED 16 #define AGG_RASTERIZER_OUTLINE_INCLUDED 18 #include "agg_basics.h" 32 void attach(Renderer& ren) { m_ren = &ren; }
36 void move_to(
int x,
int y)
39 m_ren->move_to(m_start_x = x, m_start_y = y);
43 void line_to(
int x,
int y)
50 void move_to_d(
double x,
double y)
52 move_to(m_ren->coord(x), m_ren->coord(y));
56 void line_to_d(
double x,
double y)
58 line_to(m_ren->coord(x), m_ren->coord(y));
66 line_to(m_start_x, m_start_y);
72 void add_vertex(
double x,
double y,
unsigned cmd)
82 if(is_closed(cmd)) close();
93 template<
class VertexSource>
94 void add_path(VertexSource& vs,
unsigned path_id=0)
101 while(!is_stop(cmd = vs.vertex(&x, &y)))
103 add_vertex(x, y, cmd);
109 template<
class VertexSource,
class ColorStorage,
class PathId>
110 void render_all_paths(VertexSource& vs,
111 const ColorStorage& colors,
112 const PathId& path_id,
115 for(
unsigned i = 0; i < num_paths; i++)
117 m_ren->line_color(colors[i]);
118 add_path(vs, path_id[i]);
124 template<
class Ctrl>
void render_ctrl(Ctrl& c)
127 for(i = 0; i < c.num_paths(); i++)
129 m_ren->line_color(c.color(i));