# The TextureVBT interface

A `TextureVBT.T` is a `VBT` that displays a texture, possibly colored. Its preferred and minimum sizes are zero and its maximum size is very large, in each axis.

    INTERFACE TextureVBT;

    IMPORT VBT, PaintOp, Pixmap;

    TYPE
      T <: Public;
      Public = VBT.Leaf OBJECT METHODS
        <* LL.sup <= VBT.mu *>
        init(op: PaintOp.T := PaintOp.BgFg;
          txt: Pixmap.T := Pixmap.Solid;
          nwAlign: BOOLEAN := FALSE): T
      END;

The call `v.init(...)` initializes `v` as a `TextureVBT` displaying `txt` with the painting operation `op`.

The domain of `v` will be painted using the painting operation `op` and the texture `txt+delta`, where `delta` is the origin unless `nwAlign` is set to `TRUE`, in which case `delta` will be set to the northwest corner of `v`.

    PROCEDURE New(
      op: PaintOp.T := PaintOp.BgFg;
      txt: Pixmap.T := Pixmap.Solid;
      nwAlign: BOOLEAN := FALSE): T;  <* LL.sup <= VBT.mu *>

`New(...)` is equivalent to `NEW(T).init(...)`.

    PROCEDURE Set(
      v: T;
      op: PaintOp.T := PaintOp.BgFg;
      txt: Pixmap.T := Pixmap.Solid;
      nwAlign: BOOLEAN := FALSE);
    <* LL.sup = VBT.mu *>

Change `v`'s texture and mark it for redisplay.

    PROCEDURE Get(
      v: T;
      VAR op: PaintOp.T;
      VAR txt: Pixmap.T;
      VAR nwAlign: BOOLEAN); <* LL.sup = VBT.mu *>

Fetch `v`'s texture.

    END TextureVBT.