|
|
|
|
SynopsisRetrieves the attribute value(s) of the region. Syntaxget_region(); get_region(id [,attribute]); Description
The get_region command returns a structure containing all the attribute values of the region. To retrieve the value of a specific attribute, provide the attribute name and the id or ChipsId of the object. Some values are set to "None" in the returned structure. These entries generally correspond to attributes which may only be modified at creation time, such as the object id. The attributes associated with regions are:
To see if a region is hidden or visible, use the get_region_visible command. Advanced FunctionsThe module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module): get_region_angle get_region_depth get_region_edgecolor get_region_edgestyle get_region_edgethickness get_region_fillstyle get_region_fillcolor get_region_opacity Example 1
chips> add_region([.1,.1,.7,.9,.7],[.07,.95,.95,.65,.07],"fill.style=1
fill.color=salmon");
chips> print(get_region());
chips> print(get_region("reg1","fill.color"));A region is created and becomes current. Calling get_region with no argument returns all the attributes of the object. get_region is called a second time to return just the "fill.color" attribute. Example 2
chips> add_region([.1,.1,.7,.9,.7],[.07,.95,.95,.65,.07],"fill.style=1
fill.color=salmon");
chips> add_region(3,.3,.3,.3,"fill.style=1 fill.color=plum");
chips> print(get_region("reg1"));Two regions are created. get_region is called with the id of the first region, returning all attributes. Example 3chips> id=ChipsId(); chips> id.region="reg1"; chips> print(get_region(id)); A ChipsId structure is created and the id.region field is set to "reg1". get_region is called with the ChipsId. Example 4chips> regatt=get_region(); chips> print(regatt); Retrieve a structure containing the attribute values of the current region and store the results in "regatt". Print the contents of "regatt". CHANGES IN CIAO 4.1The attribute "fill.style" replaces the "fill.visible" attribute. There are multiple fill styles available, instead of a boolean filled/not filled. A value of 0 (chips_nofill) is equivalent to fill.visible=0; a value of 1 (chips_solidfill) is equivalent to fill.visible=1 . BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
The Chandra X-Ray
Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA. Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2004. All rights reserved. |