-rw-r--r-- | noncore/unsupported/qpdf/QOutputDev.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/unsupported/qpdf/QOutputDev.cpp b/noncore/unsupported/qpdf/QOutputDev.cpp index 15a58b1..f587a33 100644 --- a/noncore/unsupported/qpdf/QOutputDev.cpp +++ b/noncore/unsupported/qpdf/QOutputDev.cpp @@ -136,98 +136,96 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp f. setBold ( subst-> m_bold ); f. setItalic ( subst-> m_italic ); } else { QFont::StyleHint sty; if ( gfxFont-> isSerif ( )) sty = QFont::Serif; else if ( gfxFont-> isFixedWidth ( )) sty = QFont::TypeWriter; else sty = QFont::Helvetica; f. setStyleHint ( sty, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality )); f. setBold ( gfxFont-> isBold ( ) > 0 ); f. setItalic ( gfxFont-> isItalic ( ) > 0 ); f. setFixedPitch ( gfxFont-> isFixedWidth ( ) > 0 ); // common specifiers in font names if ( fname. contains ( "Oblique" ) || fname. contains ( "Italic" )) f. setItalic ( true ); if ( fname. contains ( "Bold" )) f. setWeight ( QFont::Bold ); if ( fname. contains ( "Demi" )) f. setWeight ( QFont::DemiBold ); if ( fname. contains ( "Light" )) f. setWeight ( QFont::Light ); if ( fname. contains ( "Black" )) f. setWeight ( QFont::Black ); } // Treat x-sheared fonts as italic if (( m12 > -0.1 ) && ( m12 < 0.1 ) && ((( m21 > -5.0 ) && ( m21 < -0.1 )) || (( m21 > 0.1 ) && ( m21 < 5.0 )))) { f. setItalic ( true ); } return f; } //------------------------------------------------------------------------ // QOutputDev //------------------------------------------------------------------------ QOutputDev::QOutputDev ( QWidget *parent, const char *name, int flags ) : QScrollView ( parent, name, WRepaintNoErase | WResizeNoErase | flags ) { m_pixmap = 0; m_painter = 0; - m_use_string = true; - // create text object m_text = new TextPage ( gFalse ); } QOutputDev::~QOutputDev ( ) { delete m_painter; delete m_pixmap; delete m_text; } void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) { delete m_pixmap; delete m_painter; m_pixmap = new QPixmap ( lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( ))); m_painter = new QPainter ( m_pixmap ); QPDFDBG( printf ( "NEW PIXMAP (%ld x %ld)\n", lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( )))); resizeContents ( m_pixmap-> width ( ), m_pixmap-> height ( )); setContentsPos ( 0, 0 ); m_pixmap-> fill ( white ); // clear window m_text-> clear ( ); // cleat text object viewport ( )-> repaint ( ); } void QOutputDev::endPage ( ) { m_text-> coalesce ( ); delete m_painter; m_painter = 0; updateContents ( 0, 0, contentsWidth ( ), contentsHeight ( )); } void QOutputDev::drawLink ( Link *link, Catalog */*catalog*/ ) { fp_t x1, y1, x2, y2, w; link-> getBorder ( &x1, &y1, &x2, &y2, &w ); if ( w > 0 ) { int x, y, dx, dy; |