Q: profile text outlines
Lubomir I. Ivanov
neolit123 at gmail.com
Fri Jun 28 05:34:12 PDT 2013
On 28 June 2013 15:27, Tomaz Canabrava <tcanabrava at kde.org> wrote:
> 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 );
i think i'm aware of that, but the problem is particular to the text
outlining relative to style.
we need the white outline to start outside of the text fill or be
bellow it, so that it doesn't cover portions of it.
More information about the subsurface