Changeset 769 for trunk/src/gui/painting/qprintengine_ps.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/painting/qprintengine_ps.cpp
r651 r769 486 486 QByteArray header; 487 487 QPdf::ByteStream s(&header); 488 s << "%!PS-Adobe-1.0";489 488 490 489 qreal scale = 72. / ((qreal) q->metric(QPaintDevice::PdmDpiY)); … … 498 497 int height = pageRect.height(); 499 498 if (finished && pageCount == 1 && copies == 1 && 500 ((fullPage && qt_gen_epsf) || (outputFileName.endsWith(QLatin1String(".eps")))) 501 ) { 499 ((fullPage && qt_gen_epsf) || (outputFileName.endsWith(QLatin1String(".eps"))))) 500 { 501 // According to the EPSF 3.0 spec it is required that the PS 502 // version is PS-Adobe-3.0 503 s << "%!PS-Adobe-3.0"; 502 504 if (!boundingBox.isValid()) 503 505 boundingBox.setRect(0, 0, width, height); … … 506 508 boundingBox.translate(-mleft, -mtop); 507 509 s << " EPSF-3.0\n%%BoundingBox: " 508 << (int)(printer->height() - boundingBox.bottom())*scale// llx509 << (int)(printer->width() - boundingBox.right())*scale - 1// lly510 << (int)(printer->height() - boundingBox.top())*scale + 1// urx511 << (int)(printer->width() - boundingBox.left())*scale; // ury510 << int((printer->height() - boundingBox.bottom())*scale) // llx 511 << int((printer->width() - boundingBox.right())*scale - 1) // lly 512 << int((printer->height() - boundingBox.top())*scale + 1) // urx 513 << int((printer->width() - boundingBox.left())*scale); // ury 512 514 } else { 513 515 if (!fullPage) 514 516 boundingBox.translate(mleft, -mtop); 515 517 s << " EPSF-3.0\n%%BoundingBox: " 516 << (int)(boundingBox.left())*scale517 << (int)(printer->height() - boundingBox.bottom())*scale - 1518 << (int)(boundingBox.right())*scale + 1519 << (int)(printer->height() - boundingBox.top())*scale;518 << int((boundingBox.left())*scale) 519 << int((printer->height() - boundingBox.bottom())*scale - 1) 520 << int((boundingBox.right())*scale + 1) 521 << int((printer->height() - boundingBox.top())*scale); 520 522 } 521 523 } else { 524 s << "%!PS-Adobe-1.0"; 522 525 int w = width + (fullPage ? 0 : mleft + mright); 523 526 int h = height + (fullPage ? 0 : mtop + mbottom);
Note:
See TracChangeset
for help on using the changeset viewer.