PixmapVBT.Tis a VBT that displays a pixmap.
The minimum size of a
PixmapVBT is just large enough to display
its pixmap (surrounded by any margins that were supplied when the
PixmapVBT was created). Its preferred size is the same as its
minimum size, and its maximum size is very large.
PixmapVBT; IMPORT VBT, PaintOp, Pixmap; TYPE T <: Public; Public = VBT.Leaf OBJECT METHODS <* LL.sup <= VBT.mu *> init (pm: Pixmap.T; halign, valign: REAL := 0.5; hmargin, vmargin: REAL := 0.0; op: PaintOp.T := PaintOp.BgFg; bg: PaintOp.T := PaintOp.Bg): T END;
pmusing the paint op
op, and returns
halign = 0.0, the west boundary of the pixmap will be indented
by the given
hmargin (in millimeters) from the west boundary of
halign = 1.0, the east boundary of the pixmap will
be inside the east boundary of the
VBT by the given
for other values of
halign, the horizontal position of the text
is computed by linear interpolation. In particular,
halign = 0.5
centers the pixmap horizontally. The vertical position is determined
valign in a similar way.
If the domain of
v is larger than the pixmap, the background is
painted using the tint
When the pixmap has depth 1,
op should be a pair of tints.
Otherwise, a good choice for
PROCEDURE Put (v: T; pm: Pixmap.T); <* LL.sup = VBT.mu *>
Change the pixmap displayed by
pm, and mark
PROCEDURE SetColors (v : T; op: PaintOp.T; bg: PaintOp.T := PaintOp.Bg); <* LL.sup = VBT.mu *>
v, and mark