Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4747 → Rev 4748

/branches/Version13x/Scribus/scribus/scpainter.cpp
868,6 → 868,36
#endif
}
 
#ifndef HAVE_CAIRO
void ScPainter::setClipPath2(FPointArray *points, bool closed)
{
setClipPath();
setupPolygon(points, closed);
ArtVpath *vec = art_bez_path_to_vec( m_path , 0.25 );
double affine[6];
affine[0] = m_matrix.m11();
affine[1] = m_matrix.m12();
affine[2] = m_matrix.m21();
affine[3] = m_matrix.m22();
affine[4] = m_matrix.dx();
affine[5] = m_matrix.dy();
ArtVpath *temp1 = art_vpath_affine_transform( vec, affine );
art_free( vec );
ArtSvpWriter *swr;
ArtSVP *temp = art_svp_from_vpath( temp1 );
if( m_fillRule )
swr = art_svp_writer_rewind_new( ART_WIND_RULE_ODDEVEN );
else
swr = art_svp_writer_rewind_new( ART_WIND_RULE_NONZERO );
art_svp_intersector( temp, swr );
temp = art_svp_writer_rewind_reap( swr );
ArtSVP *temp2 = art_svp_intersect( temp, m_clipPath );
m_clipPath = temp2;
art_svp_free( temp );
art_free( temp1 );
}
#endif
 
void ScPainter::drawImage( QImage *image )
{
#ifdef HAVE_CAIRO
/branches/Version13x/Scribus/scribus/pageitem_imageframe.cpp
101,13 → 101,19
p->setClipPath();
}
p->setupPolygon(&PoLine);
p->setClipPath();
#else
if (imageClip.size() != 0)
{
p->setupPolygon(&imageClip);
p->setClipPath2(&PoLine, true);
}
else
{
p->setupPolygon(&PoLine);
p->setClipPath();
}
#endif
p->setClipPath();
if (imageFlippedH())
{
p->translate(Width * sc, 0);
/branches/Version13x/Scribus/scribus/scpainter.h
101,6 → 101,9
virtual void setFillMode( int fill );
virtual void setGradient( VGradient::VGradientType mode, FPoint orig, FPoint vec, FPoint foc = FPoint(0,0));
virtual void setClipPath();
#ifndef HAVE_CAIRO
virtual void setClipPath2(FPointArray *points, bool closed);
#endif
 
virtual void drawImage( QImage *image );
virtual void setupPolygon(FPointArray *points, bool closed = true);