diff options
author | joye <joye> | 2014-06-27 16:03:09 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-27 16:03:09 (GMT) |
commit | c60f3348b9fb7f72a25440683a7c74614cb60fec (patch) | |
tree | 6d606a29a538a1f1ae1378a200a6b1b3925990d6 | |
parent | de5b80df7ae70062e2264e2ad419a13d1af041c0 (diff) | |
download | blt-c60f3348b9fb7f72a25440683a7c74614cb60fec.zip blt-c60f3348b9fb7f72a25440683a7c74614cb60fec.tar.gz blt-c60f3348b9fb7f72a25440683a7c74614cb60fec.tar.bz2 |
*** empty log message ***
-rw-r--r-- | bltGrMarkerBitmap.C | 2 | ||||
-rw-r--r-- | bltGrMarkerBitmap.h | 2 | ||||
-rw-r--r-- | src/bltGrAxis.C | 2 | ||||
-rw-r--r-- | src/bltGrAxis.h | 2 | ||||
-rw-r--r-- | src/bltGrElem.h | 2 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 15 | ||||
-rw-r--r-- | src/bltGrElemBar.h | 10 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 14 | ||||
-rw-r--r-- | src/bltGrElemLine.h | 14 | ||||
-rw-r--r-- | src/bltGrLegd.C | 2 | ||||
-rw-r--r-- | src/bltGrLegd.h | 2 | ||||
-rw-r--r-- | src/bltGrMarker.h | 2 | ||||
-rw-r--r-- | src/bltGrMarkerLine.C | 2 | ||||
-rw-r--r-- | src/bltGrMarkerLine.h | 2 | ||||
-rw-r--r-- | src/bltGrMarkerPolygon.C | 2 | ||||
-rw-r--r-- | src/bltGrMarkerPolygon.h | 2 | ||||
-rw-r--r-- | src/bltGrMarkerText.C | 2 | ||||
-rw-r--r-- | src/bltGrMarkerText.h | 2 | ||||
-rw-r--r-- | src/bltGrPSOutput.C | 12 | ||||
-rw-r--r-- | src/bltGrPSOutput.h | 2 | ||||
-rw-r--r-- | src/bltGrPostscript.C | 32 | ||||
-rw-r--r-- | src/bltGrPostscript.h | 12 | ||||
-rw-r--r-- | src/bltGrPostscriptOp.C | 12 | ||||
-rw-r--r-- | src/bltGrText.C | 2 | ||||
-rw-r--r-- | src/bltGrText.h | 4 | ||||
-rw-r--r-- | src/bltGraph.C | 8 | ||||
-rw-r--r-- | src/bltGraph.h | 4 |
27 files changed, 82 insertions, 87 deletions
diff --git a/bltGrMarkerBitmap.C b/bltGrMarkerBitmap.C index 9823c69..44e97cf 100644 --- a/bltGrMarkerBitmap.C +++ b/bltGrMarkerBitmap.C @@ -257,7 +257,7 @@ int BitmapMarker::regionIn(Region2d *extsPtr, int enclosed) ((anchorPt_.y + height_) <= extsPtr->top)); } -void BitmapMarker::print(PostScript* psPtr) +void BitmapMarker::print(PSOutput* psPtr) { BitmapMarkerOptions* ops = (BitmapMarkerOptions*)ops_; diff --git a/bltGrMarkerBitmap.h b/bltGrMarkerBitmap.h index d6eaac3..38752e2 100644 --- a/bltGrMarkerBitmap.h +++ b/bltGrMarkerBitmap.h @@ -69,7 +69,7 @@ namespace Blt { void map(); int pointIn(Point2d*); int regionIn(Region2d*, int); - void print(PostScript*); + void print(PSOutput*); public: BitmapMarker(Graph*, const char*, Tcl_HashEntry*); diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C index f1091d0..41d1c6b 100644 --- a/src/bltGrAxis.C +++ b/src/bltGrAxis.C @@ -1662,7 +1662,7 @@ void Axis::makeGridLine(double value, Segment2d *sp) void Axis::print(PSOutput* psPtr) { AxisOptions* ops = (AxisOptions*)ops_; - PageSetupOptions* pops = (PageSetupOptions*)graphPtr_->pageSetup_->ops_; + PostscriptOptions* pops = (PostscriptOptions*)graphPtr_->postscript_->ops_; if (ops->hide || !use_) return; diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h index aa3e449..0d107cd 100644 --- a/src/bltGrAxis.h +++ b/src/bltGrAxis.h @@ -40,7 +40,7 @@ extern "C" { }; class Graph; -class PageSetup; +class Postscript; #include "bltGrMisc.h" #include "bltGrText.h" diff --git a/src/bltGrElem.h b/src/bltGrElem.h index eaab7b4..d86a6c2 100644 --- a/src/bltGrElem.h +++ b/src/bltGrElem.h @@ -40,7 +40,7 @@ extern "C" { class Axis; class Element; class Pen; -class PageSetup; +class Postscript; #include "bltGrMisc.h" #include "bltGrPen.h" diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 310fabf..9710f5c 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -744,14 +744,13 @@ void BarElement::drawSymbol(Drawable drawable, int x, int y, int size) size, size); } -void BarElement::print(PostScript* psPtr) +void BarElement::print(PSOutput* psPtr) { BarElementOptions* ops = (BarElementOptions*)ops_; if (ops->hide) return; - // Comment the PostScript to indicate the start of the element psPtr->format("\n%% Element \"%s\"\n\n", name_); int count = 0; @@ -788,7 +787,7 @@ void BarElement::print(PostScript* psPtr) } } -void BarElement::printActive(PostScript* psPtr) +void BarElement::printActive(PSOutput* psPtr) { BarElementOptions* ops = (BarElementOptions*)ops_; @@ -815,7 +814,7 @@ void BarElement::printActive(PostScript* psPtr) } } -void BarElement::printSymbol(PostScript* psPtr, double x, double y, int size) +void BarElement::printSymbol(PSOutput* psPtr, double x, double y, int size) { BarElementOptions* ops = (BarElementOptions*)ops_; @@ -825,10 +824,6 @@ void BarElement::printSymbol(PostScript* psPtr, double x, double y, int size) if (!pops->fill && !pops->outlineColor) return; - /* - * Build a PostScript procedure to draw the fill and outline of the symbol - * after the path of the symbol shape has been formed - */ psPtr->append("\n" "/DrawSymbolProc {\n" "gsave\n "); @@ -1253,7 +1248,7 @@ void BarElement::drawValues(Drawable drawable, BarPen* penPtr, } } -void BarElement::printSegments(PostScript* psPtr, BarPen* penPtr, +void BarElement::printSegments(PSOutput* psPtr, BarPen* penPtr, XRectangle *bars, int nBars) { BarPenOptions* pops = (BarPenOptions*)penPtr->ops(); @@ -1279,7 +1274,7 @@ void BarElement::printSegments(PostScript* psPtr, BarPen* penPtr, } } -void BarElement::printValues(PostScript* psPtr, BarPen* penPtr, +void BarElement::printValues(PSOutput* psPtr, BarPen* penPtr, XRectangle *bars, int nBars, int *barToData) { BarPenOptions* pops = (BarPenOptions*)penPtr->ops(); diff --git a/src/bltGrElemBar.h b/src/bltGrElemBar.h index 21b8397..fa2c495 100644 --- a/src/bltGrElemBar.h +++ b/src/bltGrElemBar.h @@ -104,8 +104,8 @@ class BarElement : public Element { void mapErrorBars(BarStyle**); void drawSegments(Drawable, BarPen*, XRectangle*, int); void drawValues(Drawable, BarPen*, XRectangle*, int, int*); - void printSegments(PostScript*, BarPen*, XRectangle*, int); - void printValues(PostScript*, BarPen*, XRectangle*, int, int*); + void printSegments(PSOutput*, BarPen*, XRectangle*, int); + void printValues(PSOutput*, BarPen*, XRectangle*, int, int*); public: BarElement(Graph*, const char*, Tcl_HashEntry*); @@ -122,9 +122,9 @@ class BarElement : public Element { void draw(Drawable); void drawActive(Drawable); void drawSymbol(Drawable, int, int, int); - void print(PostScript*); - void printActive(PostScript*); - void printSymbol(PostScript*, double, double, int); + void print(PSOutput*); + void printActive(PSOutput*); + void printSymbol(PSOutput*, double, double, int); }; #endif diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 7097fac..e5e7ee7 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -649,7 +649,7 @@ void LineElement::drawSymbol(Drawable drawable, int x, int y, int size) } } -void LineElement::print(PostScript* psPtr) +void LineElement::print(PSOutput* psPtr) { LineElementOptions* ops = (LineElementOptions*)ops_; LinePen* penPtr = NORMALPEN(ops); @@ -723,7 +723,7 @@ void LineElement::print(PostScript* psPtr) symbolCounter_ = 0; } -void LineElement::printActive(PostScript* psPtr) +void LineElement::printActive(PSOutput* psPtr) { LineElementOptions* ops = (LineElementOptions*)ops_; LinePen* penPtr = (LinePen *)ops->activePenPtr; @@ -762,7 +762,7 @@ void LineElement::printActive(PostScript* psPtr) } } -void LineElement::printSymbol(PostScript* psPtr, double x, double y, int size) +void LineElement::printSymbol(PSOutput* psPtr, double x, double y, int size) { LineElementOptions* ops = (LineElementOptions*)ops_; @@ -2408,7 +2408,7 @@ void LineElement::drawValues(Drawable drawable, LinePen* penPtr, } } -void LineElement::printSymbols(PostScript* psPtr, LinePen* penPtr, int size, +void LineElement::printSymbols(PSOutput* psPtr, LinePen* penPtr, int size, int nSymbolPts, Point2d *symbolPts) { LinePenOptions* pops = (LinePenOptions*)penPtr->ops(); @@ -2485,7 +2485,7 @@ void LineElement::printSymbols(PostScript* psPtr, LinePen* penPtr, int size, } } -void LineElement::setLineAttributes(PostScript* psPtr, LinePen* penPtr) +void LineElement::setLineAttributes(PSOutput* psPtr, LinePen* penPtr) { LinePenOptions* pops = (LinePenOptions*)penPtr->ops(); @@ -2504,7 +2504,7 @@ void LineElement::setLineAttributes(PostScript* psPtr, LinePen* penPtr) } } -void LineElement::printTraces(PostScript* psPtr, LinePen* penPtr) +void LineElement::printTraces(PSOutput* psPtr, LinePen* penPtr) { setLineAttributes(psPtr, penPtr); for (Blt_ChainLink link = Blt_Chain_FirstLink(traces_); link; @@ -2519,7 +2519,7 @@ void LineElement::printTraces(PostScript* psPtr, LinePen* penPtr) } } -void LineElement::printValues(PostScript* psPtr, LinePen* penPtr, +void LineElement::printValues(PSOutput* psPtr, LinePen* penPtr, int nSymbolPts, Point2d *symbolPts, int *pointToData) { diff --git a/src/bltGrElemLine.h b/src/bltGrElemLine.h index df550bf..4db6137 100644 --- a/src/bltGrElemLine.h +++ b/src/bltGrElemLine.h @@ -142,10 +142,10 @@ class LineElement : public Element { void drawSymbols(Drawable, LinePen*, int, int, Point2d*); void drawTraces(Drawable, LinePen*); void drawValues(Drawable, LinePen*, int, Point2d*, int*); - void setLineAttributes(PostScript*, LinePen*); - void printTraces(PostScript*, LinePen*); - void printValues(PostScript*, LinePen*, int, Point2d*, int*); - void printSymbols(PostScript*, LinePen*, int, int, Point2d*); + void setLineAttributes(PSOutput*, LinePen*); + void printTraces(PSOutput*, LinePen*); + void printValues(PSOutput*, LinePen*, int, Point2d*, int*); + void printSymbols(PSOutput*, LinePen*, int, int, Point2d*); double distanceToLine(int, int, Point2d*, Point2d*, Point2d*); double distanceToX(int, int, Point2d*, Point2d*, Point2d*); double distanceToY(int, int, Point2d*, Point2d*, Point2d*); @@ -167,9 +167,9 @@ class LineElement : public Element { void draw(Drawable); void drawActive(Drawable); void drawSymbol(Drawable, int, int, int); - void print(PostScript*); - void printActive(PostScript*); - void printSymbol(PostScript*, double, double, int); + void print(PSOutput*); + void printActive(PSOutput*); + void printSymbol(PSOutput*, double, double, int); }; #endif diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index 5181116..b761514 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -528,7 +528,7 @@ void Legend::print(PSOutput* psPtr) { LegendOptions* ops = (LegendOptions*)ops_; GraphOptions* gops = (GraphOptions*)graphPtr_->ops_; - PageSetupOptions* pops = (PageSetupOptions*)graphPtr_->pageSetup_->ops_; + PostscriptOptions* pops = (PostscriptOptions*)graphPtr_->postscript_->ops_; if ((ops->hide) || (nEntries_ == 0)) return; diff --git a/src/bltGrLegd.h b/src/bltGrLegd.h index 8eccdfb..8ff447b 100644 --- a/src/bltGrLegd.h +++ b/src/bltGrLegd.h @@ -151,7 +151,7 @@ class Legend : public Pick { int configure(); void map(int, int); void draw(Drawable drawable); - void print(PostScript* ps); + void print(PSOutput* ps); void eventuallyInvokeSelectCmd(); void removeElement(Element*); diff --git a/src/bltGrMarker.h b/src/bltGrMarker.h index 99bdbbb..b940a0c 100644 --- a/src/bltGrMarker.h +++ b/src/bltGrMarker.h @@ -38,7 +38,7 @@ extern "C" { class Graph; class Axis; -class PageSetup; +class Postscript; #include "bltGrMisc.h" #include "bltGrPs.h" diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C index 063fb25..8894a3b 100644 --- a/src/bltGrMarkerLine.C +++ b/src/bltGrMarkerLine.C @@ -276,7 +276,7 @@ int LineMarker::regionIn(Region2d *extsPtr, int enclosed) } } -void LineMarker::print(PostScript* psPtr) +void LineMarker::print(PSOutput* psPtr) { LineMarkerOptions* ops = (LineMarkerOptions*)ops_; diff --git a/src/bltGrMarkerLine.h b/src/bltGrMarkerLine.h index ee43dcc..b692c06 100644 --- a/src/bltGrMarkerLine.h +++ b/src/bltGrMarkerLine.h @@ -65,7 +65,7 @@ namespace Blt { void map(); int pointIn(Point2d*); int regionIn(Region2d*, int); - void print(PostScript*); + void print(PSOutput*); int pointInSegments(Point2d *samplePtr, Segment2d *segments, int nSegments, double halo); diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C index 0c8e7d8..5d025fd 100644 --- a/src/bltGrMarkerPolygon.C +++ b/src/bltGrMarkerPolygon.C @@ -284,7 +284,7 @@ int PolygonMarker::regionIn(Region2d *extsPtr, int enclosed) return 0; } -void PolygonMarker::print(PostScript* psPtr) +void PolygonMarker::print(PSOutput* psPtr) { PolygonMarkerOptions* ops = (PolygonMarkerOptions*)ops_; diff --git a/src/bltGrMarkerPolygon.h b/src/bltGrMarkerPolygon.h index c2b90fb..f8ca31d 100644 --- a/src/bltGrMarkerPolygon.h +++ b/src/bltGrMarkerPolygon.h @@ -69,7 +69,7 @@ namespace Blt { void map(); int pointIn(Point2d*); int regionIn(Region2d*, int); - void print(PostScript*); + void print(PSOutput*); public: PolygonMarker(Graph*, const char*, Tcl_HashEntry*); diff --git a/src/bltGrMarkerText.C b/src/bltGrMarkerText.C index cc581d6..563c0a6 100644 --- a/src/bltGrMarkerText.C +++ b/src/bltGrMarkerText.C @@ -253,7 +253,7 @@ int TextMarker::regionIn(Region2d *extsPtr, int enclosed) ((anchorPt_.y + height_) <= extsPtr->top)); } -void TextMarker::print(PostScript* psPtr) +void TextMarker::print(PSOutput* psPtr) { TextMarkerOptions* ops = (TextMarkerOptions*)ops_; diff --git a/src/bltGrMarkerText.h b/src/bltGrMarkerText.h index efe8b05..1ffca3f 100644 --- a/src/bltGrMarkerText.h +++ b/src/bltGrMarkerText.h @@ -67,7 +67,7 @@ namespace Blt { void map(); int pointIn(Point2d*); int regionIn(Region2d*, int); - void print(PostScript*); + void print(PSOutput*); public: TextMarker(Graph*, const char*, Tcl_HashEntry*); diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C index e8c16ff..d18a295 100644 --- a/src/bltGrPSOutput.C +++ b/src/bltGrPSOutput.C @@ -100,8 +100,8 @@ void PSOutput::printSegments(Segment2d* segments, int nSegments) int PSOutput::computeBBox(int width, int height) { - PageSetup* setupPtr = graphPtr_->pageSetup_; - PageSetupOptions* pops = (PageSetupOptions*)setupPtr->ops_; + Postscript* setupPtr = graphPtr_->postscript_; + PostscriptOptions* pops = (PostscriptOptions*)setupPtr->ops_; int paperWidth, paperHeight; float hScale, vScale, scale; @@ -212,7 +212,7 @@ void PSOutput::fillRectangles(XRectangle* rectangles, int nRectangles) void PSOutput::setBackground(XColor* colorPtr) { - PageSetupOptions* pops = (PageSetupOptions*)graphPtr_->pageSetup_->ops_; + PostscriptOptions* pops = (PostscriptOptions*)graphPtr_->postscript_->ops_; printXColor(colorPtr); append(" setrgbcolor\n"); if (pops->greyscale) @@ -221,7 +221,7 @@ void PSOutput::setBackground(XColor* colorPtr) void PSOutput::setForeground(XColor* colorPtr) { - PageSetupOptions* pops = (PageSetupOptions*)graphPtr_->pageSetup_->ops_; + PostscriptOptions* pops = (PostscriptOptions*)graphPtr_->postscript_->ops_; printXColor(colorPtr); append(" setrgbcolor\n"); if (pops->greyscale) @@ -464,8 +464,8 @@ void PSOutput::printXColor(XColor* colorPtr) int PSOutput::preamble(const char* fileName) { - PageSetup* setupPtr = graphPtr_->pageSetup_; - PageSetupOptions* ops = (PageSetupOptions*)setupPtr->ops_; + Postscript* setupPtr = graphPtr_->postscript_; + PostscriptOptions* ops = (PostscriptOptions*)setupPtr->ops_; if (!fileName) fileName = Tk_PathName(graphPtr_->tkwin_); diff --git a/src/bltGrPSOutput.h b/src/bltGrPSOutput.h index fccf1ab..7e9c539 100644 --- a/src/bltGrPSOutput.h +++ b/src/bltGrPSOutput.h @@ -35,7 +35,7 @@ #define POSTSCRIPT_BUFSIZ ((BUFSIZ*2)-1) class Graph; -class PageSetup; +class Postscript; class PSOutput { protected: diff --git a/src/bltGrPostscript.C b/src/bltGrPostscript.C index 5313f3e..a4c4e03 100644 --- a/src/bltGrPostscript.C +++ b/src/bltGrPostscript.C @@ -37,38 +37,38 @@ using namespace Blt; static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BOOLEAN, "-center", "center", "Center", - "yes", -1, Tk_Offset(PageSetupOptions, center), 0, NULL, 0}, + "yes", -1, Tk_Offset(PostscriptOptions, center), 0, NULL, 0}, {TK_OPTION_CUSTOM, "-comments", "comments", "Comments", - NULL, -1, Tk_Offset(PageSetupOptions, comments), + NULL, -1, Tk_Offset(PostscriptOptions, comments), TK_OPTION_NULL_OK, &listObjOption, 0}, {TK_OPTION_BOOLEAN, "-decorations", "decorations", "Decorations", - "yes", -1, Tk_Offset(PageSetupOptions, decorations), 0, NULL, 0}, + "yes", -1, Tk_Offset(PostscriptOptions, decorations), 0, NULL, 0}, {TK_OPTION_BOOLEAN, "-footer", "footer", "Footer", - "no", -1, Tk_Offset(PageSetupOptions, footer), 0, NULL, 0}, + "no", -1, Tk_Offset(PostscriptOptions, footer), 0, NULL, 0}, {TK_OPTION_BOOLEAN, "-greyscale", "greyscale", "Greyscale", - "no", -1, Tk_Offset(PageSetupOptions, greyscale), 0, NULL, 0}, + "no", -1, Tk_Offset(PostscriptOptions, greyscale), 0, NULL, 0}, {TK_OPTION_PIXELS, "-height", "height", "Height", - "0", -1, Tk_Offset(PageSetupOptions, reqHeight), 0, NULL, 0}, + "0", -1, Tk_Offset(PostscriptOptions, reqHeight), 0, NULL, 0}, {TK_OPTION_BOOLEAN, "-landscape", "landscape", "Landscape", - "no", -1, Tk_Offset(PageSetupOptions, landscape), 0, NULL, 0}, + "no", -1, Tk_Offset(PostscriptOptions, landscape), 0, NULL, 0}, {TK_OPTION_INT, "-level", "level", "Level", - "2", -1, Tk_Offset(PageSetupOptions, level), 0, NULL, 0}, + "2", -1, Tk_Offset(PostscriptOptions, level), 0, NULL, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "PadX", - "1.0i", -1, Tk_Offset(PageSetupOptions, xPad), 0, NULL, 0}, + "1.0i", -1, Tk_Offset(PostscriptOptions, xPad), 0, NULL, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "PadY", - "1.0i", -1, Tk_Offset(PageSetupOptions, yPad), 0, NULL, 0}, + "1.0i", -1, Tk_Offset(PostscriptOptions, yPad), 0, NULL, 0}, {TK_OPTION_PIXELS, "-paperheight", "paperHeight", "PaperHeight", - "11.0i", -1, Tk_Offset(PageSetupOptions, reqPaperHeight), 0, NULL, 0}, + "11.0i", -1, Tk_Offset(PostscriptOptions, reqPaperHeight), 0, NULL, 0}, {TK_OPTION_PIXELS, "-paperwidth", "paperWidth", "PaperWidth", - "8.5i", -1, Tk_Offset(PageSetupOptions, reqPaperWidth), 0, NULL, 0}, + "8.5i", -1, Tk_Offset(PostscriptOptions, reqPaperWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-width", "width", "Width", - "0", -1, Tk_Offset(PageSetupOptions, reqWidth), 0, NULL, 0}, + "0", -1, Tk_Offset(PostscriptOptions, reqWidth), 0, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0} }; -PageSetup::PageSetup(Graph* graphPtr) +Postscript::Postscript(Graph* graphPtr) { - ops_ = (PageSetupOptions*)calloc(1, sizeof(PageSetupOptions)); + ops_ = (PostscriptOptions*)calloc(1, sizeof(PostscriptOptions)); graphPtr_ = graphPtr; optionTable_ =Tk_CreateOptionTable(graphPtr_->interp_, optionSpecs); @@ -76,7 +76,7 @@ PageSetup::PageSetup(Graph* graphPtr) graphPtr_->tkwin_); } -PageSetup::~PageSetup() +Postscript::~Postscript() { Tk_FreeConfigOptions((char*)ops_, optionTable_, graphPtr_->tkwin_); free(ops_); diff --git a/src/bltGrPostscript.h b/src/bltGrPostscript.h index 4f4e24f..10131d1 100644 --- a/src/bltGrPostscript.h +++ b/src/bltGrPostscript.h @@ -27,8 +27,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef __BltGrPageSetup_h__ -#define __BltGrPageSetup_h__ +#ifndef __BltGrPostscript_h__ +#define __BltGrPostscript_h__ #include <tk.h> @@ -46,9 +46,9 @@ typedef struct { int reqPaperHeight; int reqWidth; int reqHeight; -} PageSetupOptions; +} PostscriptOptions; -class PageSetup { +class Postscript { public: Tk_OptionTable optionTable_; void* ops_; @@ -64,8 +64,8 @@ class PageSetup { int paperWidth; public: - PageSetup(Graph*); - virtual ~PageSetup(); + Postscript(Graph*); + virtual ~Postscript(); }; #endif diff --git a/src/bltGrPostscriptOp.C b/src/bltGrPostscriptOp.C index 01ff340..383d260 100644 --- a/src/bltGrPostscriptOp.C +++ b/src/bltGrPostscriptOp.C @@ -39,10 +39,10 @@ using namespace Blt; -int PageSetupObjConfigure(Graph* graphPtr, Tcl_Interp* interp, +int PostscriptObjConfigure(Graph* graphPtr, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) { - PageSetup* setupPtr = graphPtr->pageSetup_; + Postscript* setupPtr = graphPtr->postscript_; Tk_SavedOptions savedOptions; int mask =0; int error; @@ -85,7 +85,7 @@ static int CgetOp(ClientData clientData, Tcl_Interp* interp, return TCL_ERROR; } - PageSetup *setupPtr = graphPtr->pageSetup_; + Postscript *setupPtr = graphPtr->postscript_; Tcl_Obj* objPtr = Tk_GetOptionValue(interp, (char*)setupPtr->ops_, setupPtr->optionTable_, @@ -101,7 +101,7 @@ static int ConfigureOp(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) { Graph* graphPtr = (Graph*)clientData; - PageSetup* setupPtr = graphPtr->pageSetup_; + Postscript* setupPtr = graphPtr->postscript_; if (objc <= 4) { Tcl_Obj* objPtr = Tk_GetOptionInfo(interp, (char*)setupPtr->ops_, setupPtr->optionTable_, @@ -114,7 +114,7 @@ static int ConfigureOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } else - return PageSetupObjConfigure(graphPtr, interp, objc-3, objv+3); + return PostscriptObjConfigure(graphPtr, interp, objc-3, objv+3); } static int OutputOp(ClientData clientData, Tcl_Interp* interp, @@ -142,7 +142,7 @@ static int OutputOp(ClientData clientData, Tcl_Interp* interp, PSOutput* psPtr = new PSOutput(graphPtr); - if (PageSetupObjConfigure(graphPtr, interp, objc-3, objv+3) != TCL_OK) { + if (PostscriptObjConfigure(graphPtr, interp, objc-3, objv+3) != TCL_OK) { if (channel) Tcl_Close(interp, channel); delete psPtr; diff --git a/src/bltGrText.C b/src/bltGrText.C index 315b59f..2f547b3 100644 --- a/src/bltGrText.C +++ b/src/bltGrText.C @@ -130,7 +130,7 @@ void TextStyle::drawText2(Drawable drawable, const char *text, *hh = h1; } -void TextStyle::printText(PostScript* psPtr, const char *text, int x, int y) +void TextStyle::printText(PSOutput* psPtr, const char *text, int x, int y) { TextStyleOptions* ops = (TextStyleOptions*)ops_; diff --git a/src/bltGrText.h b/src/bltGrText.h index d72ecab..6c85365 100644 --- a/src/bltGrText.h +++ b/src/bltGrText.h @@ -35,7 +35,7 @@ #include "bltGrMisc.h" class Graph; -class PostScript; +class PSOutput; typedef struct { Tk_Anchor anchor; @@ -68,7 +68,7 @@ class TextStyle { void* ops() {return ops_;} void drawText(Drawable, const char*, int, int); void drawText2(Drawable, const char*, int, int, int*, int*); - void printText(PostScript*, const char*, int, int); + void printText(PSOutput*, const char*, int, int); void getExtents(const char*, int*, int*); }; diff --git a/src/bltGraph.C b/src/bltGraph.C index aaf3f50..6d2bd72 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -79,7 +79,7 @@ Graph::Graph(ClientData clientData, Tcl_Interp* interp, legend_ = new Legend(this); crosshairs_ = new Crosshairs(this); - pageSetup_ = new PageSetup(this); + postscript_ = new Postscript(this); inset_ =0; titleX_ =0; @@ -141,7 +141,7 @@ Graph::~Graph() delete crosshairs_; delete legend_; - delete pageSetup_; + delete postscript_; destroyAxes(); destroyPens(); @@ -351,7 +351,7 @@ void Graph::draw() int Graph::print(const char* ident, PSOutput* psPtr) { GraphOptions* ops = (GraphOptions*)ops_; - PageSetupOptions* pops = (PageSetupOptions*)pageSetup_->ops_; + PostscriptOptions* pops = (PostscriptOptions*)postscript_->ops_; // be sure the window is realized so that relief colors are available if (flags & REDRAW_PENDING) { @@ -569,7 +569,7 @@ void Graph::drawMargins(Drawable drawable) void Graph::printMargins(PSOutput* psPtr) { GraphOptions* ops = (GraphOptions*)ops_; - PageSetupOptions* pops = (PageSetupOptions*)pageSetup_->ops_; + PostscriptOptions* pops = (PostscriptOptions*)postscript_->ops_; XRectangle margin[4]; margin[0].x = margin[0].y = margin[3].x = margin[1].x = 0; diff --git a/src/bltGraph.h b/src/bltGraph.h index cbcd6ee..f8104ea 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -46,7 +46,7 @@ class Axis; class Element; class Legend; class Pen; -class PageSetup; +class Postscript; class PSOutput; class Pick { @@ -150,7 +150,7 @@ class Graph : public Pick { Legend* legend_; Crosshairs* crosshairs_; - PageSetup* pageSetup_; + Postscript* postscript_; int inset_; short int titleX_; |