Copyright (c) 2000 California Institute of Technology
All rights reserved. See the file COPYRIGHT for a full description.
$Id: VBTTextBounder.m3.html,v 1.3 2010-04-29 17:18:12 wagner Exp $
MODULE VBTTextBounder;
IMPORT LinoText;
IMPORT Rect;
IMPORT VBT;
IMPORT OneFont;
REVEAL
T = Public BRANDED "VBTTextBounder" OBJECT
v: VBT.T;
OVERRIDES
init := Init;
bound := Bound;
END;
PROCEDURE Init(self: T; v: VBT.T): T =
BEGIN
self.v := v;
RETURN self;
END Init;
PROCEDURE Bound(self: T; t: LinoText.T): Rect.T =
BEGIN
<* ASSERT t.attach = LinoText.Attach.West *>
RETURN Rect.Move(VBT.BoundingBox(self.v,t.t,OneFont.FromSize(t.size)),t.a);
END Bound;
BEGIN
END VBTTextBounder.