octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Graphics: Title and label properties


From: Maciek Gajewski
Subject: Re: Graphics: Title and label properties
Date: Mon, 21 Jul 2008 10:07:12 +0200
User-agent: KMail/1.9.9

Michael Goffioul wrote:
> Placing correctly the labels and title means determining the position,
> the rotation and the Horz./Vert. alignment. This must take into account
> the current axes transformation (2D/3D, azimuth and elevation angles...),
> but also the tick marks length and text (both font metric and actual text.
> For instance, taking your remark above that the y-label should be
> rotated 90 degrees, this is only true for plain-2D (azimuth=0,
> elevation=90).

Yes, taking 3D into account makes problem waaaay more complicated. So maybe 
I'll start with auto-positioning for 2D, and then expand it to 3D.

> AFAIK Shai is working on the text engine, including an interface to
> get font metrics. This should help in placing the labels correctly. But
> definitely, this auto-location should be taken out of the OpenGL
> renderer. So, again, help is always welcome.

I've noticed double base_graphics_backend::get_screen_resolution (), which 
could be used for simplest font metrics implementation.

To get complete font metrics information from backend, interface could be 
extended by calls like these:

rectangle get_text_extend ( string text, double font_size, string face_name );

or

rectangle get_text_extend ( handle h, string text ); - where font size and 
face name are taken from properties of object identified by 'h'.

Here I have a question: are there any readily-available types in octave which 
can be used to store rectangle, point and other geometrical types?

John W. Eaton wrote:
> | BTW I  have another question: why the default font size for axes is 12,
> | when competition have 10 points (which looks better)?
>
> I'd say "better" here is subjective.

I'm not asking because aesthetics. It's because of title location. Axes title 
fits into margin above axes. When default font is too big, margin also needs 
to be big enough.

Maciek Gajewski






reply via email to

[Prev in Thread] Current Thread [Next in Thread]