Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 8568 → Rev 8569

/branches/Version135x/Scribus/scribus/scpainterex_gdi.cpp
409,8 → 409,8
m_lineWidth = w;
m_lineEnd = ca;
m_lineJoin = jo;
double Dt = qMax(2*w, 1);
double Da = qMax(6*w, 1);
double Dt = qMax(2*w, 1.0);
double Da = qMax(6*w, 1.0);
Q3ValueList<double> tmp;
m_array.clear();
m_offset = 0;
531,7 → 531,7
else
{
QColor fillColor = transformColor(m_fillColor, 1.0);
SolidBrush fill_brush( Color(m_fillTrans * 255, fillColor.Qt::red(), fillColor.Qt::green(), fillColor.Qt::blue()) );
SolidBrush fill_brush( Color(m_fillTrans * 255, fillColor.red(), fillColor.green(), fillColor.blue()) );
m_graphics->FillPath( &fill_brush, m_graphicsPath );
}
}
545,7 → 545,7
double penScale = sqrt(norm2 / 2.0);
double penWidth = m_lineWidth * penScale;
QColor strokeColor = transformColor( m_strokeColor, 1.0 );
SolidBrush stroke_brush( Color(m_strokeTrans * 255, strokeColor.Qt::red(), strokeColor.Qt::green(), strokeColor.Qt::blue()) );
SolidBrush stroke_brush( Color(m_strokeTrans * 255, strokeColor.red(), strokeColor.green(), strokeColor.blue()) );
Pen stroke_pen( &stroke_brush, penWidth );
REAL *dashes = NULL;
552,7 → 552,7
if( m_array.count() > 0 )
{
dashes = new REAL[ m_array.count() ];
for( uint i = 0; i < m_array.count();++ i )
for( int i = 0; i < m_array.count();++ i )
{
dashes[i] = (REAL) ( m_array[i] / (double) m_lineWidth );
// The following lines are needed so that gdi+ rendering matches the libart one
700,7 → 700,7
}
ImageAttributes imageAtt;
imageAtt.SetColorMatrix(&colorMatrix, ColorMatrixFlagsDefault, ColorAdjustTypeBitmap);
Bitmap bitmap( image->width(), image->height(), 4 * image->width(), PixelFormat32bppARGB, image->qImage().bits() );
Bitmap bitmap( image->width(), image->height(), 4 * image->width(), PixelFormat32bppARGB, (uchar*) image->qImage().bits() );
m_graphics->DrawImage( &bitmap, destinationPoint, 3, 0, 0, image->width(), image->height(), UnitPixel, &imageAtt );
#else
save();
941,12 → 941,12
stop = *colorStops[0];
color = transformColor( ScColorShade(stop.color, stop.shade), 1.0 );
colors[0] = Color(stop.opacity * 255, color.Qt::red(), color.Qt::green(), color.Qt::blue());
colors[0] = Color(stop.opacity * 255, color.red(), color.green(), color.blue());
positions[0] = 0.0;
 
stop = *colorStops[gradient.Stops() - 1];
color = transformColor( ScColorShade(stop.color, stop.shade), 1.0 );
colors[numElements - 1] = Color(stop.opacity * 255, color.Qt::red(), color.Qt::green(), color.Qt::blue());
colors[numElements - 1] = Color(stop.opacity * 255, color.red(), color.green(), color.blue());
positions[numElements - 1] = 1.0;
 
for( uint index = 0 ; index < gradient.Stops(); index++)
953,9 → 953,9
{
stop = *colorStops[index];
color = transformColor( ScColorShade(stop.color, stop.shade), 1.0 );
r = color.Qt::red();
g = color.Qt::green();
b = color.Qt::blue();
r = color.red();
g = color.green();
b = color.blue();
a = stop.opacity * 255;
colors[index + 1] = Color(a, r, g, b);
positions[index + 1] = ( stop.rampPoint * length + maxDim ) / ( length + 2 * maxDim );
1239,12 → 1239,12
 
stop = *colorStops[ 0 ];
color = transformColor( ScColorShade(stop.color, stop.shade), stop.opacity);
colors[numElements - 1] = Color(stop.opacity * 255, color.Qt::red(), color.Qt::green(), color.Qt::blue());
colors[numElements - 1] = Color(stop.opacity * 255, color.red(), color.green(), color.blue());
positions[numElements - 1] = 1.0;
stop = *colorStops[ gradient.Stops() - 1 ];
color = transformColor( ScColorShade(stop.color, stop.shade), stop.opacity);
colors[0] = Color(stop.opacity * 255, color.Qt::red(), color.Qt::green(), color.Qt::blue());
colors[0] = Color(stop.opacity * 255, color.red(), color.green(), color.blue());
positions[0] = 0.0;
 
for( uint index = 0 ; index < gradient.Stops() ; index++)
1251,9 → 1251,9
{
stop = *colorStops[index];
color = transformColor( ScColorShade(stop.color, stop.shade), 1.0 );
r = color.Qt::red();
g = color.Qt::green();
b = color.Qt::blue();
r = color.red();
g = color.green();
b = color.blue();
a = stop.opacity * 255;
colors[gradient.Stops() - index] = Color(a, r, g, b);
positions[gradient.Stops() - index] = 1 - 2 * (stop.rampPoint * rad) / (double) maxDim;
/branches/Version135x/Scribus/scribus/scimgdataloader_ps.cpp
9,6 → 9,7
#include <qregexp.h>
//Added by qt3to4:
#include <Q3CString>
#include <Q3TextStream>
#include "gsutil.h"
#include "scpaths.h"
#include "scribuscore.h"
66,7 → 67,7
while (!ts.atEnd())
{
tmp = ts.readLine();
for (uint a = 2; a < tmp.length(); a += 2)
for (int a = 2; a < tmp.length(); a += 2)
{
bool ok;
ushort data = tmp.mid(a, 2).toUShort(&ok, 16);
345,7 → 346,7
tmp = ts.readLine();
if (tmp.startsWith("%EndPhotoshop"))
{
QDataStream strPhot(psdata,QIODevice::ReadOnly);
QDataStream strPhot( &psdata, QIODevice::ReadOnly);
strPhot.setByteOrder( QDataStream::BigEndian );
PSDHeader fakeHeader;
Q3TextStream ts2(&BBox, QIODevice::ReadOnly);
357,7 → 358,7
isPhotoshop = true;
break;
}
for (uint a = 2; a < tmp.length(); a += 2)
for (int a = 2; a < tmp.length(); a += 2)
{
bool ok;
ushort data = tmp.mid(a, 2).toUShort(&ok, 16);
374,7 → 375,7
while (!ts.atEnd())
{
tmp = ts.readLine();
for (uint a = 2; a < tmp.length(); a += 2)
for (int a = 2; a < tmp.length(); a += 2)
{
bool ok;
ushort data = tmp.mid(a, 2).toUShort(&ok, 16);
449,7 → 450,7
{
bool missing = false;
QString missingF = "";
for (uint fo = 0; fo < FontListe.count(); fo++)
for (int fo = 0; fo < FontListe.count(); fo++)
{
if (!PrefsManager::instance()->appPrefs.AvailFonts.contains(FontListe[fo]))
{
747,9 → 748,9
ushort data;
unsigned long sum = 0;
int quintet = 0;
for (uint c = 0; c < tmp.length(); c++)
for (int c = 0; c < tmp.length(); c++)
{
byte = uchar(QChar(tmp.at(c)));
byte = QChar(tmp.at(c)).cell();
if (byte >= '!' && byte <= 'u')
{
sum = sum * 85 + ((unsigned long)byte - '!');
1102,7 → 1103,7
break;
if (psDataType == 2)
{
for (uint a = 0; a < tmp.length(); a += 2)
for (int a = 0; a < tmp.length(); a += 2)
{
bool ok;
ushort data = tmp.mid(a, 2).toUShort(&ok, 16);
1232,7 → 1233,7
break;
if (psDataType == 2)
{
for (uint a = 0; a < tmp.length(); a += 2)
for (int a = 0; a < tmp.length(); a += 2)
{
bool ok;
ushort data = tmp.mid(a, 2).toUShort(&ok, 16);
/branches/Version135x/Scribus/scribus/scimgdataloader_qt.cpp
6,6 → 6,9
*/
#include <qfile.h>
#include <qfileinfo.h>
#include <QByteArray>
#include <QImageReader>
#include <QList>
#include "scimgdataloader_qt.h"
 
ScImgDataLoader_QT::ScImgDataLoader_QT(void) : ScImgDataLoader()
16,8 → 19,8
void ScImgDataLoader_QT::initSupportedFormatList(void)
{
m_supportedFormats.clear();
QStringList fmtList = QImage::inputFormatList();
for (uint i = 0; i < fmtList.count(); i++)
QList<QByteArray> fmtList = QImageReader::supportedImageFormats();
for (int i = 0; i < fmtList.count(); i++)
m_supportedFormats.append( fmtList[i].lower() );
}