summaryrefslogtreecommitdiffstats
path: root/tksao/frame
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2020-03-13 21:03:50 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2020-03-13 21:03:50 (GMT)
commitb7344e9a22b4e5e1e51945c907962bf927375c65 (patch)
treebcaf59ce76548e06de50feef63d2e12c5b99fb79 /tksao/frame
parentbdf4cb8f92a397068ebb996312871813b3e7d231 (diff)
downloadblt-b7344e9a22b4e5e1e51945c907962bf927375c65.zip
blt-b7344e9a22b4e5e1e51945c907962bf927375c65.tar.gz
blt-b7344e9a22b4e5e1e51945c907962bf927375c65.tar.bz2
mv vector out from tksao
Diffstat (limited to 'tksao/frame')
-rw-r--r--tksao/frame/base.C8
-rw-r--r--tksao/frame/basebox.C8
-rw-r--r--tksao/frame/baseellipse.C14
-rw-r--r--tksao/frame/bpanda.C4
-rw-r--r--tksao/frame/compass.C12
-rw-r--r--tksao/frame/contour.C5
-rw-r--r--tksao/frame/cpanda.C4
-rw-r--r--tksao/frame/epanda.C4
-rw-r--r--tksao/frame/frame3dbase.C4
-rw-r--r--tksao/frame/line.C4
-rw-r--r--tksao/frame/marker.C10
-rw-r--r--tksao/frame/point.C50
-rw-r--r--tksao/frame/polygon.C4
-rw-r--r--tksao/frame/projection.C12
-rw-r--r--tksao/frame/ruler.C14
-rw-r--r--tksao/frame/segment.C4
-rw-r--r--tksao/frame/text.C3
17 files changed, 82 insertions, 82 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C
index bebc46b..73a130c 100644
--- a/tksao/frame/base.C
+++ b/tksao/frame/base.C
@@ -1037,14 +1037,14 @@ void Base::psCrosshair(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << aa.TkCanvasPs(canvas) << ' '
+ << TkCanvasPs(aa) << ' '
<< "moveto "
- << bb.TkCanvasPs(canvas) << ' '
+ << TkCanvasPs(bb) << ' '
<< "lineto stroke" << endl
<< "newpath "
- << cc.TkCanvasPs(canvas) << ' '
+ << TkCanvasPs(cc) << ' '
<< "moveto "
- << dd.TkCanvasPs(canvas) << ' '
+ << TkCanvasPs(dd) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/basebox.C b/tksao/frame/basebox.C
index 3e51de3..79cb2ae 100644
--- a/tksao/frame/basebox.C
+++ b/tksao/frame/basebox.C
@@ -79,9 +79,9 @@ void BaseBox::renderPSDraw(int ii)
Vector v = parent->mapFromRef(vertices_[ii][jj],Coord::CANVAS);
if (jj==0)
str << "newpath "
- << v.TkCanvasPs(parent->canvas) << " moveto" << endl;
+ << parent->TkCanvasPs(v) << " moveto" << endl;
else
- str << v.TkCanvasPs(parent->canvas) << " lineto" << endl;
+ str << parent->TkCanvasPs(v) << " lineto" << endl;
}
str << "stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
@@ -94,9 +94,9 @@ void BaseBox::renderPSFillDraw(int ii)
Vector v = parent->mapFromRef(vertices_[ii][jj],Coord::CANVAS);
if (jj==0)
str << "newpath "
- << v.TkCanvasPs(parent->canvas) << " moveto" << endl;
+ << parent->TkCanvasPs(v) << " moveto" << endl;
else
- str << v.TkCanvasPs(parent->canvas) << " lineto" << endl;
+ str << parent->TkCanvasPs(v) << " lineto" << endl;
}
str << "fill" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
diff --git a/tksao/frame/baseellipse.C b/tksao/frame/baseellipse.C
index 07bc95b..2f84fb9 100644
--- a/tksao/frame/baseellipse.C
+++ b/tksao/frame/baseellipse.C
@@ -446,7 +446,7 @@ void BaseEllipse::renderPSCircle(PSColorSpace mode)
{
ostringstream str;
- str << cc.TkCanvasPs(parent->canvas) << ' '
+ str << parent->TkCanvasPs(cc) << ' '
<< l << ' '
<< a1 << ' ' << a2 << ' '
<< "arc" << endl << ends;
@@ -538,11 +538,11 @@ void BaseEllipse::renderPSEllipseArc(double a1, double a2, Vector& rr)
Vector tt1 = fwdMap(t1*FlipY(),Coord::CANVAS);
ostringstream str;
- str << tt0.TkCanvasPs(parent->canvas) << ' '
+ str << parent->TkCanvasPs(tt0) << ' '
<< "moveto "
- << xx1.TkCanvasPs(parent->canvas) << ' '
- << xx2.TkCanvasPs(parent->canvas) << ' '
- << tt1.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(xx1) << ' '
+ << parent->TkCanvasPs(xx2) << ' '
+ << parent->TkCanvasPs(tt1) << ' '
<< "curveto" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
@@ -562,9 +562,9 @@ void BaseEllipse::renderPSInclude(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << r1.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(r1) << ' '
<< "moveto "
- << r2.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(r2) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/bpanda.C b/tksao/frame/bpanda.C
index c8bdf21..e700eb0 100644
--- a/tksao/frame/bpanda.C
+++ b/tksao/frame/bpanda.C
@@ -110,9 +110,9 @@ void Bpanda::renderPS(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << rr0.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(rr0) << ' '
<< "moveto "
- << rr1.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(rr1) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/compass.C b/tksao/frame/compass.C
index 50fa2b4..ba6b71d 100644
--- a/tksao/frame/compass.C
+++ b/tksao/frame/compass.C
@@ -153,14 +153,14 @@ void Compass::renderPS(PSColorSpace mode)
{
ostringstream str;
str << "newpath "
- << aa.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(aa) << ' '
<< "moveto "
- << bb.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(bb) << ' '
<< "lineto stroke" << endl
<< "newpath "
- << aa.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(aa) << ' '
<< "moveto "
- << cc.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(cc) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
@@ -175,7 +175,7 @@ void Compass::renderPS(PSColorSpace mode)
if (northText) {
double angle = (bb-aa).angle();
- Vector ddd = dd.TkCanvasPs(parent->canvas);
+ Vector ddd = parent->TkCanvasPs(dd);
str << "gsave" << endl
<< "newpath " << endl
<< ddd << " moveto" << endl
@@ -216,7 +216,7 @@ void Compass::renderPS(PSColorSpace mode)
if (eastText) {
double angle = (cc-aa).angle();
- Vector eee = ee.TkCanvasPs(parent->canvas);
+ Vector eee = parent->TkCanvasPs(ee);
str << "gsave" << endl
<< "newpath " << endl
<< eee << " moveto" << endl
diff --git a/tksao/frame/contour.C b/tksao/frame/contour.C
index 14f0e94..0279cd3 100644
--- a/tksao/frame/contour.C
+++ b/tksao/frame/contour.C
@@ -224,11 +224,10 @@ void Contour::ps(PSColorSpace mode)
str << endl;
Vector v1 = base_->mapFromRef(lvertex_.current()->vector,Coord::CANVAS);
- str << "newpath " << endl
- << v1.TkCanvasPs(base_->canvas) << " moveto" << endl;
+ str << "newpath " << endl << parent_->parent_->TkCanvasPs(v1) << " moveto" << endl;
while (lvertex_.next()) {
Vector vv = base_->mapFromRef(lvertex_.current()->vector,Coord::CANVAS);
- str << vv.TkCanvasPs(base_->canvas) << " lineto" << endl;
+ str << parent_->parent_->TkCanvasPs(vv) << " lineto" << endl;
}
str << "stroke" << endl << ends;
Tcl_AppendResult(base_->interp, str.str().c_str(), NULL);
diff --git a/tksao/frame/cpanda.C b/tksao/frame/cpanda.C
index 2d9fcda..fff5c93 100644
--- a/tksao/frame/cpanda.C
+++ b/tksao/frame/cpanda.C
@@ -112,9 +112,9 @@ void Cpanda::renderPS(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << rr0.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(rr0) << ' '
<< "moveto "
- << rr1.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(rr1) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/epanda.C b/tksao/frame/epanda.C
index 980a3f8..0971951 100644
--- a/tksao/frame/epanda.C
+++ b/tksao/frame/epanda.C
@@ -110,9 +110,9 @@ void Epanda::renderPS(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << rr0.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(rr0) << ' '
<< "moveto "
- << rr1.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(rr1) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/frame3dbase.C b/tksao/frame/frame3dbase.C
index b924b6c..10192aa 100644
--- a/tksao/frame/frame3dbase.C
+++ b/tksao/frame/frame3dbase.C
@@ -580,8 +580,8 @@ void Frame3dBase::psLine(Vector& ss, Vector& tt, int dd)
str << "[] 0 setdash" << endl;
str << "newpath "
- << ss.TkCanvasPs(canvas) << " moveto" << endl
- << tt.TkCanvasPs(canvas) << " lineto stroke" << endl << ends;
+ << TkCanvasPs(ss) << " moveto" << endl
+ << TkCanvasPs(tt) << " lineto stroke" << endl << ends;
Tcl_AppendResult(interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/line.C b/tksao/frame/line.C
index aed9fdb..1d069e2 100644
--- a/tksao/frame/line.C
+++ b/tksao/frame/line.C
@@ -83,9 +83,9 @@ void Line::renderPS(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << aa.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(aa) << ' '
<< "moveto "
- << bb.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(bb) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/marker.C b/tksao/frame/marker.C
index ab678a8..375846f 100644
--- a/tksao/frame/marker.C
+++ b/tksao/frame/marker.C
@@ -393,9 +393,9 @@ void Marker::renderPSInclude(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << ll.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(ll) << ' '
<< "moveto "
- << ur.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(ur) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
@@ -414,7 +414,7 @@ void Marker::renderPSText(PSColorSpace mode)
<< " scalefont setfont" << endl;
Vector bbc = bbox.center();
- Vector tt = Vector(bbc[0], bbox.ll[1]).TkCanvasPs(parent->canvas);
+ Vector tt = parent->TkCanvasPs(Vector(bbc[0], bbox.ll[1]));
str << "gsave" << endl
<< "newpath " << endl
<< tt << " moveto" << endl
@@ -437,9 +437,9 @@ void Marker::renderPSArrow(const Vector& p1, const Vector& p2,
Vector* vv = arrow(p1,p2,sys);
ostringstream str;
str << "newpath " << endl
- << vv[0].TkCanvasPs(parent->canvas) << " moveto" << endl;
+ << parent->TkCanvasPs(vv[0]) << " moveto" << endl;
for (int ii=1; ii<6; ii++)
- str << vv[ii].TkCanvasPs(parent->canvas) << " lineto" << endl;
+ str << parent->TkCanvasPs(vv[ii]) << " lineto" << endl;
str << "closepath fill" << endl << ends;
Tcl_AppendResult(parent->interp, (char*)str.str().c_str(), NULL);
delete [] vv;
diff --git a/tksao/frame/point.C b/tksao/frame/point.C
index c2e0bf3..e8784e2 100644
--- a/tksao/frame/point.C
+++ b/tksao/frame/point.C
@@ -171,13 +171,13 @@ void Point::renderPS(PSColorSpace mode)
case DIAMOND:
vv = generateDiamond(Coord::CANVAS);
str << "newpath "
- << vv[0].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[0]) << ' '
<< "moveto "
- << vv[1].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[1]) << ' '
<< "lineto "
- << vv[2].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[2]) << ' '
<< "lineto "
- << vv[3].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[3]) << ' '
<< "lineto "
<< "closepath stroke" << endl
<< ends;
@@ -186,14 +186,14 @@ void Point::renderPS(PSColorSpace mode)
case CROSS:
vv = generateCross(Coord::CANVAS);
str << "newpath "
- << vv[0].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[0]) << ' '
<< "moveto "
- << vv[1].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[1]) << ' '
<< "lineto stroke" << endl
<< "newpath "
- << vv[2].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[2]) << ' '
<< "moveto "
- << vv[3].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[3]) << ' '
<< "lineto stroke" << endl
<< ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
@@ -201,14 +201,14 @@ void Point::renderPS(PSColorSpace mode)
case EX:
vv = generateEx(Coord::CANVAS);
str << "newpath "
- << vv[0].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[0]) << ' '
<< "moveto "
- << vv[1].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[1]) << ' '
<< "lineto stroke" << endl
<< "newpath "
- << vv[2].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[2]) << ' '
<< "moveto "
- << vv[3].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[3]) << ' '
<< "lineto stroke" << endl
<< ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
@@ -216,19 +216,19 @@ void Point::renderPS(PSColorSpace mode)
case ARROW:
vv = generateArrow(Coord::CANVAS);
str << "newpath "
- << vv[0].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[0]) << ' '
<< "moveto "
- << vv[3].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[3]) << ' '
<< "lineto stroke" << endl
<< "newpath "
- << vv[1].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[1]) << ' '
<< "moveto "
- << vv[3].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[3]) << ' '
<< "lineto stroke" << endl
<< "newpath "
- << vv[2].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[2]) << ' '
<< "moveto "
- << vv[3].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[3]) << ' '
<< "lineto stroke" << endl
<< ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
@@ -248,16 +248,16 @@ void Point::renderPSCircle(int mode, int ss)
if (parent->isAzElZero()) {
Vector cc = parent->mapFromRef(center,Coord::CANVAS);
ostringstream str;
- str << "newpath " << cc.TkCanvasPs(parent->canvas) << ' ' << ss/2.
+ str << "newpath " << parent->TkCanvasPs(cc) << ' ' << ss/2.
<< " 0 360 arc stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
else {
Vector* vv = generateCircle(Coord::CANVAS,ss);
ostringstream str;
- str << "newpath " << vv[0].TkCanvasPs(parent->canvas) << " moveto " << endl;
+ str << "newpath " << parent->TkCanvasPs(vv[0]) << " moveto " << endl;
for (int ii=1; ii<NUMSEG; ii++)
- str << vv[ii].TkCanvasPs(parent->canvas) << " lineto" << endl;
+ str << parent->TkCanvasPs(vv[ii]) << " lineto" << endl;
str << "closepath stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
delete [] vv;
@@ -269,13 +269,13 @@ void Point::renderPSBox(int mode)
Vector* vv = generateBox(Coord::CANVAS);
ostringstream str;
str << "newpath "
- << vv[0].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[0]) << ' '
<< "moveto "
- << vv[1].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[1]) << ' '
<< "lineto "
- << vv[2].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[2]) << ' '
<< "lineto "
- << vv[3].TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(vv[3]) << ' '
<< "lineto " << endl
<< "closepath stroke" << endl
<< ends;
diff --git a/tksao/frame/polygon.C b/tksao/frame/polygon.C
index 5e618f2..46ff671 100644
--- a/tksao/frame/polygon.C
+++ b/tksao/frame/polygon.C
@@ -83,10 +83,10 @@ void Polygon::renderPS(PSColorSpace mode)
vertex.head();
Vector v = fwdMap(vertex.current()->vector,Coord::CANVAS);
str << "newpath " << endl
- << v.TkCanvasPs(parent->canvas) << " moveto" << endl;
+ << parent->TkCanvasPs(v) << " moveto" << endl;
while (vertex.next()) {
Vector v = fwdMap(vertex.current()->vector,Coord::CANVAS);
- str << v.TkCanvasPs(parent->canvas) << " lineto" << endl;
+ str << parent->TkCanvasPs(v) << " lineto" << endl;
}
str << "closepath ";
diff --git a/tksao/frame/projection.C b/tksao/frame/projection.C
index b0a05cd..5bfbaf3 100644
--- a/tksao/frame/projection.C
+++ b/tksao/frame/projection.C
@@ -86,9 +86,9 @@ void Projection::renderPS(PSColorSpace mode)
{
ostringstream str;
str << "newpath "
- << aa.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(aa) << ' '
<< "moveto "
- << bb.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(bb) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
@@ -108,13 +108,13 @@ void Projection::renderPS(PSColorSpace mode)
ostringstream str;
str << "newpath "
- << lr.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(lr) << ' '
<< "moveto "
- << ur.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(ur) << ' '
<< "lineto "
- << ul.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(ul) << ' '
<< "lineto "
- << ll.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(ll) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
diff --git a/tksao/frame/ruler.C b/tksao/frame/ruler.C
index 5d8585b..0813274 100644
--- a/tksao/frame/ruler.C
+++ b/tksao/frame/ruler.C
@@ -115,9 +115,9 @@ void Ruler::renderPS(PSColorSpace mode)
{
ostringstream str;
str << "newpath "
- << dd.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(dd) << ' '
<< "moveto "
- << ee.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(ee) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
renderPSArrow(p2,p1,Coord::CANVAS);
@@ -129,14 +129,14 @@ void Ruler::renderPS(PSColorSpace mode)
{
ostringstream str;
str << "newpath "
- << aa.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(aa) << ' '
<< "moveto "
- << cc.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(cc) << ' '
<< "lineto stroke" << endl
<< "newpath "
- << bb.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(bb) << ' '
<< "moveto "
- << cc.TkCanvasPs(parent->canvas) << ' '
+ << parent->TkCanvasPs(cc) << ' '
<< "lineto stroke" << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
@@ -155,7 +155,7 @@ void Ruler::renderPS(PSColorSpace mode)
distToStr(vstr);
vstr << ends;
char* buf = dupstr(vstr.str().c_str());
- Vector tt = ((bb-aa)/2 + aa).TkCanvasPs(parent->canvas);
+ Vector tt = parent->TkCanvasPs(((bb-aa)/2 + aa));
str << "gsave" << endl
<< "newpath " << endl
<< tt << " moveto" << endl
diff --git a/tksao/frame/segment.C b/tksao/frame/segment.C
index 142db2b..f67d37c 100644
--- a/tksao/frame/segment.C
+++ b/tksao/frame/segment.C
@@ -65,11 +65,11 @@ void Segment::renderPS(PSColorSpace mode)
Vector v = fwdMap(vertex.current()->vector,Coord::CANVAS);
if (first) {
str << "newpath " << endl
- << v.TkCanvasPs(parent->canvas) << " moveto" << endl;
+ << parent->TkCanvasPs(v) << " moveto" << endl;
first = 0;
}
else
- str << v.TkCanvasPs(parent->canvas) << " lineto" << endl;
+ str << parent->TkCanvasPs(v) << " lineto" << endl;
} while (vertex.next());
str << "stroke" << endl << ends;
diff --git a/tksao/frame/text.C b/tksao/frame/text.C
index b73a149..a4de348 100644
--- a/tksao/frame/text.C
+++ b/tksao/frame/text.C
@@ -72,7 +72,8 @@ void Text::renderPS(PSColorSpace mode)
<< " scalefont setfont" << endl;
double ang = rotate ? calcAngle() : 0;
- Vector cc = (parent->mapFromRef(center,Coord::CANVAS)).TkCanvasPs(parent->canvas);
+ Vector bb = parent->mapFromRef(center,Coord::CANVAS);
+ Vector cc = parent->TkCanvasPs(bb);
str << "gsave" << endl
<< "newpath " << endl
<< cc << " moveto" << endl