Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 20011 → Rev 20010

/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
207,7 → 207,7
m_Elements = Elements;
m_groupStack.clear();
pushGroup();
m_clipPaths.clear();
m_clipStack.clear();
m_currentMask = "";
m_importedColors = importedColors;
CurrColorStroke = "Black";
215,6 → 215,7
Coords = "";
pathIsClosed = false;
tmpSel = new Selection(m_doc, false);
grStackDepth = 0;
firstLayer = true;
layerNum = 1;
importerFlags = flags;
1215,11 → 1216,6
m_radioMap.clear();
m_radioButtons.clear();
m_actPage = pageNum;
m_groupStack.clear();
pushGroup();
m_currentClipPath.resize(0);
m_currentClipPath.svgInit();
m_clipPaths.clear();
}
 
void SlaOutputDev::endPage()
1245,10 → 1241,12
ite->setItemName(it.key());
m_Elements->append(ite);
if (m_groupStack.count() != 0)
{
m_groupStack.top().Items.append(ite);
}
}
}
}
m_radioMap.clear();
m_radioButtons.clear();
// qDebug() << "ending page";
1256,82 → 1254,134
 
void SlaOutputDev::saveState(GfxState *state)
{
m_clipPaths.push(m_currentClipPath);
pushGroup();
// qDebug() << "saveState" << grStackDepth;
grStackDepth++;
}
 
void SlaOutputDev::restoreState(GfxState *state)
{
// qDebug() << "restoreState" << grStackDepth;
grStackDepth--;
if (m_groupStack.count() != 0)
m_groupStack.top().maskName = "";
if (m_clipStack.count() != 0)
{
while (m_clipStack.top().grStackDepth > grStackDepth)
{
clipEntry clp = m_clipStack.pop();
PageItem *ite = clp.ClipItem;
if (m_groupStack.count() != 0)
{
groupEntry gElements = m_groupStack.pop();
if (gElements.Items.count() > 0)
{
if ((gElements.Items.count() != 1) && (checkClip()))
for (int d = 0; d < gElements.Items.count(); d++)
{
tmpSel->clear();
for (int dre = 0; dre < gElements.Items.count(); ++dre)
m_Elements->removeAll(gElements.Items.at(d));
}
PageItem *sing = gElements.Items.first();
QPainterPath input1 = sing->PoLine.toQPainterPath(true);
if (sing->fillEvenOdd())
input1.setFillRule(Qt::OddEvenFill);
else
input1.setFillRule(Qt::WindingFill);
QPainterPath input2 = ite->PoLine.toQPainterPath(true);
if (ite->fillEvenOdd())
input2.setFillRule(Qt::OddEvenFill);
else
input2.setFillRule(Qt::WindingFill);
QPainterPath result = input1.intersected(input2);
if ((gElements.Items.count() == 1)
&& (sing->isGroup() && !result.isEmpty())
&& (sing->isImageFrame() || sing->isGroup() || sing->isPolygon() || sing->isPolyLine())
&& (ite->patternMask().isEmpty() || sing->patternMask().isEmpty() || (sing->patternMask() == ite->patternMask()))
&& (state->getFillOpacity() == (1.0 - ite->fillTransparency()))
)
{
tmpSel->addItem(gElements.Items.at(dre), true);
m_Elements->removeAll(gElements.Items.at(dre));
m_Elements->replace(m_Elements->indexOf(ite), sing);
m_doc->Items->removeAll(sing);
m_doc->Items->replace(m_doc->Items->indexOf(ite), sing);
if (m_groupStack.top().Items.indexOf(ite) > -1)
m_groupStack.top().Items.replace(m_groupStack.top().Items.indexOf(ite), sing);
else
m_groupStack.top().Items.append(sing);
sing->setFillTransparency(1.0 - (state->getFillOpacity() * (1.0 - ite->fillTransparency())));
sing->setFillBlendmode(getBlendMode(state));
if (!ite->patternMask().isEmpty())
{
sing->setPatternMask(ite->patternMask());
sing->setMaskType(ite->maskType());
}
PageItem *ite = m_doc->groupObjectsSelection(tmpSel);
ite->ClipEdited = true;
ite->FrameType = 3;
FPointArray out = m_currentClipPath.copy();
out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
ite->setTextFlowMode(PageItem::TextFlowDisabled);
m_doc->AdjustItemSize(ite, true);
ite->OldB2 = ite->width();
ite->OldH2 = ite->height();
m_Elements->append(ite);
if (m_groupStack.count() != 0)
if (sing->isGroup() || (sing->lineColor() == CommonStrings::None))
{
applyMask(ite);
m_groupStack.top().Items.append(ite);
double dx = sing->xPos() - ite->xPos();
double dy = sing->yPos() - ite->yPos();
sing->PoLine.translate(dx, dy);
if (sing->isGroup())
{
QList<PageItem*> allItems = sing->asGroupFrame()->groupItemList;
for (int si = 0; si < allItems.count(); si++)
{
allItems[si]->moveBy(dx, dy, true);
}
tmpSel->clear();
}
sing->setXYPos(ite->xPos(), ite->yPos(), true);
sing->setWidthHeight(ite->width(), ite->height(), true);
sing->groupWidth = ite->width();
sing->groupHeight = ite->height();
sing->ClipEdited = true;
sing->FrameType = 3;
if (!result.isEmpty())
sing->PoLine.fromQPainterPath(result);
else
sing->SetRectFrame();
m_doc->AdjustItemSize(sing);
if (sing->isGroup())
sing->asGroupFrame()->adjustXYPosition();
if (sing->isImageFrame())
{
if (m_groupStack.count() != 0)
sing->setImageXYOffset(0, 0);
sing->AdjustPictScale();
}
}
delete ite;
}
else
{
for (int dre = 0; dre < gElements.Items.count(); ++dre)
m_doc->groupObjectsToItem(ite, gElements.Items);
ite->setFillTransparency(1.0 - state->getFillOpacity());
ite->setFillBlendmode(getBlendMode(state));
}
}
else
{
PageItem *ite = gElements.Items.at(dre);
applyMask(ite);
m_groupStack.top().Items.append(ite);
m_Elements->removeAll(ite);
m_doc->Items->removeAll(ite);
m_groupStack.top().Items.removeAll(ite);
delete ite;
}
}
if (m_clipStack.count() == 0)
break;
}
}
}
if (m_clipPaths.count() != 0)
m_currentClipPath = m_clipPaths.pop();
/*
void SlaOutputDev::updateFillColor(GfxState *state)
{
int shade = 100;
CurrColorFill = getColor(state->getFillColorSpace(), state->getFillColor(), &shade);
}
 
void SlaOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool isolated, GBool knockout, GBool forSoftMask)
*/
void SlaOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool /*isolated*/, GBool /*knockout*/, GBool forSoftMask)
{
// qDebug() << "Start Group";
pushGroup("", forSoftMask);
}
 
void SlaOutputDev::paintTransparencyGroup(GfxState *state, double *bbox)
{
if (m_groupStack.count() != 0)
{
if ((m_groupStack.top().Items.count() != 0) && (!m_groupStack.top().forSoftMask))
{
PageItem *ite = m_groupStack.top().Items.last();
ite->setFillTransparency(1.0 - state->getFillOpacity());
ite->setFillBlendmode(getBlendMode(state));
}
}
}
 
void SlaOutputDev::endTransparencyGroup(GfxState *state)
{
// qDebug() << "End Group";
if (m_groupStack.count() != 0)
{
groupEntry gElements = m_groupStack.pop();
1380,32 → 1430,23
ite = m_doc->groupObjectsSelection(tmpSel);
else
ite = gElements.Items.first();
if (ite->isGroup())
ite->setFillTransparency(1.0 - state->getFillOpacity());
ite->setFillBlendmode(getBlendMode(state));
for (int as = 0; as < tmpSel->count(); ++as)
{
ite->ClipEdited = true;
ite->FrameType = 3;
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
ite->setTextFlowMode(PageItem::TextFlowDisabled);
m_doc->AdjustItemSize(ite, true);
ite->OldB2 = ite->width();
ite->OldH2 = ite->height();
m_Elements->append(tmpSel->itemAt(as));
}
if (m_groupStack.count() != 0)
applyMask(ite);
}
ite->setFillTransparency(1.0 - state->getFillOpacity());
ite->setFillBlendmode(getBlendMode(state));
m_Elements->append(ite);
}
if (m_groupStack.count() != 0)
{
applyMask(ite);
m_groupStack.top().Items.append(ite);
for (int as = 0; as < tmpSel->count(); ++as)
{
m_groupStack.top().Items.append(tmpSel->itemAt(as));
}
}
}
tmpSel->clear();
}
}
1424,10 → 1465,9
m_groupStack.top().inverted = false;
else
m_groupStack.top().inverted = true;
// qDebug() << "Inverted Softmask" << m_groupStack.top().inverted;
m_groupStack.top().maskName = m_currentMask;
m_groupStack.top().alpha = alpha;
if (m_groupStack.top().Items.count() != 0)
applyMask(m_groupStack.top().Items.last());
}
}
 
1434,8 → 1474,10
void SlaOutputDev::clearSoftMask(GfxState * /*state*/)
{
if (m_groupStack.count() != 0)
{
m_groupStack.top().maskName = "";
}
}
 
void SlaOutputDev::updateFillColor(GfxState *state)
{
1460,31 → 1502,44
if (!output.isEmpty())
{
out.parseSVG(output);
if (!pathIsClosed)
out.svgClosePath();
out.map(m_ctm);
if (checkClip())
}
double xmin, ymin, xmax, ymax;
state->getClipBBox(&xmin, &ymin, &xmax, &ymax);
QRectF crect = QRectF(QPointF(xmin, ymin), QPointF(xmax, ymax));
crect = crect.normalized();
int z = m_doc->itemAdd(PageItem::Group, PageItem::Rectangle, crect.x() + m_doc->currentPage()->xOffset(), crect.y() + m_doc->currentPage()->yOffset(), crect.width(), crect.height(), 0, CommonStrings::None, CommonStrings::None, true);
PageItem *ite = m_doc->Items->at(z);
if (!output.isEmpty())
{
QPainterPath pathN = out.toQPainterPath(true);
QPainterPath pathA = m_currentClipPath.toQPainterPath(true);
QPainterPath resultPath = pathA.intersected(pathN);
if (!resultPath.isEmpty())
{
FPointArray polyline;
polyline.resize(0);
polyline.fromQPainterPath(resultPath, true);
polyline.svgClosePath();
m_currentClipPath = polyline.copy();
FPoint wh(getMinClipF(&out));
out.translate(-wh.x(), -wh.y());
FPoint dim = out.WidthHeight();
if (!((dim.x() == 0.0) || (dim.y() == 0.0))) // avoid degenerate clipping paths
ite->PoLine = out.copy(); //FIXME: try to avoid copy if FPointArray when properly shared
}
else
ite->ClipEdited = true;
ite->FrameType = 3;
ite->setFillEvenOdd(false);
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
ite->ContourLine = ite->PoLine.copy();
ite->setTextFlowMode(PageItem::TextFlowDisabled);
m_doc->AdjustItemSize(ite);
m_Elements->append(ite);
if (m_groupStack.count() != 0)
{
m_currentClipPath.resize(0);
m_currentClipPath.svgInit();
m_groupStack.top().Items.append(ite);
applyMask(ite);
}
clipEntry clp;
clp.ClipItem = ite;
clp.grStackDepth = grStackDepth;
m_clipStack.push(clp);
m_doc->GroupCounter++;
pushGroup();
}
else
m_currentClipPath = out.copy();
}
}
 
void SlaOutputDev::eoClip(GfxState *state)
{
1497,31 → 1552,44
if (!output.isEmpty())
{
out.parseSVG(output);
if (!pathIsClosed)
out.svgClosePath();
out.map(m_ctm);
if (checkClip())
}
double xmin, ymin, xmax, ymax;
state->getClipBBox(&xmin, &ymin, &xmax, &ymax);
QRectF crect = QRectF(QPointF(xmin, ymin), QPointF(xmax, ymax));
crect = crect.normalized();
int z = m_doc->itemAdd(PageItem::Group, PageItem::Rectangle, crect.x() + m_doc->currentPage()->xOffset(), crect.y() + m_doc->currentPage()->yOffset(), crect.width(), crect.height(), 0, CommonStrings::None, CommonStrings::None, true);
PageItem *ite = m_doc->Items->at(z);
if (!output.isEmpty())
{
QPainterPath pathN = out.toQPainterPath(true);
QPainterPath pathA = m_currentClipPath.toQPainterPath(true);
QPainterPath resultPath = pathA.intersected(pathN);
if (!resultPath.isEmpty())
{
FPointArray polyline;
polyline.resize(0);
polyline.fromQPainterPath(resultPath, true);
polyline.svgClosePath();
m_currentClipPath = polyline.copy();
FPoint wh(getMinClipF(&out));
out.translate(-wh.x(), -wh.y());
FPoint dim = out.WidthHeight();
if (!((dim.x() == 0.0) || (dim.y() == 0.0))) // avoid degenerate clipping paths
ite->PoLine = out.copy(); //FIXME: try to avoid copy if FPointArray when properly shared
}
else
ite->ClipEdited = true;
ite->FrameType = 3;
ite->setFillEvenOdd(true);
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
ite->ContourLine = ite->PoLine.copy();
ite->setTextFlowMode(PageItem::TextFlowDisabled);
m_doc->AdjustItemSize(ite);
m_Elements->append(ite);
if (m_groupStack.count() != 0)
{
m_currentClipPath.resize(0);
m_currentClipPath.svgInit();
m_groupStack.top().Items.append(ite);
applyMask(ite);
}
clipEntry clp;
clp.ClipItem = ite;
clp.grStackDepth = grStackDepth;
m_clipStack.push(clp);
m_doc->GroupCounter++;
pushGroup();
}
else
m_currentClipPath = out.copy();
}
}
 
void SlaOutputDev::stroke(GfxState *state)
{
1776,13 → 1844,6
Coords = output;
int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
FPoint wh(getMinClipF(&out));
out.translate(-wh.x(), -wh.y());
ite->PoLine = out.copy();
}
ite->ClipEdited = true;
ite->FrameType = 3;
ite->setFillShade(CurrFillShade);
1895,13 → 1956,6
Coords = output;
int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
FPoint wh(getMinClipF(&out));
out.translate(-wh.x(), -wh.y());
ite->PoLine = out.copy();
}
ite->ClipEdited = true;
ite->FrameType = 3;
ite->setFillShade(CurrFillShade);
1957,13 → 2011,6
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
FPoint wh(getMinClipF(&out));
out.translate(-wh.x(), -wh.y());
ite->PoLine = out.copy();
}
ite->ClipEdited = true;
ite->FrameType = 3;
ite->setFillShade(CurrFillShade);
2045,13 → 2092,6
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
FPoint wh(getMinClipF(&out));
out.translate(-wh.x(), -wh.y());
ite->PoLine = out.copy();
}
ite->ClipEdited = true;
ite->FrameType = 3;
ite->setFillShade(CurrFillShade);
2271,13 → 2311,6
Coords = output;
int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, CommonStrings::None, true);
ite = m_doc->Items->at(z);
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
FPoint wh(getMinClipF(&out));
out.translate(-wh.x(), -wh.y());
ite->PoLine = out.copy();
}
ite->ClipEdited = true;
ite->FrameType = 3;
ite->setFillShade(CurrFillShade);
2412,8 → 2445,7
}
int z = m_doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, xCoor + trect.x(), yCoor + trect.y(), trect.width(), trect.height(), 0, CommonStrings::None, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
ite->ClipEdited = true;
ite->FrameType = 3;
ite->SetRectFrame();
m_doc->setRedrawBounding(ite);
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
ite->setTextFlowMode(PageItem::TextFlowDisabled);
2440,22 → 2472,7
m_groupStack.top().Items.append(ite);
applyMask(ite);
}
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
FPoint wh = getMaxClipF(&ite->PoLine);
ite->setWidthHeight(wh.x(),wh.y());
ite->setTextFlowMode(PageItem::TextFlowDisabled);
ite->ScaleType = true;
m_doc->AdjustItemSize(ite);
ite->OldB2 = ite->width();
ite->OldH2 = ite->height();
ite->updateClip();
}
}
else
m_doc->Items->removeAll(ite);
}
2557,8 → 2574,7
}
int z = m_doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, xCoor + trect.x(), yCoor + trect.y(), trect.width(), trect.height(), 0, CommonStrings::None, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
ite->ClipEdited = true;
ite->FrameType = 3;
ite->SetRectFrame();
m_doc->setRedrawBounding(ite);
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
ite->setTextFlowMode(PageItem::TextFlowDisabled);
2587,22 → 2603,7
m_groupStack.top().Items.append(ite);
applyMask(ite);
}
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
FPoint wh = getMaxClipF(&ite->PoLine);
ite->setWidthHeight(wh.x(),wh.y());
ite->setTextFlowMode(PageItem::TextFlowDisabled);
ite->ScaleType = true;
m_doc->AdjustItemSize(ite);
ite->OldB2 = ite->width();
ite->OldH2 = ite->height();
ite->updateClip();
}
}
else
m_doc->Items->removeAll(ite);
}
2711,8 → 2712,7
}
int z = m_doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, xCoor + trect.x(), yCoor + trect.y(), trect.width(), trect.height(), 0, CommonStrings::None, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
ite->ClipEdited = true;
ite->FrameType = 3;
ite->SetRectFrame();
m_doc->setRedrawBounding(ite);
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
ite->setTextFlowMode(PageItem::TextFlowDisabled);
2741,22 → 2741,7
m_groupStack.top().Items.append(ite);
applyMask(ite);
}
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
FPoint wh = getMaxClipF(&ite->PoLine);
ite->setWidthHeight(wh.x(),wh.y());
ite->setTextFlowMode(PageItem::TextFlowDisabled);
ite->ScaleType = true;
m_doc->AdjustItemSize(ite);
ite->OldB2 = ite->width();
ite->OldH2 = ite->height();
ite->updateClip();
}
}
else
m_doc->Items->removeAll(ite);
}
2873,10 → 2858,9
img = image->transformed(mm);
}
}
int z = m_doc->itemAdd(PageItem::ImageFrame, PageItem::Rectangle, xCoor + trect.x(), yCoor + trect.y(), trect.width(), trect.height(), 0, CommonStrings::None, CommonStrings::None, true);
int z = m_doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, xCoor + trect.x(), yCoor + trect.y(), trect.width(), trect.height(), 0, CommonStrings::None, CommonStrings::None, true);
PageItem* ite = m_doc->Items->at(z);
ite->ClipEdited = true;
ite->FrameType = 3;
ite->SetRectFrame();
m_doc->setRedrawBounding(ite);
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
ite->setTextFlowMode(PageItem::TextFlowDisabled);
2898,8 → 2882,6
tempFile->close();
ite->isInlineImage = true;
ite->isTempFile = true;
ite->AspectRatio = false;
ite->ScaleType = false;
TIFF* tif = TIFFOpen(fileName.toLocal8Bit().data(), "w");
if (tif)
{
2917,6 → 2899,7
TIFFClose(tif);
m_doc->loadPict(fileName, ite);
}
ite->setImageScalingMode(false, false);
m_Elements->append(ite);
if (m_groupStack.count() != 0)
{
2941,10 → 2924,9
tempFile->close();
ite->isInlineImage = true;
ite->isTempFile = true;
ite->AspectRatio = false;
ite->ScaleType = false;
img.save(fileName, "PNG");
m_doc->loadPict(fileName, ite);
ite->setImageScalingMode(false, false);
m_Elements->append(ite);
if (m_groupStack.count() != 0)
{
2957,21 → 2939,6
}
delete tempFile;
}
if (checkClip())
{
FPointArray out = m_currentClipPath.copy();
out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
FPoint wh = getMaxClipF(&ite->PoLine);
ite->setWidthHeight(wh.x(),wh.y());
ite->setTextFlowMode(PageItem::TextFlowDisabled);
ite->ScaleType = true;
m_doc->AdjustItemSize(ite);
ite->OldB2 = ite->width();
ite->OldH2 = ite->height();
ite->updateClip();
}
delete imgStr;
delete image;
}
3178,7 → 3145,7
 
} else {
 
if (!(fontLoc = gfxFont->locateFont(xref, 0))) {
if (!(fontLoc = gfxFont->locateFont(xref, gFalse))) {
error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'",
gfxFont->getName() ? gfxFont->getName()->getCString()
: "(unnamed)");
4095,15 → 4062,3
}
return result;
}
 
bool SlaOutputDev::checkClip()
{
bool ret = false;
if (m_currentClipPath.count() != 0)
{
FPoint wh = m_currentClipPath.WidthHeight();
if ((wh.x() > 0) && (wh.y() > 0))
ret = true;
}
return ret;
}
/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
231,7 → 231,7
 
//----- transparency groups and soft masks
virtual void beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool /*isolated*/, GBool /*knockout*/, GBool /*forSoftMask*/);
virtual void paintTransparencyGroup(GfxState *state, double *bbox);
virtual void paintTransparencyGroup(GfxState *state, double *bbox) {}
virtual void endTransparencyGroup(GfxState *state);
virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/);
virtual void clearSoftMask(GfxState * /*state*/);
265,7 → 265,6
void applyMask(PageItem *ite);
void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
QString UnicodeParsedString(GooString *s1);
bool checkClip();
bool pathIsClosed;
QString CurrColorFill;
int CurrFillShade;
276,8 → 275,12
QVector<double> DashValues;
double DashOffset;
QString Coords;
FPointArray m_currentClipPath;
QStack<FPointArray> m_clipPaths;
struct clipEntry
{
PageItem* ClipItem;
int grStackDepth;
};
QStack<clipEntry> m_clipStack;
struct groupEntry
{
QList<PageItem*> Items;
304,6 → 307,7
QString ocgName;
};
QStack<mContent> m_mcStack;
int grStackDepth;
int layerNum;
int currentLayer;
bool firstLayer;