Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1645 → Rev 1646

/branches/Version13x/Scribus/configure.in
115,7 → 115,15
else
AC_MSG_WARN([Couldn't find fontconfig-config or pkg-config])
fi
 
dnl Check to see if we can compile fontconfig
SAVE_CFLAGS="${CFLAGS}"
SAVE_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} ${LIBFONTCONFIG_CFLAGS}"
LDFLAGS="${LDFLAGS} ${LIBFONTCONFIG_LIBS}"
AC_CHECK_LIB(fontconfig, FcPatternBuild, [hafontconfig=yes],[hafontconfig=no])
CFLAGS="${SAVE_CFLAGS}"
LDFLAGS="${SAVE_LDFLAGS}"
if test $hafontconfig = yes; then
AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG, 1, [Defines if your system has the libfontconfig library])
else
273,7 → 281,7
 
COMPILE_DEBUG=no
AC_ARG_ENABLE(debug, [ --enable-debug Enables Debug-Code],
[if test "x$enable_debug" = "xyes"; then
[if test "x$enable_debug" = "xyes" || test "x$enable_debug" = "xfull"; then
COMPILE_DEBUG=yes
CXXFLAGS="$CXXFLAGS -g3 -fno-inline -O0 "
CFLAGS="$CFLAGS -g3 -fno-inline -O0 "
307,10 → 315,8
AC_CONFIG_FILES([ scribus/doc/pl/tutorials/short-words/Makefile ])
AC_CONFIG_FILES([ scribus/icons/Makefile ])
AC_CONFIG_FILES([ scribus/keysets/Makefile ])
AC_CONFIG_FILES([ scribus/libabout/Makefile ])
AC_CONFIG_FILES([ scribus/libpdf/Makefile ])
AC_CONFIG_FILES([ scribus/libpostscript/Makefile ])
AC_CONFIG_FILES([ scribus/libprefs/Makefile ])
AC_CONFIG_FILES([ scribus/manpages/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/Makefile ])
AC_CONFIG_FILES([ scribus/plugins/fileloader/Makefile ])
339,55 → 345,82
AC_CONFIG_FILES([ scribus/qm/Makefile ])
AC_CONFIG_FILES([ scribus/templates/Makefile ])
AC_OUTPUT
echo
echo "Configuration Summary:"
echo ""
if test $hafree = yes; then
if test $hafree_post213 = yes; then
echo "FreeType2 installed: Yes"
echo
 
FORMAT=" %-25s"
 
echo "Libraries:"
printf "${FORMAT}" "Freetype2 installed: "
if test "$hafree" = yes; then
if test "$hafree_post213" = yes; then
echo "Yes"
else
echo "FreeType2 installed: Yes (OLD); Version 2.1.3 or newer recommended."
echo "Yes (OLD); Version 2.1.3 or newer recommended."
fi
else
echo "FreeType2 installed: No"
echo "No"
fi
if test $hafontconfig = yes; then
echo "Fontconfig found: Yes"
 
printf "${FORMAT}" "Fontconfig found: "
if test "$hafontconfig" = yes; then
echo "Yes"
else
echo "Fontconfig found: No"
echo "No"
fi
if test $hacups = yes; then
echo "CUPS installed: Yes"
 
printf "${FORMAT}" "CUPS installed: "
if test "$hacups" = yes; then
echo "Yes"
else
echo "CUPS installed: No"
echo "No"
fi
if test $hacms = yes; then
echo "LittleCMS installed: Yes"
elif test $hacms = pre112; then
echo "LittleCMS installed: Too old; Version 1.12 or newer required"
 
printf "${FORMAT}" "LittleCMS installed: "
if test "$hacms" = yes; then
echo "Yes"
elif test "$hacms" = pre112; then
echo "Too old; Version 1.12 or newer required"
else
echo "LittleCMS installed: No"
echo "No"
fi
if test $hastif = yes; then
echo "TiffLib installed: Yes"
elif test $hastif = pre36; then
echo "TiffLib installed: Too old; Version 3.6.0 or newer required"
 
printf "${FORMAT}" "libtiff installed: "
if test "$hastif" = yes; then
echo "Yes"
elif test "$hastif" = pre36; then
echo "Too old; Version 3.6.0 or newer required"
else
echo "TiffLib installed: No"
echo "No"
fi
if test $haxml = yes; then
echo "Libxml2 installed: Yes"
 
printf "${FORMAT}" "Libxml2 installed: "
if test "$haxml" = yes; then
echo "Yes"
else
echo "Libxml2 installed: No"
echo "No"
fi
if test $COMPILE_PYTHON = no; then
 
if test "$COMPILE_PYTHON" = no; then
echo "The Scripter-Plugin will not be compiled."
else
if test $hapython = yes; then
if test "$hapython" = yes; then
echo "Using Python 2.3"
else
echo "Using Python < 2.3"
fi
fi
 
echo "Configuration options:"
 
printf "${FORMAT}" "Debugging enabled: "
if test "$COMPILE_DEBUG" = yes; then
echo "Yes"
else
echo "No"
fi
 
echo ""
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
/branches/Version13x/Scribus/scribus/util.cpp
550,7 → 550,7
}
}
 
static bool loadLayerChannels( QDataStream & s, const PSDHeader & header, QImage & img, QValueList<PSDLayer> &layerInfo, uint layer, bool* firstLayer )
static bool loadLayerChannels( QDataStream & s, const PSDHeader & header, QImage & img, QValueList<PSDLayer> &layerInfo, uint layer, bool* firstLayer, ImageInfoRecord *info )
{
// Find out if the data is compressed.
// Known values:
728,7 → 728,10
imt = sy < sx ? tmpImg2.smoothScale(qRound(tmpImg.width() / sx), qRound(tmpImg.height() / sx)) :
tmpImg2.smoothScale(qRound(tmpImg.width() / sy), qRound(tmpImg.height() / sy));
layerInfo[layer].thumb = imt.copy();
if (!(layerInfo[layer].flags & 2))
bool visible = !(layerInfo[layer].flags & 2);
if ((info->isRequest) && (info->RequestProps.contains(layer)))
visible = info->RequestProps[layer].visible;
if (visible)
{
if (*firstLayer)
{
755,7 → 758,10
src_g = s[1];
src_b = s[2];
src_a = s[3];
if (layerInfo[layer].blend == "mul ")
QString layBlend = layerInfo[layer].blend;
if ((info->isRequest) && (info->RequestProps.contains(layer)))
layBlend = info->RequestProps[layer].blend;
if (layBlend == "mul ")
{
src_r = INT_MULT(src_r, d[0]);
src_g = INT_MULT(src_g, d[1]);
765,7 → 771,7
else
src_a = QMIN(src_a, d[3]);
}
else if (layerInfo[layer].blend == "scrn")
else if (layBlend == "scrn")
{
src_r = 255 - INT_MULT(255 - d[0], 255 - src_r);
src_g = 255 - INT_MULT(255 - d[1], 255 - src_g);
775,7 → 781,7
else
src_a = QMIN(src_a, d[3]);
}
else if (layerInfo[layer].blend == "over")
else if (layBlend == "over")
{
src_r = INT_MULT(d[0], d[0] + INT_MULT(2 * src_r, 255 - d[0]));
src_g = INT_MULT(d[1], d[1] + INT_MULT(2 * src_g, 255 - d[1]));
785,7 → 791,7
else
src_a = QMIN(src_a, d[3]);
}
else if (layerInfo[layer].blend == "diff")
else if (layBlend == "diff")
{
src_r = d[0] > src_r ? d[0] - src_r : src_r - d[0];
src_g = d[1] > src_g ? d[1] - src_g : src_g - d[1];
795,7 → 801,7
else
src_a = QMIN(src_a, d[3]);
}
else if (layerInfo[layer].blend == "dark")
else if (layBlend == "dark")
{
src_r = d[0] < src_r ? d[0] : src_r;
src_g = d[1] < src_g ? d[1] : src_g;
805,7 → 811,7
else
src_a = QMIN( src_a, d[3] );
}
else if (layerInfo[layer].blend == "lite")
else if (layBlend == "lite")
{
src_r = d[0] < src_r ? src_r : d[0];
src_g = d[1] < src_g ? src_g : d[1];
815,7 → 821,7
else
src_a = QMIN( src_a, d[3] );
}
else if (layerInfo[layer].blend == "hue ")
else if (layBlend == "hue ")
{
if (header.color_mode != CM_CMYK)
{
832,7 → 838,7
src_a = QMIN( src_a, d[3] );
}
}
else if (layerInfo[layer].blend == "sat ")
else if (layBlend == "sat ")
{
if (header.color_mode != CM_CMYK)
{
849,7 → 855,7
src_a = QMIN(src_a, d[3]);
}
}
else if (layerInfo[layer].blend == "lum ")
else if (layBlend == "lum ")
{
if (header.color_mode != CM_CMYK)
{
866,7 → 872,7
src_a = QMIN(src_a, d[3]);
}
}
else if (layerInfo[layer].blend == "colr")
else if (layBlend == "colr")
{
if (header.color_mode != CM_CMYK)
{
884,10 → 890,13
src_a = QMIN(src_a, d[3]);
}
}
r = (d[0] * (255 - layerInfo[layer].opacity) + src_r * layerInfo[layer].opacity) / 255;
g = (d[1] * (255 - layerInfo[layer].opacity) + src_g * layerInfo[layer].opacity) / 255;
b = (d[2] * (255 - layerInfo[layer].opacity) + src_b * layerInfo[layer].opacity) / 255;
a = (d[3] * (255 - layerInfo[layer].opacity) + src_a * layerInfo[layer].opacity) / 255;
int layOpa = layerInfo[layer].opacity;
if ((info->isRequest) && (info->RequestProps.contains(layer)))
layOpa = info->RequestProps[layer].opacity;
r = (d[0] * (255 - layOpa) + src_r * layOpa) / 255;
g = (d[1] * (255 - layOpa) + src_g * layOpa) / 255;
b = (d[2] * (255 - layOpa) + src_b * layOpa) / 255;
a = (d[3] * (255 - layOpa) + src_a * layOpa) / 255;
if (header.color_mode == CM_CMYK)
{
d[0] = r;
1307,7 → 1316,7
bool firstLayer = true;
for (int layer = 0; layer < numLayers; layer++)
{
loadLayerChannels( s, header, img, info->layerInfo, layer, &firstLayer );
loadLayerChannels( s, header, img, info->layerInfo, layer, &firstLayer, info );
}
}
else
/branches/Version13x/Scribus/scribus/extimageprops.h
37,8 → 37,13
QPtrList<QCheckBox> FlagsSicht;
ScribusView *viewWidget;
PageItem *currentItem;
int currentLayer;
QMap<QString, QString> blendModes;
QMap<QString, QString> blendModesRev;
 
public slots:
void changedLayer();
void selLayer(int layer);
void selPath(QListBoxItem *c);
 
protected:
/branches/Version13x/Scribus/scribus/pageitem.h
52,6 → 52,13
QImage thumb;
};
 
struct LoadRequest
{
bool visible;
ushort opacity;
QString blend;
};
 
struct ImageInfoRecord
{
int xres;
60,6 → 67,7
bool valid;
bool isRequest;
QMap<QString, FPointArray> PDSpathData;
QMap<int, LoadRequest> RequestProps;
QString clipPath;
QString usedPath;
QValueList<PSDLayer> layerInfo;
/branches/Version13x/Scribus/scribus/extimageprops.cpp
24,6 → 24,43
ExtImagePropsLayout = new QVBoxLayout( this, 10, 5, "ExtImagePropsLayout");
viewWidget = view;
currentItem = item;
currentLayer = 0;
blendModes.clear();
blendModes.insert("norm", tr("Normal"));
blendModes.insert("dark", tr("Darken"));
blendModes.insert("lite", tr("Lighten"));
blendModes.insert("hue ", tr("Hue"));
blendModes.insert("sat ", tr("Saturation"));
blendModes.insert("colr", tr("Color"));
blendModes.insert("lum ", tr("Luminosity"));
blendModes.insert("mul ", tr("Multiply"));
blendModes.insert("scrn", tr("Screen"));
blendModes.insert("diss", tr("Dissolve"));
blendModes.insert("over", tr("Overlay"));
blendModes.insert("hLit", tr("Hard Light"));
blendModes.insert("sLit", tr("Soft Light"));
blendModes.insert("diff", tr("Difference"));
blendModes.insert("smud", tr("Exlusion"));
blendModes.insert("div ", tr("Color Dodge"));
blendModes.insert("idiv", tr("Color Burn"));
blendModesRev.clear();
blendModesRev.insert( tr("Normal"), "norm");
blendModesRev.insert( tr("Darken"), "dark");
blendModesRev.insert( tr("Lighten"), "lite");
blendModesRev.insert( tr("Hue"), "hue ");
blendModesRev.insert( tr("Saturation"), "sat ");
blendModesRev.insert( tr("Color"), "colr");
blendModesRev.insert( tr("Luminosity"), "lum ");
blendModesRev.insert( tr("Multiply"), "mul ");
blendModesRev.insert( tr("Screen"), "scrn");
blendModesRev.insert( tr("Dissolve"), "diss");
blendModesRev.insert( tr("Overlay"), "over");
blendModesRev.insert( tr("Hard Light"), "hLit");
blendModesRev.insert( tr("Soft Light"), "sLit");
blendModesRev.insert( tr("Difference"), "diff");
blendModesRev.insert( tr("Exlusion"), "smud");
blendModesRev.insert( tr("Color Dodge"), "div ");
blendModesRev.insert( tr("Color Burn"), "idiv");
propsTab = new QTabWidget( this, "propsTab" );
 
tab = new QWidget( propsTab, "tab" );
32,12 → 69,35
textLabel1 = new QLabel( tab, "textLabel1" );
textLabel1->setText( tr( "Blend Mode:" ) );
layout1->addWidget( textLabel1 );
blendMode = new QComboBox( false, tab, "blendMode" );
blendMode = new QComboBox( true, tab, "blendMode" );
blendMode->setEditable(false);
blendMode->clear();
blendMode->insertItem( tr("Normal"));
blendMode->insertItem( tr("Darken"));
blendMode->insertItem( tr("Lighten"));
blendMode->insertItem( tr("Hue"));
blendMode->insertItem( tr("Saturation"));
blendMode->insertItem( tr("Color"));
blendMode->insertItem( tr("Luminosity"));
blendMode->insertItem( tr("Multiply"));
blendMode->insertItem( tr("Screen"));
blendMode->insertItem( tr("Dissolve"));
blendMode->insertItem( tr("Overlay"));
blendMode->insertItem( tr("Hard Light"));
blendMode->insertItem( tr("Soft Light"));
blendMode->insertItem( tr("Difference"));
blendMode->insertItem( tr("Exlusion"));
blendMode->insertItem( tr("Color Dodge"));
blendMode->insertItem( tr("Color Burn"));
layout1->addWidget( blendMode );
textLabel2 = new QLabel( tab, "textLabel2" );
textLabel2->setText( tr( "Opacity:" ) );
layout1->addWidget( textLabel2 );
opacitySpinBox = new QSpinBox( tab, "opacitySpinBox" );
opacitySpinBox->setMinValue(0);
opacitySpinBox->setMaxValue(100);
opacitySpinBox->setLineStep(10);
opacitySpinBox->setSuffix( tr(" %"));
layout1->addWidget( opacitySpinBox );
tabLayout->addLayout( layout1 );
layerTable = new QTable( tab, "layerTable" );
59,10 → 119,22
layerTable->setFocusStyle( QTable::FollowStyle );
QHeader *Header = layerTable->verticalHeader();
Header->setMovingEnabled(false);
// Header->setResizeEnabled(false);
Header->setResizeEnabled(false);
FlagsSicht.clear();
if (info->layerInfo.count() != 0)
{
if ((info->isRequest) && (info->RequestProps.contains(0)))
{
opacitySpinBox->setValue(qRound(info->RequestProps[0].opacity / 255.0 * 100));
blendMode->setCurrentText(blendModes[info->RequestProps[0].blend]);
}
else
{
opacitySpinBox->setValue(qRound(info->layerInfo[0].opacity / 255.0 * 100));
blendMode->setCurrentText(blendModes[info->layerInfo[0].blend]);
}
opacitySpinBox->setEnabled(true);
blendMode->setEnabled(true);
QString tmp;
QValueList<PSDLayer>::iterator it2;
layerTable->setNumRows(info->layerInfo.count());
73,6 → 145,7
cp->setChecked(!((*it2).flags & 2));
FlagsSicht.append(cp);
// connect(cp2, SIGNAL(clicked()), this, SLOT(visibleLayer()));
connect(cp, SIGNAL(clicked()), this, SLOT(changedLayer()));
layerTable->setCellWidget(info->layerInfo.count()-counter-1, 0, cp);
QPixmap pm;
pm.convertFromImage((*it2).thumb);
85,6 → 158,10
}
else
{
opacitySpinBox->setValue(100);
opacitySpinBox->setEnabled(false);
blendMode->setCurrentText( tr("Normal"));
blendMode->setEnabled(false);
layerTable->setNumRows(1);
QPixmap pm;
QImage imt;
103,6 → 180,7
FlagsSicht.append(cp);
}
tabLayout->addWidget( layerTable );
blendMode->setCurrentItem(0);
propsTab->insertTab( tab, tr( "Layers" ) );
 
tab_2 = new QWidget( propsTab, "tab_2" );
127,9 → 205,53
ExtImagePropsLayout->addWidget( propsTab );
resize(330, 320);
clearWState( WState_Polished );
connect( pathList, SIGNAL( highlighted(QListBoxItem*) ), this, SLOT( selPath(QListBoxItem*) ) );
connect(pathList, SIGNAL( highlighted(QListBoxItem*) ), this, SLOT( selPath(QListBoxItem*) ) );
connect(layerTable, SIGNAL(currentChanged(int, int)), this, SLOT(selLayer(int)));
connect(opacitySpinBox, SIGNAL(valueChanged(int)), this, SLOT(changedLayer()));
connect(blendMode, SIGNAL(highlighted(int)), this, SLOT(changedLayer()));
}
 
void ExtImageProps::changedLayer()
{
struct LoadRequest loadingInfo;
currentItem->imgInfo.isRequest = true;
currentItem->imgInfo.RequestProps.clear();
for (uint r = 0; r < layerTable->numRows(); ++r)
{
if (currentLayer == layerTable->numRows() - r - 1)
{
loadingInfo.blend = blendModesRev[blendMode->currentText()];
loadingInfo.opacity = qRound(opacitySpinBox->value() / 100.0 * 255);
}
else
{
loadingInfo.blend = currentItem->imgInfo.layerInfo[layerTable->numRows() - r - 1].blend;
loadingInfo.opacity = currentItem->imgInfo.layerInfo[layerTable->numRows() - r - 1].opacity;
}
loadingInfo.visible = FlagsSicht.at(layerTable->numRows() - r - 1)->isChecked();
currentItem->imgInfo.RequestProps.insert(layerTable->numRows() - r - 1, loadingInfo);
}
viewWidget->LoadPict(currentItem->Pfile, currentItem->ItemNr, true);
viewWidget->updateContents();
}
 
void ExtImageProps::selLayer(int layer)
{
if ((currentItem->imgInfo.isRequest) && (currentItem->imgInfo.RequestProps.contains(layerTable->numRows() - layer - 1)))
{
opacitySpinBox->setValue(qRound(currentItem->imgInfo.RequestProps[layerTable->numRows() - layer - 1].opacity / 255.0 * 100));
blendMode->setCurrentText(blendModes[currentItem->imgInfo.RequestProps[layerTable->numRows() - layer - 1].blend]);
}
else
{
opacitySpinBox->setValue(qRound(currentItem->imgInfo.layerInfo[layerTable->numRows() - layer - 1].opacity / 255.0 * 100));
blendMode->setCurrentText(blendModes[currentItem->imgInfo.layerInfo[layerTable->numRows() - layer - 1].blend]);
}
opacitySpinBox->setEnabled(true);
blendMode->setEnabled(true);
currentLayer = layerTable->numRows() - layer - 1;
}
 
void ExtImageProps::selPath(QListBoxItem *c)
{
currentItem->PoLine = currentItem->imgInfo.PDSpathData[c->text()].copy();
/branches/Version13x/Scribus/scribus/pageitem.cpp
293,6 → 293,7
endArrowIndex = Doc->toolSettings.dEndArrow;
undoManager = UndoManager::instance();
imgInfo.valid = false;
imgInfo.isRequest = false;
}
 
/** Zeichnet das Item */
/branches/Version13x/Scribus/scribus/scribus.cpp
4805,6 → 4805,7
{
dirs->set("images", fileName.left(fileName.findRev("/")));
b->EmProfile = "";
b->imgInfo.isRequest = false;
b->UseEmbedded = true;
b->IProfile = doc->CMSSettings.DefaultInputProfile;
b->IRender = doc->CMSSettings.DefaultIntentMonitor2;