[scribus-dev] RFC: proposal to make ScPainter into ScPainterEx

Andreas Vox avox at arcor.de
Tue Jan 5 00:46:54 CET 2010


Hi folks, hi Jean!

I've started to merge ScPainter with ScPainterEx; as a first step I  
declared

class SCRIBUS_API ScPainter : public ScPainterExBase

and made appropiate changes.  This mostly means replacing QColor by  
ScColorShade.

I also added a method ScPainterExBase::drawGlyphs() which will have a  
default implementation using the outlines from ScFace.

Jean, do you want to add the necessary stuff to ScPainter to do the  
color management? Right now I just use "ScColorShade(qcolor, 100)" and  
"sccolorshade.color.getRawRGBColor()" to do the necessary conversions.

The methods ScPainter::setPattern(), ScPainter::setGradient() and  
ScPainter::drawImage() are just stubs for now and should be rewritten  
for the new interface, any hints?

I also propose to rename the remaining QColor methods into  
"setPenRaw(QColor)" etc. Those are mainly used for drawing rulers and  
selection markup. Same with "drawTextRaw()"

Next steps:
Once ScPainter does correct color management with ScColorShade, the  
remaining PageItem::Draw() methods can be changed to expect a  
ScPainterExBase*. After that Jean should do some refactoring because  
most of scpageoutput will not be needed any more.

I'll reserve moving pdflib to scpainterexbase for a later project ;-)

/Andreas



-------------- next part --------------
A non-text attachment was scrubbed...
Name: scpainterhack.diff
Type: application/octet-stream
Size: 9643 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20100105/6e8fce57/attachment.obj>
-------------- next part --------------



More information about the scribus-dev mailing list