call CwGetBitmapInfo path, stem ("stem" is the name of a stem variable in which the results are stored. There are 2 fields of the stem that are set.) path (string) The path to the bitmap file. stem.width (numeric) The actual width (in pixels) of the bitmap as stored in the file. stem.height (numeric) The actual height (in pixels) of the bitmap as stored in the file.
/* Restore a bitmap to its correct aspect ratio.*/ bm = CwGetSelectedObject() t = CwGetProperty(bm, "tool type") if t \= "Bitmap" then do say "Must select a bitmap." exit end bt = CwGetTool(bm) bmp = CwGetProperty(bt,"image") call CwGetBitmapInfo bmp, 'bminfo' r = bminfo.width / bminfo.height call CwGetPosition bm, bmdim nheight = bmdim.width/r call CwSetPosition bm, bmdim.x, bmdim.y, bmdim.width, , nheight, bmdim.rotation, bmdim.xshear
Functions by NAME |
Index |
Functions by PURPOSE |