fprintf( m_pstream, "(" );
const wxWX2MBbuf textbuf = text.mb_str();
fprintf( m_pstream, "(" );
const wxWX2MBbuf textbuf = text.mb_str();
for (i = 0; i < 100; i++)
if (buffer[i] == ',') buffer[i] = '.';
fprintf(m_pstream, buffer);
fprintf( m_pstream, "(" );
const wxWX2MBbuf textbuf = text.mb_str();
for (i = 0; i < 100; i++)
if (buffer[i] == ',') buffer[i] = '.';
fprintf(m_pstream, buffer);
fprintf( m_pstream, "(" );
const wxWX2MBbuf textbuf = text.mb_str();
wxCoord minY = (wxCoord) YLOG2DEV(m_minY);
wxCoord maxX = (wxCoord) XLOG2DEV(m_maxX);
wxCoord maxY = (wxCoord) YLOG2DEV(m_maxY);
wxCoord minY = (wxCoord) YLOG2DEV(m_minY);
wxCoord maxX = (wxCoord) XLOG2DEV(m_maxX);
wxCoord maxY = (wxCoord) YLOG2DEV(m_maxY);
// LOG2DEV may have changed the minimum to maximum vice versa
if ( minX > maxX ) { wxCoord tmp = minX; minX = maxX; maxX = tmp; }
if ( minY > maxY ) { wxCoord tmp = minY; minY = maxY; maxY = tmp; }
// LOG2DEV may have changed the minimum to maximum vice versa
if ( minX > maxX ) { wxCoord tmp = minX; minX = maxX; maxX = tmp; }
if ( minY > maxY ) { wxCoord tmp = minY; minY = maxY; maxY = tmp; }
// account for used scaling (boundingbox is before scaling in ps-file)
double scale_x = m_printData.GetPrinterScaleX() / ms_PSScaleFactor;
double scale_y = m_printData.GetPrinterScaleY() / ms_PSScaleFactor;
// account for used scaling (boundingbox is before scaling in ps-file)
double scale_x = m_printData.GetPrinterScaleX() / ms_PSScaleFactor;
double scale_y = m_printData.GetPrinterScaleY() / ms_PSScaleFactor;
-
- wxCoord llx, lly, urx, ury;
+
+ wxCoord llx, lly, urx, ury;
llx = (wxCoord) ((minX+wx_printer_translate_x)*scale_x);
lly = (wxCoord) ((minY+wx_printer_translate_y)*scale_y);
urx = (wxCoord) ((maxX+wx_printer_translate_x)*scale_x);
llx = (wxCoord) ((minX+wx_printer_translate_x)*scale_x);
lly = (wxCoord) ((minY+wx_printer_translate_y)*scale_y);
urx = (wxCoord) ((maxX+wx_printer_translate_x)*scale_x);
- sprintf( buffer, "%.8f %.8f scale\n", scale_x / ms_PSScaleFactor,
+ sprintf( buffer, "%.8f %.8f scale\n", scale_x / ms_PSScaleFactor,
scale_y / ms_PSScaleFactor);
for (int i = 0; i < 100; i++)
if (buffer[i] == ',') buffer[i] = '.';
scale_y / ms_PSScaleFactor);
for (int i = 0; i < 100; i++)
if (buffer[i] == ',') buffer[i] = '.';
wxCoord fwidth, wxCoord fheight,
wxDC *source,
wxCoord xsrc, wxCoord ysrc,
wxCoord fwidth, wxCoord fheight,
wxDC *source,
wxCoord xsrc, wxCoord ysrc,
- afmFile = fopen() may fail and in that case the next if branch
MUST be executed - and it would not if there was "else" */
{
- afmFile = fopen() may fail and in that case the next if branch
MUST be executed - and it would not if there was "else" */
{
- wxLogDebug( wxT("GetTextExtent: can't open AFM file '%hs'\n"), afmName.c_str() );
- wxLogDebug( wxT(" using approximate values\n"));
+ wxLogDebug( wxT("GetTextExtent: can't open AFM file '%hs'"), afmName.c_str() );
+ wxLogDebug( wxT(" using approximate values"));
for (int i=0; i<256; i++) lastWidths[i] = 500; /* an approximate value */
lastDescender = -150; /* dito. */
}
for (int i=0; i<256; i++) lastWidths[i] = 500; /* an approximate value */
lastDescender = -150; /* dito. */
}
if ((sscanf(line,"%s%d",descString,&lastDescender)!=2) ||
(strcmp(descString,"Descender")!=0))
{
if ((sscanf(line,"%s%d",descString,&lastDescender)!=2) ||
(strcmp(descString,"Descender")!=0))
{
if ((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2) ||
(strcmp(upString,"UnderlinePosition")!=0))
{
if ((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2) ||
(strcmp(upString,"UnderlinePosition")!=0))
{
- wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlinePosition)\n"), afmName.c_str(), line );
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlinePosition)"), afmName.c_str(), line );
if ((sscanf(line,"%s%lf",utString,&UnderlineThickness)!=2) ||
(strcmp(utString,"UnderlineThickness")!=0))
{
if ((sscanf(line,"%s%lf",utString,&UnderlineThickness)!=2) ||
(strcmp(utString,"UnderlineThickness")!=0))
{
- wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlineThickness)\n"), afmName.c_str(), line );
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlineThickness)"), afmName.c_str(), line );
if ((sscanf(line,"%s%s",utString,encString)!=2) ||
(strcmp(utString,"EncodingScheme")!=0))
{
if ((sscanf(line,"%s%s",utString,encString)!=2) ||
(strcmp(utString,"EncodingScheme")!=0))
{
- wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad EncodingScheme)\n"), afmName.c_str(), line );
+ wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad EncodingScheme)"), afmName.c_str(), line );
{
if (sscanf(line,"%s%d%s%s%d",cString,&ascii,semiString,WXString,&cWidth)!=5)
{
{
if (sscanf(line,"%s%d%s%s%d",cString,&ascii,semiString,WXString,&cWidth)!=5)
{
- wxLogDebug(wxT("AFM-file '%hs': line '%hs' has an error (bad character width)\n"),afmName.c_str(),line);
+ wxLogDebug(wxT("AFM-file '%hs': line '%hs' has an error (bad character width)"),afmName.c_str(),line);
}
if(strcmp(cString,"C")!=0 || strcmp(semiString,";")!=0 || strcmp(WXString,"WX")!=0)
{
}
if(strcmp(cString,"C")!=0 || strcmp(semiString,";")!=0 || strcmp(WXString,"WX")!=0)
{
}
/* printf(" char '%c'=%d has width '%d'\n",ascii,ascii,cWidth); */
if (ascii>=0 && ascii<256)
}
/* printf(" char '%c'=%d has width '%d'\n",ascii,ascii,cWidth); */
if (ascii>=0 && ascii<256)