marker renderer
This commit is contained in:
parent
082b8a1e92
commit
b9e0eee019
|
@ -216,6 +216,9 @@ void AGGDraw() {
|
|||
aggDraw.target->render_text(60,60, "testing testing testing");
|
||||
|
||||
aggDraw.target->line(60, 90, 100, 100, 4);
|
||||
|
||||
aggDraw.target->marker(200, 200, 40, 4);
|
||||
aggDraw.target->marker(100, 300, 40, 3);
|
||||
//
|
||||
//agg_draw_line_pattern(64, 19, 14, 126, 118, 266, 19, 265, .76, 4.69, "C:\\7.bmp");
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "agg_renderer_mclip.h"
|
||||
#include "agg_renderer_outline_aa.h"
|
||||
#include "agg_renderer_markers.h"
|
||||
|
||||
class AggDrawTarget
|
||||
{
|
||||
|
@ -53,6 +54,7 @@ public:
|
|||
virtual void solid_rectangle(int x1, int y1, int x2, int y2) = 0;
|
||||
virtual void solid_triangle(int x1, int y1, int x2, int y2, int x3, int y3) = 0;
|
||||
virtual void line(int x1, int y1, int x2, int y2, double w) = 0;
|
||||
virtual void marker(int x, int y, int size, int type) = 0;
|
||||
|
||||
static const agg::int8u* lookupFont(const std::string& name);
|
||||
};
|
||||
|
@ -162,7 +164,8 @@ public:
|
|||
agg::render_scanlines(m_ras, m_sl_p8, ren_aa);
|
||||
}
|
||||
|
||||
virtual void line(int x1, int y1, int x2, int y2, double w){
|
||||
virtual void line(int x1, int y1, int x2, int y2, double w)
|
||||
{
|
||||
|
||||
agg::line_profile_aa profile;
|
||||
profile.width(w);
|
||||
|
@ -183,6 +186,22 @@ public:
|
|||
ras.render(false);
|
||||
}
|
||||
|
||||
virtual void marker(int x, int y, int size, int type)
|
||||
{
|
||||
|
||||
typedef agg::renderer_mclip<pixfmt> base_ren_type;
|
||||
|
||||
base_ren_type r(pixf);
|
||||
agg::renderer_scanline_aa_solid<base_ren_type> rs(r);
|
||||
|
||||
agg::renderer_markers<base_ren_type> m(r);
|
||||
|
||||
m.line_color(renderState.color);
|
||||
m.fill_color(renderState.color);
|
||||
|
||||
m.marker(x, y, size, agg::marker_e(type % agg::end_of_markers));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue