From 227296e610768f253735324ff86444b49f0925fe Mon Sep 17 00:00:00 2001 From: Wilfried Huss Date: Sat, 24 Jun 2006 20:16:37 +0000 Subject: [PATCH] qt3support-- svn path=/trunk/KDE/kdegraphics/kviewshell/plugins/dvi/; revision=554697 --- TeXFont_PK.cpp | 9 ++++----- special.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/TeXFont_PK.cpp b/TeXFont_PK.cpp index 5d4ae6643..6882d4f0c 100644 --- a/TeXFont_PK.cpp +++ b/TeXFont_PK.cpp @@ -203,7 +203,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol int shrunk_height = (int)ceil( (characterBitmaps[ch]->h - srcYTrans)/shrinkFactor ); // Turn the image into 8 bit - QByteArray translated(characterBitmaps[ch]->w * characterBitmaps[ch]->h); + QByteArray translated(characterBitmaps[ch]->w * characterBitmaps[ch]->h, '\0'); quint8 *data = (quint8 *)translated.data(); for(int x=0; xw; x++) for(int y=0; yh; y++) { @@ -214,7 +214,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol } // Now shrink the image. We shrink the X-direction first - QByteArray xshrunk(shrunk_width*characterBitmaps[ch]->h); + QByteArray xshrunk(shrunk_width*characterBitmaps[ch]->h, '\0'); quint8 *xdata = (quint8 *)xshrunk.data(); // Do the shrinking. The pixel (x,y) that we want to calculate @@ -242,7 +242,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol } // Now shrink the Y-direction - QByteArray xyshrunk(shrunk_width*shrunk_height); + QByteArray xyshrunk(shrunk_width*shrunk_height, '\0'); quint8 *xydata = (quint8 *)xyshrunk.data(); for(int x=0; xfont_pool->QPixmapSupportsAlpha) { diff --git a/special.cpp b/special.cpp index 8d4a657e7..4a9e3cf90 100644 --- a/special.cpp +++ b/special.cpp @@ -152,7 +152,7 @@ QColor dviRenderer::parseColorSpecification(const QString& colorSpec) if ((ok == false) || (b < 0.0) || (b > 1.0)) return QColor(); - return QColor((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5), QColor::Hsv); + return QColor::fromHsv((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5)); } if (specType.indexOf("cmyk", 0, Qt::CaseInsensitive) == 0) { @@ -424,10 +424,10 @@ void dviRenderer::epsf_special(const QString& cp) f.setPointSize(8); foreGroundPainter->setFont(f); if (QFile::exists(EPSfilename)) - foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename, -1); + foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename); else foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), - i18n("File not found: \n %1", EPSfilename_orig), -1); + i18n("File not found: \n %1", EPSfilename_orig)); foreGroundPainter->restore(); } @@ -448,7 +448,7 @@ void dviRenderer::TPIC_flushPath_special() QPen pen(Qt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches foreGroundPainter->setPen(pen); - foreGroundPainter->drawPolyline(TPIC_path, 0, number_of_elements_in_path); + foreGroundPainter->drawPolyline(TPIC_path.constData(), number_of_elements_in_path); number_of_elements_in_path = 0; }