[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz] About vobcoorder_fontscale
From: |
Asko Soukka |
Subject: |
[Gzz] About vobcoorder_fontscale |
Date: |
Mon, 25 Nov 2002 12:04:35 +0200 (EET) |
>- How should getFontScale be used with TextStyle and TextVob?
> RESOLVED: In a bit awkward way, but workable::
> scale = coords.getFontScale(cs)
> height = textStyle.getHeight(scale) / scale
> textcs = coords.ortho(cs, 0, 0, height, height)
> vs.put(textvob, textcs)
> This example puts text that is in the natural height of its textStyle
> inside the coordinate system.
I'm questioning, should we use TextVob only through HBox.place()
(TextVob implements HBox.VobHBox)? If not, when should we use HBox.place()
and when put TextVob directly by vs.map.put()?
>From HBox.java:
public void place(VobScene vs, int box, float scale) {
this.scale = scale;
float h = getHeight(scale)+getDepth(scale);
int cs_scale = vs.scaleCS(box, "textbox", h, h);
vs.map.put(this, cs_scale);
}
--
Asko Soukka | Taitoniekantie 9 A 603 | address@hidden
+358-40-8235947 | FIN-40740 JYVÄSKYLÄ | http://www.iki.fi/asko.soukka/