SAS Component Language Dictionary |
Category: | Image |
Syntax |
rc=IMGCTRL(task-id,command,<other-arguments>); |
contains the return code for the operation:
0 | |
>0 |
contains the identifier of the image task, which is returned by a previous IMGINIT function.
is the control command to be executed. Commands are described in Commands Used with IMGCTRL.
Commands Used with IMGCTRL |
specifies the amount of time to wait before executing the next command. Seconds specifies the number of seconds to wait.
attempts to force the Image window to the top while IMGOP or IMGCTRL commands are executing. This command may not be honored by some window managers. Note that the 'TOPWINDOW' option can be set at IMGINIT time to force the window to always be on top.
specifies the width and height of the Image window in pixels. It optionally positions the window at xpos and ypos of the top left corner. Some window managers may not support positioning.
specifies a title for the Image window. The specified title appears in parentheses after 'SAS: IMAGE'.
Details |
IMGCTRL enables you to control the Image window. It includes, for example, commands to assign a window title and set the window size.
Examples |
Extract the name of the IMAGE entry and then use the WTITLE command to assign that name to the window:
path=lnamemk(5,catname,'format=cat'); rc=lnameget(path,type,name,form); gname=scan(name,3,'.'); rc=imgop(taskid,'READ',path); rc=imgctrl(taskid,'WTITLE',gname); rc=imgop(taskid,'PASTE',1,1);
Wait 5 seconds before displaying the image after each PASTE command:
rc=imgop(taskid,'READ',path); rc=imgop(taskid,'PASTE'); rc=imgctrl(taskid,'WAIT',5); rc=imgop(taskid,'READ',path2); rc=imgop(taskid,'PASTE'); rc=imgctrl(taskid,'WAIT',5);
Force the Image window to the top:
pop: rc=imgctrl(taskid,'WRAISE'); return;
Make the Image window match the size of the image that is being displayed:
height=0; width=0; rc=imgop(taskid,'READ',path); rc=imgop(taskid,'QUERYN','WIDTH',iwidth); rc=imgop(taskid,'QUERYN','HEIGHT',iheight); rc=imgctrl(taskid,'WSIZE',iwidth,iheight); rc=imgop(taskid,'PASTE',1,1);
Change the window title and then force the Image window to the top:
path=lnamemk(5,catname,'format=cat'); rc=lnameget(path,type,name,form); gname=scan(name,3,'.'); rc=imgop(taskid,'READ',path); rc=imgctrl(taskid,'WTITLE',gname); rc=imgop(taskid,'PASTE',1,1); rc=imgctrl(taskid,'WRAISE');
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.