48 #include <wx/ustring.h>
55 #if defined ( WXPLVIEWER_DEBUG ) || defined ( PLPLOT_WX_DEBUG_OUTPUT )
85 typedef std::pair< PLUNICODE *, PLUNICODE *> uniIterPair;
88 std::vector< uniIterPair > lines( 1, uniIterPair( args->
unicode_array, textEnd ) );
93 lines.back().second = uni;
94 lines.push_back( uniIterPair( uni + 1, textEnd ) );
101 printf(
"Non unicode string passed to the wxWidgets driver, ignoring\n" );
108 printf(
"Sorry, the wxWidgets drivers only handles strings of length < %d\n", 500 );
119 bool currentUnderlined =
false;
123 std::vector<wxCoord> lineWidths( lines.size() );
124 std::vector<wxCoord> lineHeights( lines.size() );
125 std::vector<wxCoord> lineDepths( lines.size() );
130 wxCoord paraWidth = 0;
131 wxCoord paraHeight = 0;
133 bool testUnderlined = currentUnderlined =
false;
134 PLFLT identityMatrix[6];
136 for (
size_t i = 0; i < lines.size(); ++i )
138 DrawTextLine( lines[i].first, lines[i].second - lines[i].first, 0, 0, 0, 0, identityMatrix, baseFontSize,
false,
139 testUnderlined, testFci,
140 0, 0, 0, 0.0, lineWidths[i], lineHeights[i], lineDepths[i] );
141 paraWidth =
MAX( paraWidth, lineWidths[i] );
142 paraHeight += lineHeights[i] + lineDepths[i];
151 wxCoord cumSumHeight = 0;
154 PLFLT textTransform[6];
156 textTransform[0] = args->
xform[0];
157 textTransform[2] = args->
xform[1];
158 textTransform[1] = args->
xform[2];
159 textTransform[3] = args->
xform[3];
160 textTransform[4] = 0.0;
161 textTransform[5] = 0.0;
162 PLFLT diorotTransform[6];
165 diorotTransform[0] = 1;
166 diorotTransform[1] = 0;
167 diorotTransform[2] = 0;
168 diorotTransform[3] = 1;
170 else if ( diorot == 1.0 )
172 diorotTransform[0] = 0;
173 diorotTransform[1] = -1;
174 diorotTransform[2] = 1;
175 diorotTransform[3] = 0;
177 else if ( diorot == 2.0 )
179 diorotTransform[0] = -1;
180 diorotTransform[1] = 0;
181 diorotTransform[2] = 0;
182 diorotTransform[3] = -1;
184 else if ( diorot == 3.0 )
186 diorotTransform[0] = 0;
187 diorotTransform[1] = 1;
188 diorotTransform[2] = -1;
189 diorotTransform[3] = 0;
194 PLFLT cosAngle = cos( angle );
195 PLFLT sinAngle = sin( angle );
196 diorotTransform[0] = cosAngle;
197 diorotTransform[1] = -sinAngle;
198 diorotTransform[2] = sinAngle;
199 diorotTransform[3] = cosAngle;
201 diorotTransform[4] = 0;
202 diorotTransform[5] = 0;
204 PLFLT finalTransform[6];
205 memcpy( finalTransform, textTransform,
sizeof (
PLFLT ) * 6 );
208 std::vector<wxCoord> lineWidths_ignored( lines.size() );
209 std::vector<wxCoord> lineHeights_ignored( lines.size() );
210 std::vector<wxCoord> lineDepths_ignored( lines.size() );
211 for (
size_t i = 0; i < lines.size(); ++i )
213 DrawTextLine( lines[i].first, lines[i].second - lines[i].first,
216 -lineWidths[i] * args->
just, 0.5 * ( lineHeights[i] ) - cumSumHeight,
217 finalTransform, baseFontSize,
true,
220 lineHeights_ignored[i], lineDepths_ignored[i] );
226 cumSumHeight += lineHeights[i] + lineDepths[i];
242 void PlDevice::DrawTextLine(
PLUNICODE* ucs4,
int ucs4Len, wxCoord xOrigin, wxCoord yOrigin, wxCoord x, wxCoord y,
PLFLT *transform,
PLFLT baseFontSize,
bool drawText,
bool &underlined,
PLUNICODE &fci,
unsigned char red,
unsigned char green,
unsigned char blue,
PLFLT alpha, wxCoord &textWidth, wxCoord &textHeight, wxCoord &textDepth )
247 PLFLT scaledFontSize = baseFontSize;
251 PLFLT scaledOffset = 0.;
263 PLFLT empiricalSymmetricFactor = 1.2;
265 wxCoord sectionWidth;
266 wxCoord sectionHeight;
267 wxCoord sectionDepth;
286 PLFLT sectionTransform[6];
287 memcpy( sectionTransform, transform,
sizeof ( sectionTransform ) );
299 while ( i < ucs4Len )
308 section += wxUString( (wxChar32) ucs4[i] );
313 DrawTextSection( section, xOrigin, yOrigin, x + textWidth, y + scaledOffset, transform,
314 scaledFontSize, drawText, underlined, fci, red, green, blue, alpha, yScale, sectionWidth, sectionHeight, sectionDepth );
315 textWidth += sectionWidth;
316 textHeight =
MAX( textHeight, sectionHeight + scaledOffset );
317 textDepth =
MAX( textDepth, sectionDepth - scaledOffset );
318 section = wxEmptyString;
333 scaledFontSize = baseFontSize * Scale;
334 scaledOffset = yScale * Offset * baseFontSize * ( level > 0 ? 1.0 / empiricalSymmetricFactor : -1.0 * empiricalSymmetricFactor );
348 scaledFontSize = baseFontSize * Scale;
349 scaledOffset = yScale * Offset * baseFontSize * ( level > 0 ? 1.0 / empiricalSymmetricFactor : -1.0 * empiricalSymmetricFactor );
352 underlined = !underlined;
362 DrawTextSection( section, xOrigin, yOrigin, x + textWidth, y + scaledOffset, transform,
363 scaledFontSize, drawText, underlined, fci, red, green, blue, alpha, yScale, sectionWidth, sectionHeight, sectionDepth );
364 textWidth += sectionWidth;
365 textHeight =
MAX( textHeight, sectionHeight + scaledOffset );
366 textDepth =
MAX( textDepth, sectionDepth - scaledOffset );
367 section = wxEmptyString;
375 section += wxUString( (wxChar32) ucs4[i] );
382 DrawTextSection( section, xOrigin, yOrigin, x + textWidth, y + scaledOffset, transform,
383 scaledFontSize, drawText, underlined, fci, red, green, blue, alpha, yScale, sectionWidth, sectionHeight, sectionDepth );
384 textWidth += sectionWidth;
385 textHeight =
MAX( textHeight, sectionHeight + scaledOffset );
386 textDepth =
MAX( textDepth, sectionDepth - scaledOffset );
411 Scaler( wxDC * dc,
double xScale,
double yScale )
417 dc->SetUserScale( xScale, yScale );
448 dc->SetLogicalOrigin( xOrigin, yOrigin );
478 m_pen = dc->GetPen();
481 dc->SetBrush( brush );
546 TextObjectsChanger( wxDC *dc,
const wxFont &font,
const wxColour &textForeground,
const wxColour &textBackground )
551 dc->SetTextForeground( textForeground );
552 dc->SetTextBackground( textBackground );
568 dc->SetTextForeground( textForeground );
569 dc->SetTextBackground( textBackground );
601 wxRect newRect = rect;
605 dc->SetClippingRegion( wxRect( -1, -1, 1, 1 ) );
607 dc->SetClippingRegion( rect );
614 m_dc->DestroyClippingRegion();
615 m_dc->SetClippingRegion( wxRect( 0, 0, 0, 0 ) );
616 m_dc->DestroyClippingRegion();
649 std::fstream fin(
"/dev/urandom", std::ios::in );
655 fin.open(
"/dev/random", std::ios::in );
670 unsigned int next =
m_seed;
675 result = (
unsigned int) ( next /
max ) % 2048;
680 result ^= (
unsigned int) ( next /
max ) % 1024;
685 result ^= (
unsigned int) ( next /
max ) % 1024;
691 static const unsigned int max = 65536;
698 unsigned char plFontFamily, plFontStyle, plFontWeight;
707 pt =
ROUND( scaledFontSize );
713 m_size = std::numeric_limits<PLFLT>::quiet_NaN();
724 if ( createFontOnConstruction )
736 m_font = wxFont( pt, family, style, weight,
m_underlined, wxEmptyString, wxFONTENCODING_DEFAULT );
741 if ( pt == wxDEFAULT )
742 m_font.SetPointSize( pt );
777 Font newFont( fci, scaledFontSize, underlined );
796 : m_plplotEdgeLength(
PLFLT( SHRT_MAX ) ), m_interactiveTextImage( 1, 1 )
814 throw(
"wxPLDevice::wxPLDevice: unknown failure in new wxGCDC( gc )" );
819 strcpy(
m_mfo, mfo );
823 #ifdef WXPLVIEWER_DEBUG
824 strcpy(
m_mfo,
"plplotMemoryMap" );
826 strcpy(
m_mfo,
"plplotMemoryMap??????????" );
864 if ( pls->
xdpi <= 0. || pls->
ydpi <= 0. )
892 pls->
dev = (
void *)
this;
904 #ifdef PL_WXWIDGETS_IPC3
905 m_header.completeFlag = 1;
958 for (
PLINT i = 1; i < npts; i++ )
975 x1 = x1 < 0 ? 0 : x1;
977 y1 = y1 < 0 ? 0 : y1;
982 PLINT width = abs( x1 - x2 );
983 PLINT height = abs( y1 - y2 );
985 if ( width > 0 && height > 0 )
990 wxColour bgColour( r, g, b, a * 255 );
992 m_dc->DrawRectangle( x, y, width, height );
1013 wxPoint *points =
new wxPoint[pls->
dev_npts];
1014 wxCoord xoffset = 0;
1015 wxCoord yoffset = 0;
1017 for (
int i = 0; i < pls->
dev_npts; i++ )
1025 m_dc->DrawPolygon( pls->
dev_npts, points, xoffset, yoffset, wxODDEVEN_RULE );
1029 m_dc->DrawPolygon( pls->
dev_npts, points, xoffset, yoffset, wxWINDING_RULE );
1044 pls->
curcolor.
a * 255 ), width, wxSOLID );
1057 pls->
curcolor.
a * 255 ), width, wxSOLID );
1072 throw(
"wxPLDevice::SetDC The DC must be set before initialisation. The device is outputting to a separate viewer" );
1078 #if wxVERSION_NUMBER >= 2902
1086 wxGCDC *gcdc = NULL;
1091 gcdc =
dynamic_cast< wxGCDC*
>(
m_dc );
1095 throw(
"unknown failure in dynamic_cast< wxGCDC* >( m_dc )" );
1098 m_gc = gcdc->GetGraphicsContext();
1100 strcpy(
m_mfo,
"" );
1128 void wxPLDevice::DrawTextSection( wxString section, wxCoord xOrigin, wxCoord yOrigin, wxCoord x, wxCoord y,
PLFLT *transform,
PLFLT scaledFontSize,
bool drawText,
bool underlined,
PLUNICODE fci,
unsigned char red,
unsigned char green,
unsigned char blue,
PLFLT alpha,
PLFLT &yScale, wxCoord §ionWidth, wxCoord §ionHeight, wxCoord §ionDepth )
1149 PLFLT empiricalYOffset = -0.020 * scaledFontSize *
m_yScale;
1150 wxCoord empiricalY = y + empiricalYOffset;
1165 m_dc->GetTextExtent( section, §ionWidth, §ionHeight,
1166 §ionDepth, &leading, &theFont );
1173 §ionDepth, &leading, &theFont );
1184 sectionHeight -= leading;
1185 sectionDepth += leading;
1191 if ( drawText &&
m_dc )
1194 m_dc->SetTextBackground( wxColour( red, green, blue, alpha * 255 ) );
1195 m_dc->SetTextForeground( wxColour( red, green, blue, alpha * 255 ) );
1198 PLINT rcx[4], rcy[4];
1201 for (
int i = 0; i < 4; i++ )
1206 Clipper clipper(
m_dc, wxRegion( 4, cpoints ).GetBox() );
1213 #if wxVERSION_NUMBER >= 2902
1214 wxAffineMatrix2D originalDcMatrix =
m_dc->GetTransformMatrix();
1216 wxAffineMatrix2D newMatrix = originalDcMatrix;
1218 wxAffineMatrix2D textMatrix;
1225 transform[0], transform[2],
1226 transform[1], transform[3] ),
1228 xTransform, yTransform ) );
1229 newMatrix.Concat( textMatrix );
1230 m_dc->SetTransformMatrix( newMatrix );
1232 m_dc->DrawText( section, x /
m_xScale, -empiricalY / m_yScale );
1234 m_dc->SetTransformMatrix( originalDcMatrix );
1239 wxGraphicsMatrix originalGcMatrix =
m_gc->GetTransform();
1271 wxGraphicsMatrix matrix =
m_gc->CreateMatrix(
1272 transform[0], -transform[1],
1273 -transform[2], transform[3],
1274 xTransform, -yTransform );
1275 wxGraphicsMatrix reflectMatrix =
m_gc->CreateMatrix();
1276 m_gc->ConcatTransform( matrix );
1277 m_gc->DrawText( section, x /
m_xScale, -empiricalY / m_yScale );
1278 m_gc->SetTransform( originalGcMatrix );
1287 PLFLT xTransformed = x /
m_xScale * transform[0] + empiricalY / m_yScale * transform[2] + transform[4] /
m_xScale;
1288 PLFLT yTransformed = x /
m_xScale * transform[1] + empiricalY / m_yScale * transform[3] + transform[4] /
m_xScale;
1292 PLFLT angle = atan2( transform[1], transform[0] ) * 180.0 /
M_PI;
1293 m_dc->DrawRotatedText( section, xOrigin /
m_xScale + xTransformed,
m_height - yOrigin / m_yScale - yTransformed, angle );
1348 plP_gphy( &xmin, &xmax, &ymin, &ymax );
1408 #ifdef PL_WXWIDGETS_IPC3
1422 #ifdef PL_WXWIDGETS_IPC3
1429 m_header.transmissionType = transmissionType;
1434 switch ( transmissionType )
1438 m_header.locateModeFlag = 1;
1444 m_header.plbufAmountToTransmit = 0;
1451 case transmissionFlush:
1456 throw(
"wxPLDevice::TransmitBuffer: called with invalid value of transmissionType" );
1460 #ifdef PLPLOT_WX_DEBUG_OUTPUT
1461 std::cerr <<
"Before transmitBytes" << std::endl;
1462 std::cerr <<
"transmissionType = " <<
static_cast<unsigned int>( m_header.transmissionType ) << std::endl;
1463 std::cerr <<
"plbufAmountToTransmit = " << m_header.plbufAmountToTransmit << std::endl;
1464 std::cerr <<
"viewerOpenFlag = " << m_header.viewerOpenFlag << std::endl;
1465 std::cerr <<
"locateModeFlag = " << m_header.locateModeFlag << std::endl;
1466 std::cerr <<
"completeFlag = " << m_header.completeFlag << std::endl;
1467 #endif // #ifdef PLPLOT_WX_DEBUG_OUTPUT
1469 if ( m_header.plbufAmountToTransmit > 0 )
1479 catch (
const char *message )
1482 plwarn(
"wxPLDevice::TransmitBuffer: error" );
1487 plwarn(
"wxPLDevice::TransmitBuffer: Unknown error" );
1490 #else // #ifdef PL_WXWIDGETS_IPC3
1493 const size_t headerSize =
sizeof ( transmissionType ) +
sizeof (
size_t );
1496 const size_t counterLimit = 10000;
1497 bool completed =
false;
1498 while ( !completed && counter < counterLimit )
1507 size_t copyAmount = 0;
1508 size_t freeSpace = 0;
1526 if ( freeSpace <= headerSize )
1539 plwarn(
"wxWidgets wrapping buffer" );
1553 if ( amountToCopy == 0 )
1562 && amountToCopy == 0 )
1565 (
void *) ( &transmissionType ),
sizeof ( transmissionType ) );
1601 (
void *) ( &transmissionType ),
sizeof ( transmissionType ) );
1615 if ( freeSpace > headerSize )
1618 copyAmount =
MIN( amountToCopy, freeSpace - headerSize );
1621 if ( copyAmount != amountToCopy )
1630 (
char *) ( ©Amount ),
sizeof ( copyAmount ) );
1637 amountToCopy -= copyAmount;
1653 plwarn(
"Locking mutex failed when trying to communicate with wxPLViewer." );
1659 plwarn(
"Unknown error when trying to communicate with wxPLViewer." );
1663 if ( counter == counterLimit )
1665 plwarn(
"Communication timeout with wxPLViewer - disconnecting" );
1668 #endif // #ifdef PL_WXWIDGETS_IPC3
1674 if ( strlen(
m_mfo ) > 0 )
1676 #ifdef PL_WXWIDGETS_IPC3
1677 const size_t mapSize =
sizeof ( shmbuf );
1679 const size_t mapSize = 1024 * 1024;
1685 static Rand randomGenerator;
1686 while ( nTries < 10 )
1689 for (
int i = 0; i < strlen(
m_mfo ); ++i )
1691 if (
m_mfo[i] ==
'?' )
1692 mapName[i] =
'A' + (char) ( randomGenerator() % 26 );
1694 mapName[i] =
m_mfo[i];
1697 mapName[strlen(
m_mfo )] =
'\0';
1701 pldebug(
"wxPLDevice::SetupMemoryMap",
"nTries = %d, mapName = %s\n", nTries, mapName );
1707 #ifndef PL_WXWIDGETS_IPC3
1708 strcpy( mutexName, mapName );
1709 strcat( mutexName,
"mut" );
1710 pldebug(
"wxPLDevice::SetupMemoryMap",
"nTries = %d, mutexName = %s\n", nTries, mutexName );
1714 #endif // #ifndef PL_WXWIDGETS_IPC3
1724 plwarn(
"Error creating memory map for wxWidget instruction transmission. The plots will not be displayed" );
1728 #ifdef PL_WXWIDGETS_IPC3
1732 m_header.viewerOpenFlag = 0;
1733 m_header.locateModeFlag = 0;
1734 m_header.completeFlag = 0;
1735 #else // #ifdef PL_WXWIDGETS_IPC3
1742 #endif // #ifdef PL_WXWIDGETS_IPC3
1747 wxString exeName = wxT(
"wxPLViewer" );
1751 wxArrayString files;
1752 wxString utilsDir = wxString( wxT(
BUILD_DIR ) ) + wxString( wxT(
"/utils" ) );
1753 wxDir::GetAllFiles( utilsDir, &files, exeName, wxDIR_FILES | wxDIR_DIRS );
1754 if ( files.size() == 0 )
1755 wxDir::GetAllFiles( utilsDir, &files, exeName + wxT(
".exe" ), wxDIR_FILES | wxDIR_DIRS );
1756 if ( files.size() > 0 )
1762 wxArrayString files;
1763 wxDir::GetAllFiles( wxT(
BIN_DIR ), &files, exeName, wxDIR_FILES | wxDIR_DIRS );
1764 if ( files.size() == 0 )
1765 wxDir::GetAllFiles( wxT(
BIN_DIR ), &files, exeName + wxT(
".exe" ), wxDIR_FILES | wxDIR_DIRS );
1766 if ( files.size() > 0 )
1771 command << wxT(
"\"" ) << exeName << wxT(
"\" " ) << wxString( mapName, wxConvUTF8 ) << wxT(
" " ) <<
1773 #ifndef WXPLVIEWER_DEBUG
1776 if ( wxExecute( command, wxEXEC_ASYNC ) == 0 )
1777 plwarn(
"Failed to run wxPLViewer - no plots will be shown" );
1780 command << wxT(
" &" );
1781 system( command.mb_str() );
1783 #else // ifndef WXPLVIEWER_DEBUG
1784 wxString runMessage;
1785 runMessage <<
"Begin Running wxPLViewer in the debugger now to continue. Use the parameters: plplotMemoryMap " <<
1790 std::cerr << runMessage << std::endl;
1791 #endif // ifndef WXPLVIEWER_DEBUG
1793 #ifdef PL_WXWIDGETS_IPC3
1810 #ifdef PLPLOT_WX_DEBUG_OUTPUT
1811 std::cerr <<
"After receiveBytes" << std::endl;
1812 std::cerr <<
"transmissionType = " <<
static_cast<unsigned int>( m_header.transmissionType ) << std::endl;
1813 std::cerr <<
"plbufAmountToTransmit = " << m_header.plbufAmountToTransmit << std::endl;
1814 std::cerr <<
"viewerOpenFlag = " << m_header.viewerOpenFlag << std::endl;
1815 std::cerr <<
"locateModeFlag = " << m_header.locateModeFlag << std::endl;
1816 std::cerr <<
"completeFlag = " << m_header.completeFlag << std::endl;
1817 #endif // #ifdef PLPLOT_WX_DEBUG_OUTPUT
1819 catch (
const char *message )
1822 plwarn(
"wxPLDevice::SetupMemoryMap: error" );
1826 plwarn(
"wxPLDevice::SetupMemoryMap: Unknown error" );
1829 size_t &viewerSignal = m_header.viewerOpenFlag;
1830 #else // #ifdef PL_WXWIDGETS_IPC3
1832 #ifndef WXPLVIEWER_DEBUG
1833 size_t maxTries = 1000;
1834 #else // ifndef WXPLVIEWER_DEBUG
1835 size_t maxTries = 100000;
1836 #endif // ifndef WXPLVIEWER_DEBUG
1840 while ( counter < maxTries && viewerSignal == 0 )
1845 #endif // #ifdef PL_WXWIDGETS_IPC3
1846 if ( viewerSignal == 0 )
1847 plwarn(
"wxPLViewer failed to signal it has found the shared memory." );
1856 #ifdef PL_WXWIDGETS_IPC3
1859 *graphicsIn = m_header.graphicsIn;
1860 #else // #ifdef PL_WXWIDGETS_IPC3
1863 bool gotResponse =
false;
1864 while ( !gotResponse )
1866 wxMilliSleep( 100 );
1873 #endif //ifdef PL_WXWIDGETS_IPC3
1877 plwarn(
"plGetCursor cannot be used when the user supplies a wxDC or until wxPLViewer is initialised" );
1878 graphicsIn->
dX = -1;
1879 graphicsIn->
dY = -1;
1880 graphicsIn->
pX = -1;
1881 graphicsIn->
pY = -1;
1892 PLINT rcx[4], rcy[4];
1896 for (
int i = 0; i < 4; i++ )
1901 return wxRegion( 4, cpoints );
wxGCDC * m_interactiveTextGcdc
void plP_script_scale(PLBOOL ifupper, PLINT *level, PLFLT *old_scale, PLFLT *scale, PLFLT *old_offset, PLFLT *offset)
void SetColor(PLStream *pls)
void Flush(PLStream *pls)
TextObjectsChanger(wxDC *dc, const wxFont &font, const wxColour &textForeground, const wxColour &textBackground)
const PLFLT m_plplotEdgeLength
TextObjectsChanger & operator=(const TextObjectsChanger &)
wxImage m_interactiveTextImage
void Locate(PLStream *pls, PLGraphicsIn *graphicsIn)
void plP_fci2hex(PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower)
static const unsigned int max
wxColour m_textBackground
wxPLDevice(PLStream *pls, char *mfo, PLINT text, PLINT hrshsym)
void plP_affine_identity(PLFLT *affine_vector)
void SetWidth(PLStream *pls)
TextObjectsChanger(wxDC *dc, FontGrabber &fontGrabber, PLUNICODE fci, PLFLT size, bool underlined, const wxColour &textForeground, const wxColour &textBackground)
#define PLPLOT_MM_PER_INCH
virtual ~wxPLDevice(void)
bool m_useDcTextTransform
void FillPolygon(PLStream *pls)
void DrawLine(short x1a, short y1a, short x2a, short y2a)
void ClearBackground(PLStream *pls, PLINT x1=-1, PLINT y1=-1, PLINT x2=-1, PLINT y2=-1)
TextObjectsChanger(wxDC *dc, const wxFont &font)
virtual void DrawTextSection(wxString section, wxCoord xOrigin, wxCoord yOrigin, wxCoord x, wxCoord y, PLFLT *transform, PLFLT scaledFontSize, bool drawText, bool underlined, PLUNICODE fci, unsigned char red, unsigned char green, unsigned char blue, PLFLT alpha, PLFLT &yScale, wxCoord §ionWidth, wxCoord §ionHeight, wxCoord §ionDepth)
bool isEverythingClipped()
void DrawPolyline(short *xa, short *ya, PLINT npts)
void PreDestructorTidy(PLStream *pls)
OriginChanger & operator=(const OriginChanger &)
Scaler(wxDC *dc, double xScale, double yScale)
DrawingObjectsChanger & operator=(const DrawingObjectsChanger &)
void create(const char *name, bool aquireOnCreate=false)
size_t m_localBufferPosition
Clipper & operator=(const Clipper &)
TextObjectsSaver & operator=(const TextObjectsSaver &)
bool getUnderlined() const
Font GetFont(PLUNICODE fci, PLFLT scaledFontSize, bool underlined)
void DrawTextLine(PLUNICODE *ucs4, int ucs4Len, wxCoord xOrigin, wxCoord yOrigin, wxCoord x, wxCoord y, PLFLT *transform, PLFLT baseFontSize, bool drawText, bool &underlined, PLUNICODE &fci, unsigned char red, unsigned char green, unsigned char blue, PLFLT alpha, wxCoord &textWidth, wxCoord &textHeight, wxCoord &textDepth)
void drawText(PLStream *pls, EscText *args)
void difilt_clip(PLINT *x_coords, PLINT *y_coords)
#define PLPLOT_DEFAULT_WIDTH_PIXELS
#define PLPLOT_DEFAULT_PIXELS_PER_INCH
void plP_setpxl(PLFLT xpmm, PLFLT ypmm)
char m_mfo[PLPLOT_MAX_PATH]
void TransmitBuffer(PLStream *pls, unsigned char transmissionType)
void plP_affine_multiply(PLFLT *affine_vectorA, PLFLT_VECTOR affine_vectorB, PLFLT_VECTOR affine_vectorC)
static PLStream * pls[PL_NSTREAMS]
void plP_setphy(PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
unsigned short unicode_array_len
DrawingObjectsChanger(wxDC *dc, const wxPen &pen, const wxBrush &brush)
#define PLPLOT_POINTS_PER_INCH
void FixAspectRatio(bool fix)
void EndPage(PLStream *pls)
unsigned int operator()()
static Tcl_DString command
TextObjectsSaver(wxDC *dc)
Clipper(wxDC *dc, const wxRect &rect)
wxColour m_textForeground
void create(const char *name, PLINT size, bool mustExist, bool mustNotExist)
#define PLPLOT_wxLogDebug(string)
void plwarn(PLCHAR_VECTOR errormsg)
void SetSize(PLStream *pls, int width, int height)
void SetDC(PLStream *pls, wxDC *dc)
void DrawTextSection(wxString section, wxCoord xOrigin, wxCoord yOrigin, wxCoord x, wxCoord y, PLFLT *transform, PLFLT scaledFontSize, bool drawText, bool underlined, PLUNICODE fci, unsigned char red, unsigned char green, unsigned char blue, PLFLT alpha, PLFLT &yScale, wxCoord §ionWidth, wxCoord §ionHeight, wxCoord §ionDepth)
wxCoord m_prevSymbolHeight
void BeginPage(PLStream *pls)
PLMemoryMap m_outputMemoryMap
#define PLPLOT_DEFAULT_HEIGHT_PIXELS
void plP_gphy(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
wxCoord m_prevSymbolWidth
PLUNICODE * unicode_array
OriginChanger(wxDC *dc, wxCoord xOrigin, wxCoord yOrigin)
Scaler & operator=(const Scaler &)
FontGrabber m_fontGrabber
wxCoord m_prevSymbolDepth