gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/canvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/canvas.h')
-rw-r--r--agg-plot/canvas.h 15
1 files changed, 11 insertions, 4 deletions
diff --git a/agg-plot/canvas.h b/agg-plot/canvas.h
index 9b79f871..92e5111c 100644
--- a/agg-plot/canvas.h
+++ b/agg-plot/canvas.h
@@ -61,12 +61,14 @@ class canvas_gen : private pixel {
double m_width;
double m_height;
+ agg::rendering_buffer& m_rbuf;
+
public:
canvas_gen(agg::rendering_buffer& ren_buf, double width, double height,
agg::rgba bgcol):
pixel(ren_buf), rb(pixel::pixfmt), rs(rb),
ras(), sl(), bg_color(bgcol),
- m_width(width), m_height(height)
+ m_width(width), m_height(height), m_rbuf(ren_buf)
{
};
@@ -90,9 +92,14 @@ public:
void draw(sg_object& vs, agg::rgba8 c)
{
- this->ras.add_path(vs);
- this->rs.color(c);
- agg::render_scanlines(this->ras, this->sl, this->rs);
+ bool direct_render = vs.render(m_rbuf, this->ras, this->sl, c);
+
+ if (!direct_render)
+ {
+ this->ras.add_path(vs);
+ this->rs.color(c);
+ agg::render_scanlines(this->ras, this->sl, this->rs);
+ }
};
void draw_outline(sg_object& vs, agg::rgba8 c)
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月01日 22:18:15 +0000

AltStyle によって変換されたページ (->オリジナル) /