Glimmr Drawing Commands

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Short forms of bitmap texts

    To bitmap/bmp text/txt (STR - indexed text) at (COORD1 - a list of numbers) size (WGT - a number) pixel/pixels/px/-- backgrounded/background/bkgd, center-aligned or right-aligned:
        if the type of the current graphics window is not g-graphics:
            say "*** Error: Short-form bitmap string directive ignored. The current graphics window global was not correctly specified.";
            rule fails;
        let x1 be entry 1 of coord1;
        let y1 be entry 2 of coord1;
        if center-aligned:
            paint a bitmap text (current foreground-color) of (STR) in (current graphics window) at (X1) by (Y1) using (current font) with dot size (WGT) and background (current background-color), center-aligned;
            rule succeeds;
        if right-aligned:
            paint a bitmap text (current foreground-color) of (STR) in (current graphics window) at (X1) by (Y1) using (current font) with dot size (WGT) and background (current background-color), right-aligned;
            rule succeeds;
        otherwise:
            paint a bitmap text (current foreground-color) of (STR) in (current graphics window) at (X1) by (Y1) using (current font) with dot size (WGT) and background (current background-color).

    To bitmap/bmp text/txt (STR - indexed text) at (COORD1 - a list of numbers) size (WGT - a number) pixel/pixels/px/--, center-aligned or right-aligned:
        if the type of the current graphics window is not g-graphics:
            say "*** Error: Short-form bitmap string directive ignored. The current graphics window global was not correctly specified.";
            rule fails;
        let x1 be entry 1 of coord1;
        let y1 be entry 2 of coord1;
        if center-aligned:
            paint a bitmap text (current foreground-color) of (STR) in (current graphics window) at (X1) by (Y1) using (current font) with dot size (WGT), center-aligned;
            rule succeeds;
        if right-aligned:
            paint a bitmap text (current foreground-color) of (STR) in (current graphics window) at (X1) by (Y1) using (current font) with dot size (WGT), right-aligned;
            rule succeeds;
        otherwise:
            paint a bitmap text (current foreground-color) of (STR) in (current graphics window) at (X1) by (Y1) using (current font) with dot size (WGT).