Glulx Drawing Commands

version 1/090629 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Routines to determine image size

    To decide what number is the pixel-width of (img - a figure-name):
        (- FindImageWidth({img}); -)
        
    To decide what number is the pixel-height of (img - a figure-name):
        (- FindImageHeight({img}); -)

    Include (-

    [ FindFigureWidth img result img_width;
        result = glk_image_get_info(img, gg_arguments, gg_arguments+WORDSIZE);
    img_width = gg_arguments-->0;
        return img_width;
    ];

    [ FindFigureHeight img result img_height;
        result = glk_image_get_info(img, gg_arguments, gg_arguments+WORDSIZE);
    img_height = gg_arguments-->1;
        return img_height;
    ];

    -)