[PATCH 5/6] Ruler: change how the ruler text drawing works

Lubomir I. Ivanov neolit123 at gmail.com
Wed Mar 12 11:08:01 PDT 2014


On 12 March 2014 20:00, Tomaz Canabrava <tcanabrava at kde.org> wrote:
>
> Em 12/03/2014 14:07, "Lubomir I. Ivanov" <neolit123 at gmail.com> escreveu:
>
>
>>
>> On 12 March 2014 05:21, Dirk Hohndel <dirk at hohndel.org> wrote:
>> > On Wed, 2014-03-12 at 00:09 +0200, Lubomir I. Ivanov wrote:
>> >> From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
>> >>
>> >> A couple of problems with the ruler:
>> >> - the rotated text doesn't look very well at all and
>> >> interpolation doesn't help it much
>> >> - measuring towards the right most part of the profile makes
>> >> the text go out of the screen
>> >>
>> >> To solve these issues and attempt to improve the ruler
>> >> this patch does the following:
>> >> - place the text at the bottom of the lowest of the start
>> >> and end points. this way the line will never intersect with
>> >> the text
>> >> - clamp the x position, so that the text doesn't ever leave
>> >> the screen horizontally
>> >> - place a white background behind the text so that it
>> >> will cover text and graphics under the ruler item
>> >> (TODO: place the ruler on top of everything else)
>> >>
>> >> Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
>> >> ---
>> >> more or less a proposal.
>> >
>> > since this is marked as 'proposal' I'll wait for Tomaz to comment...
>> >
>> > It looks ok to me.
>> >
>>
>> tomaz?
>> to summarize, without this change the ruler text goes out of screen is
>> distorted when rotated.
>> if the rotation is desired then i think the way to do that would be to
>> render the text horizontally and then render that to a rotated pixmap
>> and not rotate the item itself.
>
> Sorry, sick in bed.
> Dirk, the changes I did on the ruler where to try to make it similar to the
> old one, but he is right, text looks crap.
> I didn't compiled this patch, but I think it's a better approach to show
> texts on a fixed position.
>
> So, +1 for me.
>
>> other opinions?
>>

to note - this one is followed by:
[PATCH 6/6] Profile2: place the ruler and tooltip on top (Z order)

lubomir
--


More information about the subsurface mailing list