Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiGetGeometryResource

hiGetGeometryResource(
t_resourceName
[ t_resourceClass ]
)
=> l_resource

Description

Gets geometry resources from the X resource database.

You must preface your resource with Opus. The syntax for describing a standard geometry string is documented in the Xlib Programming Manual, and is of the form:

<width>x<height>{+-}<xoffset>{+-}<yoffset>    

where items enclosed in <> are integers and items enclosed in {} are a set from which one item is allowed.

The syntax accepts only positive "+" values. Also, the x and y values are relative to the upper left corner of the screen.

Arguments

t_resourceName

Name of the resource to look up in the resource database.

t_resourceClass

Resource class to further limit the number of potential matches in the resource database. (See X documentation for a further discussion on X resource classes. For general use, a resourceName is usually sufficient.)

Values Returned

l_resource

The list( x y width height ) value of the specified resource. Any component of the geometry specification not specified is returned as a nil list value. If a negative x, y, width, or height is specified, 0 is returned for that component.

nil

The specified resource does not exist.

Examples

The following examples are for a .Xdefaults file specifying the following resources:

Opus.geo1: 600x400+100+400
Opus.geo2: +1+2
Opus.geo3: 600+99
Opus.geo4: 400+1-20
Opus.geo5: 400x600+2
hiGetGeometryResource("geo1")
=> list( 100 400 600 400 )
hiGetGeometryResource("geo2")
=> list( 1 2 nil nil )
hiGetGeometryResource("geo3")
=> list( 99 nil 600 nil )
hiGetGeometryResource("geo4")
=> list( 1 0 400 nil )
hiGetGeometryResource("geo5")
=> list( 2 nil 400 600)
hiGetGeometryResource("notThere")
=> nil

Related Topics

Resource Management Functions

hiGetBBoxResource


Return to top
 ⠀
X