Q: profile text outlines

Tomaz Canabrava tcanabrava at kde.org
Fri Jun 28 05:27:57 PDT 2013


On Fri, Jun 28, 2013 at 9:11 AM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> in cairo we had text outlines such as a slight white glow, which
> prevented blending with colored background items such as plot lines.
> we also had the that when printing a colored or b/w profile. now, i've
> tried to do the same with QGraphicsSimpleTextItem::setPen() (ref.
> ProfileGraphicsView::plot_text) but the problem is that the outline is
> positioned on top of the text fill and it does not look that good as
> it decreases the size of the fill. to my knowledge it's not possible
> to position the outline _below_ the fill or start the outline
> _outside_ of the fill instead of strictly on top of it i.e. centered?
>
> as an alternative, i've tried using QPainterPath::addText,
> QPainterPathStroker (which does what is described above) and making
> ProfileGraphicsView::plot_text use QGraphicsPathItem instead, but this
> ends to no avail as i cannot understand how to paint said items then.
>
> does anyone has suggestions on this topic?

to plot anything on a QGraphicsView, you need to:
1 - position it on the scene, using scene coordinates

item->setPos(  10, 20);

2 - put the item on the canvas

scene()->addItem ( myPathItem );
> lubomir
> --
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface


More information about the subsurface mailing list