68 ( (wxMemoryDC *)
m_dc )->SelectObject( wxNullBitmap );
90 m_dc->DrawLine( (wxCoord) x1a, (wxCoord) y1a, (wxCoord) x2a, (wxCoord) y2a );
103 wxCoord x1a, y1a, x2a, y2a;
105 x2a = (wxCoord) ( xa[0] /
scalex );
107 for (
PLINT i = 1; i < npts; i++ )
109 x1a = x2a; y1a = y2a;
110 x2a = (wxCoord) ( xa[i] /
scalex );
113 m_dc->DrawLine( x1a, y1a, x2a, y2a );
146 const wxPen oldPen =
m_dc->GetPen();
147 const wxBrush oldBrush =
m_dc->GetBrush();
149 m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( bgr, bgg, bgb ), 1, wxSOLID ) ) );
150 m_dc->SetBrush( wxBrush( wxColour( bgr, bgg, bgb ) ) );
151 m_dc->DrawRectangle( x1, y1, x2 - x1, y2 - y1 );
153 m_dc->SetPen( oldPen );
154 m_dc->SetBrush( oldBrush );
167 wxPoint *points =
new wxPoint[pls->
dev_npts];
171 for (
int i = 0; i < pls->
dev_npts; i++ )
181 m_dc->DrawPolygon( pls->
dev_npts, points, xoffset, yoffset, wxODDEVEN_RULE );
185 m_dc->DrawPolygon( pls->
dev_npts, points, xoffset, yoffset, wxWINDING_RULE );
200 dc->Blit( vX, vY, vW, vH,
m_dc, vX, vY );
214 m_dc =
new wxMemoryDC();
216 ( (wxMemoryDC *)
m_dc )->SelectObject( wxNullBitmap );
233 pls->
width > 0 ? pls->
width : 1, wxSOLID ) ) );
245 pls->
width > 0 ? pls->
width : 1, wxSOLID ) ) );
258 pls->
width > 0 ? pls->
width : 1, wxSOLID ) ) );
277 #ifdef PL_HAVE_FREETYPE
284 void wxPLDevDC::PutPixel(
short x,
short y,
PLINT color )
286 const wxPen oldpen =
m_dc->GetPen();
287 m_dc->SetPen( *( wxThePenList->FindOrCreatePen( wxColour( GetRValue( color ), GetGValue( color ), GetBValue( color ) ),
289 m_dc->DrawPoint( x, y );
291 m_dc->SetPen( oldpen );
300 void wxPLDevDC::PutPixel(
short x,
short y )
302 m_dc->DrawPoint( x, y );
312 PLINT wxPLDevDC::GetPixel(
short x,
short y )
320 return RGB( bgr, bgg, bgb );
323 m_dc->GetPixel( x, y, &col );
324 return RGB( col.Red(), col.Green(), col.Blue() );
328 #endif // PL_HAVE_FREETYPE
341 wxString str( wxConvUTF8.cMB2WC( utf8_string ), *wxConvCurrent );
343 m_dc->GetTextExtent( str, &w, &h, &d, &l );
361 double currentOffset =
yOffset;
362 double currentHeight = h;
363 while ( currentOffset > 0.0001 )
366 currentHeight *= 1.25;
379 double currentOffset =
yOffset;
380 double currentHeight = h;
381 double currentDepth = d;
382 while ( currentOffset < -0.0001 )
385 currentHeight *= 1.25;
386 currentDepth *= 1.25;
412 unsigned char fontFamily, fontStyle, fontWeight;
441 printf(
"Non unicode string passed to the wxWidgets driver, ignoring\n" );
448 printf(
"Sorry, the wxWidgets drivers only handles strings of length < %d\n", 500 );
456 PLINT rcx[4], rcy[4];
460 for (
int i = 0; i < 4; i++ )
462 cpoints[i].x = rcx[i] /
scalex;
465 wxDCClipper clip( *
m_dc, wxRegion( 4, cpoints ) );
479 bool lineFeed =
false;
480 bool carriageReturn =
false;
481 wxCoord paraHeight = 0;
490 && *( lineStart + lineLen ) != (
PLUNICODE)
'\n' )
496 lineFeed = carriageReturn;
498 && *( lineStart + lineLen ) == (
PLUNICODE) (
'\n' );
504 double startingYOffset =
yOffset;
525 lineStart += lineLen;
526 if ( carriageReturn )
void DrawPolyline(short *xa, short *ya, PLINT npts)
void PSSetFont(PLUNICODE fci)
void plP_fci2hex(PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower)
void SetWidth(PLStream *pls)
void SetColor0(PLStream *pls)
void PLFLT PLINT PLINT PLFLT x
static const int max_string_length
void AddtoClipRegion(int x1, int y1, int x2, int y2)
void SetColor1(PLStream *pls)
void PLFLT PLINT PLINT PLFLT PLFLT y
void difilt_clip(PLINT *x_coords, PLINT *y_coords)
void PSDrawTextToDC(char *utf8_string, bool drawText)
void FillPolygon(PLStream *pls)
wxCoord superscriptHeight
void DrawLine(short x1a, short y1a, short x2a, short y2a)
void plRotationShear(PLFLT *xFormMatrix, PLFLT *rotation, PLFLT *shear, PLFLT *stride)
unsigned short unicode_array_len
void ProcessString(PLStream *pls, EscText *args)
virtual void PSDrawText(PLUNICODE *ucs4, int ucs4Len, bool drawText)
void SetExternalBuffer(void *buffer)
void ClearBackground(PLINT bgr, PLINT bgg, PLINT bgb, PLINT x1=-1, PLINT y1=-1, PLINT x2=-1, PLINT y2=-1)
void BlitRectangle(wxDC *dc, int vX, int vY, int vW, int vH)
PLUNICODE * unicode_array