Glimmr Drawing Commands

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Part - Other functions

    Chapter - Determination of image size

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

    Include (-

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

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

    -)