Copyright (C) 1994, Digital Equipment Corp.
<*PRAGMA LL*>A
PixmapVBT.T
is a VBT that displays a pixmap. Its preferred
and minimum sizes are the size of the pixmap, and its maximum size
in each axis is very large.
INTERFACEThe callPixmapVBT ; IMPORT VBT, PaintOp, Pixmap; TYPE T <: Public; Public = VBT.Leaf OBJECT METHODS <* LL.sup <= VBT.mu *> init (pm: Pixmap.T; op: PaintOp.T := PaintOp.BgFg; bg: PaintOp.T := PaintOp.Bg): T END;
v.init(...)
initializes v
as a PixmapVBT
displaying
pixmap pm
using the paint op op
, and returns v
. The pixmap
is always centered within the domain of v
, and if the domain is
larger than the pixmap, the background is painted using the tint
bg
.
When the pixmap has depth 1, op
should be a pair of tints.
Otherwise, a good choice for op
is PaintOp.Copy
.
PROCEDURE Put (v: T; pm: Pixmap.T); <* LL.sup = VBT.mu *>
Change the pixmap displayed byv
topm
, and markv
for redisplay.
PROCEDURE SetColors (v : T; op: PaintOp.T; bg: PaintOp.T := PaintOp.Bg); <* LL.sup = VBT.mu *>
Change theop
andbg
ofv
, and markv
for redisplay.
END PixmapVBT.