fixed issue with drawing order of object in drawing queue - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2010年09月14日 00:44:54 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2010年09月14日 00:44:54 +0200
commitea978bd125cfa03ba6c650e0b9352bc5d2e2a2cc (patch)
treedc1ebe805353c067eebcdebccef7d8e1f1c91710 /agg-plot
parent5579b4915465dbbe1067b439795385ecbb589b9e (diff)
downloadgsl-shell-ea978bd125cfa03ba6c650e0b9352bc5d2e2a2cc.tar.gz
fixed issue with drawing order of object in drawing queue
Diffstat (limited to 'agg-plot')
-rw-r--r--agg-plot/plot.h 20
1 files changed, 6 insertions, 14 deletions
diff --git a/agg-plot/plot.h b/agg-plot/plot.h
index 61984d3c..14216777 100644
--- a/agg-plot/plot.h
+++ b/agg-plot/plot.h
@@ -135,7 +135,6 @@ protected:
bool fit_inside(vertex_source *obj) const;
- void push_drawing_rev(pod_list<item> *c);
void layer_dispose_elements (item_list& layer);
item_list& current_layer() { return *m_current_layer; };
@@ -143,7 +142,6 @@ protected:
item_list m_root_layer;
agg::pod_auto_vector<item_list*, max_layers> m_layers;
item_list *m_current_layer;
- // agg::pod_bvector<item> m_elements;
agg::trans_affine m_trans;
pod_list<item> *m_drawing_queue;
@@ -162,16 +160,6 @@ private:
};
template <class VS, class RM>
-void plot<VS,RM>::push_drawing_rev(pod_list<item> *c)
-{
- if (c)
- {
- push_drawing_rev (c->next());
- m_current_layer->add(c->content());
- }
-}
-
-template <class VS, class RM>
void plot<VS,RM>::commit_pending_draw()
{
push_drawing_queue();
@@ -182,7 +170,8 @@ template <class VS, class RM>
void plot<VS,RM>::add(VS* vs, agg::rgba8 *color, bool outline)
{
item d(vs, color, outline);
- m_drawing_queue = new pod_list<item>(d, m_drawing_queue);
+ pod_list<item> *new_node = new pod_list<item>(d);
+ m_drawing_queue = pod_list<item>::push_back(m_drawing_queue, new_node);
RM::acquire(vs);
}
@@ -198,7 +187,10 @@ void plot<VS,RM>::set_title(const char *text)
template <class VS, class RM>
void plot<VS,RM>::push_drawing_queue()
{
- push_drawing_rev (m_drawing_queue);
+ for (pod_list<item> *c = m_drawing_queue; c != 0; c = c->next())
+ {
+ m_current_layer->add(c->content());
+ }
while (m_drawing_queue)
m_drawing_queue = list::pop(m_drawing_queue);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月19日 13:33:12 +0000

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