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

Dirk Hohndel dirk at hohndel.org
Tue Mar 11 20:21:44 PDT 2014


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.

> the patch also adds a newline at the bottom of ruleritem.h,
> so that this isn't a separate whitespace patch.

That's fine... it doesn't hide anything else to do so.

/D



More information about the subsurface mailing list