buffer.Printf( "newpath\n"
"%f %f %f %f %f %f ellipse\n"
"%f %f lineto\n"
- "stroke\n"
- "fill\n",
+ "closepath\n"
+ "stroke\n",
XLOG2DEV(xc), YLOG2DEV(yc),
XLOG2DEVREL(i_radius), YLOG2DEVREL(i_radius),
alpha1, alpha2,
"%f %f %f %f %f %f false ellipticarc\n",
XLOG2DEV(x+w/2), YLOG2DEV(y+h/2),
XLOG2DEVREL(w/2), YLOG2DEVREL(h/2),
- wxRound(sa), wxRound(ea) );
+ sa, ea );
buffer.Replace( ",", "." );
PsPrint( buffer );
wxString buffer;
buffer.Printf( "/origstate save def\n"
"20 dict begin\n"
- "/pix %f string def\n"
- "/grays %f string def\n"
+ "/pix %d string def\n"
+ "/grays %d string def\n"
"/npixels 0 def\n"
"/rgbindx 0 def\n"
"%f %f translate\n"
"%f %f scale\n"
- "%f %f 8\n"
- "[%f 0 0 %f 0 %f]\n"
+ "%d %d 8\n"
+ "[%d 0 0 %d 0 %d]\n"
"{currentfile pix readhexstring pop}\n"
"false 3 colorimage\n",
w, w, xx, yy, ww, hh, w, h, w, -h, h );
}
*(bufferindex++) = '\n';
*bufferindex = 0;
- PsPrint( charbuffer );
+
+ if (m_pstream)
+ fwrite( charbuffer, 1, strlen( charbuffer ), m_pstream );
+ else
+ PsPrint( charbuffer );
}
PsPrint( "end\n" );
GetTextExtent(text, &text_w, &text_h, &text_descent);
- // VZ: this seems to be unnecessary, so taking it out for now, if it
- // doesn't create any problems, remove this comment entirely
- //SetFont( m_font );
-
-
int size = m_font.GetPointSize();
// wxCoord by = y + (wxCoord)floor( double(size) * 2.0 / 3.0 ); // approximate baseline
}
#endif
+void wxPostScriptDC::ComputeScaleAndOrigin()
+{
+ const wxRealPoint origScale(m_scaleX, m_scaleY);
+
+#if wxUSE_NEW_DC
+ wxImplDC::ComputeScaleAndOrigin();
+#else
+ wxDC::ComputeScaleAndOrigin();
+#endif
+
+ // If scale has changed call SetPen to recalulate the line width
+ // and SetFont to recalculate font size
+ if ( wxRealPoint(m_scaleX, m_scaleY) != origScale && m_pen.IsOk() )
+ {
+ SetPen( m_pen );
+ SetFont( m_font );
+ }
+}
+
void wxPostScriptDC::DoGetSize(int* width, int* height) const
{
wxPaperSize id = m_printData.GetPaperId();