Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 20639 → Rev 20640

/trunk/Scribus/scribus/pageitem.cpp
2803,12 → 2803,15
if (style.baselineOffset() != 0)
st += (style.fontSize() / 10.0) * glyphs.scaleV * (style.baselineOffset() / 1000.0);
QColor tmpC = p->pen();
int oldStrokeMode = p->strokeMode();
p->setPen(p->brush());
p->setLineWidth(lw);
p->setStrokeMode(1);
if (style.effects() & ScStyle_Subscript)
p->drawLine(FPoint(glyphs.xoffset, glyphs.yoffset - st), FPoint(glyphs.xoffset + glyphs.xadvance, glyphs.yoffset - st));
else
p->drawLine(FPoint(glyphs.xoffset, -st), FPoint(glyphs.xoffset + glyphs.xadvance, -st));
p->setStrokeMode(oldStrokeMode);
p->setPen(tmpC);
}
if (gly.size() > 3)
/trunk/Scribus/scribus/scpageoutput.cpp
553,12 → 553,15
if (style.baselineOffset() != 0)
st += (style.fontSize() / 10.0) * glyphs.scaleV * (style.baselineOffset() / 1000.0);
ScColorShade tmpPen = painter->pen();
int tmpStrokeMode = painter->strokeMode();
painter->setPen(painter->brush());
painter->setLineWidth(lw);
painter->setStrokeMode(1);
if (style.effects() & ScStyle_Subscript)
painter->drawLine(FPoint(glyphs.xoffset, glyphs.yoffset - st), FPoint(glyphs.xoffset + glyphs.xadvance, glyphs.yoffset - st));
else
painter->drawLine(FPoint(glyphs.xoffset, -st), FPoint(glyphs.xoffset + glyphs.xadvance, -st));
painter->setStrokeMode(tmpStrokeMode);
painter->setPen(tmpPen);
}
if (gly.size() > 3)
/trunk/Scribus/scribus/scpainter.cpp
21,13 → 21,13
m_width = w;
m_height= h;
m_stroke = QColor(0,0,0);
strokeMode = 0;
m_strokeMode = 0;
maskMode = 0;
m_fill = QColor(0,0,0);
fill_trans = 1.0;
stroke_trans = 1.0;
m_fillRule = true;
fillMode = 1;
m_fillMode = 1;
LineWidth = 1.0;
m_offset = 0;
m_layerTransparency = transparency;
264,12 → 264,12
 
void ScPainter::setFillMode( int fill )
{
fillMode = fill;
m_fillMode = fill;
}
 
void ScPainter::setStrokeMode( int stroke )
{
strokeMode = stroke;
m_strokeMode = stroke;
}
 
void ScPainter::setGradient(VGradient::VGradientType mode, FPoint orig, FPoint vec, FPoint foc, double scale, double skew)
402,7 → 402,7
 
void ScPainter::fillPath()
{
if (fillMode != 0)
if (m_fillMode != 0)
fillPathHelper();
}
 
410,7 → 410,7
{
// if( LineWidth == 0 )
// return;
if (strokeMode != 0)
if (m_strokeMode != 0)
strokePathHelper();
}
 
680,7 → 680,7
cairo_set_fill_rule (m_cr, CAIRO_FILL_RULE_EVEN_ODD);
else
cairo_set_fill_rule (m_cr, CAIRO_FILL_RULE_WINDING);
if (fillMode == 1)
if (m_fillMode == 1)
{
double r, g, b;
m_fill.getRgbF(&r, &g, &b);
702,7 → 702,7
cairo_fill_preserve(m_cr);
}
}
else if (fillMode == 2)
else if (m_fillMode == 2)
{
cairo_pattern_t *pat = NULL;
cairo_surface_t *img = NULL;
1434,7 → 1434,7
}
#endif
}
else if (fillMode == 3)
else if (m_fillMode == 3)
{
cairo_set_antialias(m_cr, CAIRO_ANTIALIAS_NONE);
cairo_surface_t *image2 = cairo_image_surface_create_for_data ((uchar*)m_pattern->getPattern()->bits(), CAIRO_FORMAT_ARGB32, m_pattern->getPattern()->width(), m_pattern->getPattern()->height(), m_pattern->getPattern()->width()*4);
1475,7 → 1475,7
cairo_surface_destroy (image2);
cairo_set_antialias(m_cr, CAIRO_ANTIALIAS_DEFAULT);
}
else if (fillMode == 4)
else if (m_fillMode == 4)
{
cairo_path_t *path;
path = cairo_copy_path(m_cr);
1594,7 → 1594,7
cairo_set_line_join( m_cr, CAIRO_LINE_JOIN_BEVEL );
else if( PLineJoin == Qt::MiterJoin )
cairo_set_line_join( m_cr, CAIRO_LINE_JOIN_MITER );
if (strokeMode == 3)
if (m_strokeMode == 3)
{
cairo_push_group(m_cr);
cairo_set_antialias(m_cr, CAIRO_ANTIALIAS_NONE);
1626,7 → 1626,7
setRasterOp(m_blendModeStroke);
cairo_paint_with_alpha (m_cr, stroke_trans);
}
else if (strokeMode == 2)
else if (m_strokeMode == 2)
{
cairo_push_group(m_cr);
cairo_pattern_t *pat;
/trunk/Scribus/scribus/scpainter.h
65,7 → 65,9
virtual void setFillRule( bool fillRule );
virtual bool fillRule() { return m_fillRule; }
virtual void setFillMode( int fill );
virtual int fillMode() { return m_fillMode; }
virtual void setStrokeMode( int stroke );
virtual int strokeMode() { return m_strokeMode; }
virtual void setGradient( VGradient::VGradientType mode, FPoint orig, FPoint vec, FPoint foc, double scale, double skew);
virtual void setPattern(ScPattern *pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
 
184,7 → 186,7
QColor m_fill;
double fill_trans;
bool m_fillRule;
int fillMode; // 0 = none, 1 = solid, 2 = gradient 3 = pattern 4 = hatch
int m_fillMode; // 0 = none, 1 = solid, 2 = gradient 3 = pattern 4 = hatch
double patternScaleX;
double patternScaleY;
double patternOffsetX;
223,7 → 225,7
QColor m_stroke;
double stroke_trans;
double LineWidth;
int strokeMode; // 0 = none, 1 = solid, 2 = gradient 3 = pattern
int m_strokeMode; // 0 = none, 1 = solid, 2 = gradient 3 = pattern
int maskMode; // 0 = none, 1 = gradient 2 = pattern
double mask_patternScaleX;
double mask_patternScaleY;