diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrElem.h | 4 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 4 | ||||
-rw-r--r-- | src/bltGrElemBar.h | 4 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 4 | ||||
-rw-r--r-- | src/bltGrElemLine.h | 4 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 32 | ||||
-rw-r--r-- | src/bltGrElemOp.h | 4 | ||||
-rw-r--r-- | src/bltGraph.C | 2 | ||||
-rw-r--r-- | src/bltGraph.h | 10 |
9 files changed, 31 insertions, 37 deletions
diff --git a/src/bltGrElem.h b/src/bltGrElem.h index 4546ebe..d6c2b15 100644 --- a/src/bltGrElem.h +++ b/src/bltGrElem.h @@ -147,12 +147,12 @@ class Element { virtual int configure() =0; virtual void map() =0; virtual void extents(Region2d*) =0; + virtual void draw(Drawable) =0; virtual void drawActive(Drawable) =0; - virtual void drawNormal(Drawable) =0; virtual void drawSymbol(Drawable, int, int, int) =0; virtual void closest() =0; + virtual void print(Blt_Ps) =0; virtual void printActive(Blt_Ps) =0; - virtual void printNormal(Blt_Ps) =0; virtual void printSymbol(Blt_Ps, double, double, int) =0; virtual ClassId classId() =0; diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 336bcc4..1faf7fb 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -690,7 +690,7 @@ void BarElement::drawActive(Drawable drawable) } } -void BarElement::drawNormal(Drawable drawable) +void BarElement::draw(Drawable drawable) { BarElementOptions* ops = (BarElementOptions*)ops_; @@ -775,7 +775,7 @@ void BarElement::printActive(Blt_Ps ps) } } -void BarElement::printNormal(Blt_Ps ps) +void BarElement::print(Blt_Ps ps) { BarElementOptions* ops = (BarElementOptions*)ops_; diff --git a/src/bltGrElemBar.h b/src/bltGrElemBar.h index c7aec47..ee6ad48 100644 --- a/src/bltGrElemBar.h +++ b/src/bltGrElemBar.h @@ -118,11 +118,11 @@ class BarElement : public Element { void map(); void extents(Region2d*); void closest(); + void draw(Drawable); void drawActive(Drawable); - void drawNormal(Drawable); void drawSymbol(Drawable, int, int, int); + void print(Blt_Ps); void printActive(Blt_Ps); - void printNormal(Blt_Ps); void printSymbol(Blt_Ps, double, double, int); }; diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index d74f275..ae2ed0a 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -617,7 +617,7 @@ void LineElement::drawActive(Drawable drawable) } } -void LineElement::drawNormal(Drawable drawable) +void LineElement::draw(Drawable drawable) { LineElementOptions* ops = (LineElementOptions*)ops_; @@ -772,7 +772,7 @@ void LineElement::printActive(Blt_Ps ps) } } -void LineElement::printNormal(Blt_Ps ps) +void LineElement::print(Blt_Ps ps) { LineElementOptions* ops = (LineElementOptions*)ops_; diff --git a/src/bltGrElemLine.h b/src/bltGrElemLine.h index 42dd6ef..d0b8c3c 100644 --- a/src/bltGrElemLine.h +++ b/src/bltGrElemLine.h @@ -167,11 +167,11 @@ class LineElement : public Element { void map(); void extents(Region2d*); void closest(); + void draw(Drawable); void drawActive(Drawable); - void drawNormal(Drawable); void drawSymbol(Drawable, int, int, int); + void print(Blt_Ps); void printActive(Blt_Ps); - void printNormal(Blt_Ps); void printSymbol(Blt_Ps, double, double, int); }; diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index 865b8af..624cd1e 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -648,16 +648,14 @@ void Graph::drawElements(Drawable drawable) link; link = Blt_Chain_PrevLink(link)) { Element* elemPtr = (Element*)Blt_Chain_GetValue(link); if (!(elemPtr->flags & DELETE_PENDING) && !elemPtr->hide()) - elemPtr->drawNormal(drawable); + elemPtr->draw(drawable); } } -void Blt_DrawActiveElements(Graph* graphPtr, Drawable drawable) +void Graph::drawActiveElements(Drawable drawable) { - Blt_ChainLink link; - - for (link = Blt_Chain_LastLink(graphPtr->elements_.displayList); - link != NULL; link = Blt_Chain_PrevLink(link)) { + for (Blt_ChainLink link=Blt_Chain_LastLink(elements_.displayList); + link; link = Blt_Chain_PrevLink(link)) { Element* elemPtr = (Element*)Blt_Chain_GetValue(link); if (!(elemPtr->flags & DELETE_PENDING) && (elemPtr->flags & ACTIVE) && !elemPtr->hide()) @@ -665,28 +663,24 @@ void Blt_DrawActiveElements(Graph* graphPtr, Drawable drawable) } } -void Blt_ElementsToPostScript(Graph* graphPtr, Blt_Ps ps) +void Graph::printElements(Blt_Ps ps) { - Blt_ChainLink link; - - for (link = Blt_Chain_LastLink(graphPtr->elements_.displayList); + for (Blt_ChainLink link=Blt_Chain_LastLink(elements_.displayList); link != NULL; link = Blt_Chain_PrevLink(link)) { Element* elemPtr = (Element*)Blt_Chain_GetValue(link); - if (!(elemPtr->flags & DELETE_PENDING) && !elemPtr->hide()) { + if (!(elemPtr->flags & DELETE_PENDING) && !elemPtr->hide()) continue; - } - /* Comment the PostScript to indicate the start of the element */ + + // Comment the PostScript to indicate the start of the element Blt_Ps_Format(ps, "\n%% Element \"%s\"\n\n", elemPtr->name()); - elemPtr->printNormal(ps); + elemPtr->print(ps); } } -void Blt_ActiveElementsToPostScript(Graph* graphPtr, Blt_Ps ps) +void Graph::printActiveElements(Blt_Ps ps) { - Blt_ChainLink link; - - for (link = Blt_Chain_LastLink(graphPtr->elements_.displayList); - link != NULL; link = Blt_Chain_PrevLink(link)) { + for (Blt_ChainLink link=Blt_Chain_LastLink(elements_.displayList); + link; link = Blt_Chain_PrevLink(link)) { Element* elemPtr = (Element*)Blt_Chain_GetValue(link); if (!(elemPtr->flags & DELETE_PENDING) && (elemPtr->flags & ACTIVE) && diff --git a/src/bltGrElemOp.h b/src/bltGrElemOp.h index 1e9f54c..bb363e9 100644 --- a/src/bltGrElemOp.h +++ b/src/bltGrElemOp.h @@ -34,8 +34,4 @@ extern int Blt_ElementOp(Graph* graphPtr, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[], ClassId classId); extern int Blt_GetElement(Tcl_Interp* interp, Graph *graphPtr, Tcl_Obj *objPtr, Element **elemPtrPtr); -extern void Blt_DrawActiveElements(Graph* graphPtr, Drawable drawable); -extern void Blt_ElementsToPostScript(Graph* graphPtr, Blt_Ps ps); -extern void Blt_ActiveElementsToPostScript(Graph* graphPtr, Blt_Ps ps); - #endif diff --git a/src/bltGraph.C b/src/bltGraph.C index 67ebac6..4e55c71 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -467,7 +467,7 @@ void Graph::display() // Draw markers above elements Blt::DrawMarkers(this, drawable, MARKER_ABOVE); - Blt_DrawActiveElements(this, drawable); + drawActiveElements(drawable); // Don't draw legend in the plot area. if (legend_->isRaised()) { diff --git a/src/bltGraph.h b/src/bltGraph.h index 5533ace..50b3d0d 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -199,9 +199,12 @@ class Graph { void updateMarginTraces(); void destroyElements(); - void drawElements(Drawable); - void mapElements(); void configureElements(); + void mapElements(); + void drawElements(Drawable); + void drawActiveElements(Drawable); + void printElements(Blt_Ps); + void printActiveElements(Blt_Ps); public: Graph(ClientData clientData, Tcl_Interp*interp, @@ -209,9 +212,10 @@ class Graph { virtual ~Graph(); void configure(); - void display(); void map(); + void display(); void eventuallyRedraw(); + int print(const char *ident, Blt_Ps ps); void extents(Region2d*); void reconfigure(); }; |