[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kviewshell/plugins/dvi
From: Wilfried Huss <Wilfried.Huss () gmx ! at>
Date: 2006-06-24 20:16:39
Message-ID: 1151180199.853356.18243.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 554697 by whuss:
qt3support--
M +4 -5 TeXFont_PK.cpp
M +4 -4 special.cpp
--- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/TeXFont_PK.cpp #554696:554697
@@ -203,7 +203,7 @@
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; x<characterBitmaps[ch]->w; x++)
for(int y=0; y<characterBitmaps[ch]->h; y++) {
@@ -214,7 +214,7 @@
}
// 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 @@
}
// 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; x<shrunk_width; x++)
for(int y=0; y<shrunk_height; y++) {
@@ -261,8 +261,7 @@
xydata[shrunk_width*y + x] = (int)(value/shrinkFactor);
}
- QImage im32(shrunk_width, shrunk_height, 32);
- im32.setAlphaBuffer(true);
+ QImage im32(shrunk_width, shrunk_height, QImage::Format_ARGB32);
// Do QPixmaps fully support the alpha channel? If yes, we use
// that. Otherwise, use other routines as a fallback
if (parent->font_pool->QPixmapSupportsAlpha) {
--- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/special.cpp #554696:554697
@@ -152,7 +152,7 @@
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 @@
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 @@
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;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic