Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16743 → Rev 16744

/trunk/Scribus/scribus/pdflib_core.cpp
2477,7 → 2477,7
ScPattern pat = doc.docPatterns[ite->pattern()];
PutPage("q\n");
PutPage(SetClipPath(ite));
PutPage("h W* n\n");
PutPage(ite->fillRule ? "h W* n\n" : "h W n\n");
if (ite->imageFlippedH())
PutPage("-1 0 0 1 "+FToStr(ite->width())+" 0 cm\n");
if (ite->imageFlippedV())
2523,7 → 2523,7
QString tmpD = "";
PutPage("q\n");
PutPage(SetClipPath(ite));
PutPage("h W* n\n");
PutPage(ite->fillRule ? "h W* n\n" : "h W n\n");
if (ite->imageFlippedH())
PutPage("-1 0 0 1 "+FToStr(ite->width())+" 0 cm\n");
if (ite->imageFlippedV())
4279,7 → 4279,10
ScPattern pat = doc.docPatterns[ite->pattern()];
tmp += "q\n";
tmp += SetClipPath(ite);
tmp += "h W* n\n";
if (ite->fillRule)
tmp += "h W* n\n";
else
tmp += "h W n\n";
if (ite->imageFlippedH())
tmp += "-1 0 0 1 "+FToStr(ite->width())+" 0 cm\n";
if (ite->imageFlippedV())
4325,7 → 4328,10
QString tmpD = "";
tmp += "q\n";
tmp += SetClipPath(ite);
tmp += "h W* n\n";
if (ite->fillRule)
tmp += "h W* n\n";
else
tmp += "h W n\n";
if (ite->imageFlippedH())
tmp += "-1 0 0 1 "+FToStr(ite->width())+" 0 cm\n";
if (ite->imageFlippedV())
/trunk/Scribus/scribus/pageitem_symbol.cpp
105,6 → 105,7
}
else
p->setMaskMode(0);
p->setFillRule(fillRule);
p->beginLayer(1.0 - fillTransparency(), fillBlendmode(), &PoLine);
p->setMaskMode(0);
ScPattern pat = m_Doc->docPatterns[patternVal];
/trunk/Scribus/scribus/pageitem_group.cpp
164,6 → 164,7
}
else
p->setMaskMode(0);
p->setFillRule(fillRule);
p->beginLayer(1.0 - fillTransparency(), fillBlendmode(), &PoLine);
p->setMaskMode(0);
p->scale(Width / groupWidth, Height / groupHeight);
/trunk/Scribus/scribus/canvas.cpp
778,11 → 778,11
{
// qDebug()<<"Canvas::paintEvent"<<p->rect()<<m_viewMode.forceRedraw<<m_viewMode.operItemSelecting;
// printBacktrace(62);
QTime t;
if (m_doc->isLoading())
return;
// #define SHOW_ME_WHAT_YOU_GET_IN_D_CANVA
#ifdef SHOW_ME_WHAT_YOU_GET_IN_D_CANVA
QTime t;
QString dmode("");
int t1,t2,t3,t4,t5,t6;
t1 = t2=t3=t4=t5 =t6= 0;
/trunk/Scribus/scribus/scpainter.cpp
88,6 → 88,7
if (clipArray != NULL)
la.groupClip = *clipArray;
la.data = cairo_get_group_target(m_cr);
la.fillRule = m_fillRule;
cairo_push_group(m_cr);
/* if (clipArray != NULL)
{
119,11 → 120,16
mask_gradientSkew = la.mask_gradientSkew;
mask_gradient = la.mask_gradient;
m_maskPattern = la.maskPattern;
m_fillRule = la.fillRule;
if (la.pushed)
{
cairo_pop_group_to_source (m_cr);
if (la.groupClip.size() != 0)
{
if( m_fillRule )
cairo_set_fill_rule (m_cr, CAIRO_FILL_RULE_EVEN_ODD);
else
cairo_set_fill_rule (m_cr, CAIRO_FILL_RULE_WINDING);
setupPolygon(&la.groupClip);
setClipPath();
}
169,6 → 175,7
mask_gradientSkew = la.mask_gradientSkew;
mask_gradient = la.mask_gradient;
m_maskPattern = la.maskPattern;
m_fillRule = la.fillRule;
if (la.pushed)
{
if ((m_blendMode != 0) && (Layers.count() != 0))
361,6 → 368,10
cairo_pop_group_to_source (m_cr);
if (la.groupClip.size() != 0)
{
if( m_fillRule )
cairo_set_fill_rule (m_cr, CAIRO_FILL_RULE_EVEN_ODD);
else
cairo_set_fill_rule (m_cr, CAIRO_FILL_RULE_WINDING);
setupPolygon(&la.groupClip);
setClipPath();
}
/trunk/Scribus/scribus/ui/propertiespalette_group.h
76,6 → 76,7
void handleTextFlow();
void handleNewShape(int f, int c, qreal *vals);
 
void handleFillRule();
void handleShapeEdit();
void handleShapeEditEnded();
 
/trunk/Scribus/scribus/ui/propertiespalette_groupbase.ui
6,14 → 6,14
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>250</height>
<width>212</width>
<height>387</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>2</number>
</property>
77,9 → 77,9
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>5</number>
<number>2</number>
</property>
<property name="margin">
<number>2</number>
209,31 → 209,101
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="fillRuleGroup">
<property name="title">
<string>Fill Rule</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>5</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="QGroupBox" name="transparencyGroup">
<property name="title">
<string>Transparency</string>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="flat">
<bool>true</bool>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="Tpalette" name="transPalWidget" native="true"/>
</item>
</layout>
</spacer>
</item>
<item>
<widget class="QRadioButton" name="evenOdd">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Even-Odd</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="nonZero">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Non Zero</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="transparencyGroup">
<property name="title">
<string>Transparency</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="Tpalette" name="transPalWidget" native="true"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
96,6 → 96,8
 
connect(customShape , SIGNAL(FormSel(int, int, qreal *)), this, SLOT(handleNewShape(int, int, qreal *)));
connect(editShape, SIGNAL(clicked()) , this, SLOT(handleShapeEdit()));
connect(evenOdd , SIGNAL(clicked()) , this, SLOT(handleFillRule()) );
connect(nonZero , SIGNAL(clicked()) , this, SLOT(handleFillRule()) );
connect(transPalWidget , SIGNAL(editGradient()) , this, SLOT(handleGradientEdit()));
connect(transPalWidget , SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SLOT(handleSpecialGradient(double, double, double, double, double, double, double, double )));
}
283,6 → 285,8
m_item->patternFlip(mirrorX, mirrorY);
 
transPalWidget->setCurrentItem(m_item);
nonZero->setChecked(!m_item->fillRule);
evenOdd->setChecked(m_item->fillRule);
 
if ((m_item->isGroup()) && (!m_item->isSingleSel))
{
553,6 → 557,15
}
}
 
void PropertiesPalette_Group::handleFillRule()
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
m_item->fillRule = evenOdd->isChecked();
m_item->update();
emit DocChanged();
}
 
void PropertiesPalette_Group::handleShapeEdit()
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
627,4 → 640,4
transPalWidget->blockSignals(true);
transPalWidget->unitChange(oldRatio, m_unitRatio, m_doc->unitIndex());
transPalWidget->blockSignals(false);
}
}
/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
244,6 → 244,7
ite->PoLine = out.copy(); //FIXME: try to avoid copy if FPointArray when properly shared
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);
284,6 → 285,7
ite->PoLine = out.copy(); //FIXME: try to avoid copy if FPointArray when properly shared
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);
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
429,6 → 429,10
obc.appendChild(cl);
globalDefs.appendChild(obc);
ob.setAttribute("clip-path", "url(#Clip"+IToStr(ClipCount)+")");
if (Item->fillRule)
ob.setAttribute("clip-rule", "evenodd");
else
ob.setAttribute("clip-rule", "nonzero");
ClipCount++;
for (int em = 0; em < Item->groupItemList.count(); ++em)
{
/trunk/Scribus/scribus/pslib.cpp
2600,7 → 2600,7
PS_save();
SetClipPath(&c->PoLine);
PS_closepath();
PS_clip(true);
PS_clip(c->fillRule);
if (c->imageFlippedH())
{
PS_translate(c->width(), 0);
2629,7 → 2629,7
PS_save();
SetClipPath(&c->PoLine);
PS_closepath();
PS_clip(true);
PS_clip(c->fillRule);
if (c->imageFlippedH())
{
PS_translate(c->width(), 0);
/trunk/Scribus/scribus/scpainter.h
142,6 → 142,7
ScPattern *maskPattern;
FPointArray groupClip;
bool pushed;
bool fillRule;
};
cairo_pattern_t *getMaskPattern();
cairo_surface_t *imageMask;