[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPDCMM - Set Device Coordinate Mapping Method

GPDCMM ( wsid, method, length, data)

Purpose

Use GPDCMM to control how an image is displayed on a specified workstation. Only workstations which use the facilities of a window system (e.g., X-Windows) have use for this procedure. This subroutine specifies the method for transforming the graPHIGS API coordinate values to window coordinate values of a window system.

The graPHIGS API uses the method parameter to determine how the graPHIGS API performs the coordinate transformation. The valid methods include:

1=MAPPED
The graPHIGS API device coordinate range is scaled to fit the size of the window. The graPHIGS API preserves the aspect ratio of the workstation's device coordinate range. If the application makes the window smaller (or larger), then the size of the data of the window decreases (or increases) in direct proportion but the amount of data in the window remains the same. This is the default method.

2=DIRECT
The graPHIGS API displays the graPHIGS API device coordinate range directly into the window without scaling the contents. The graPHIGS API uses the lower, left corner of the window as the origin of the device coordinate range. If you make the window smaller than the device coordinate range, then the graPHIGS API discards (clips) the data outside of this specified range. The size of the root window is the maximum size that the workstation supports. If a window is larger than the maximum device coordinate extents, then the area beyond the extents is unused.

With the length and data parameters, your application must specify a rendering scale factor to scale primitive nominal sizes (line widths, marker sizes, edge widths, and annotation heights). This scale factor affects the nominal size for all primitives that have nominal sizes. In addition, the graPHIGS API applies this scale factor to the scale factor structure elements (i.e., marker size scale factor) When the value is set to 1.0, no scaling is performed. The specified values take effect on the next invocation of the Update Workstation ( GPUPWS) subroutine.

Use the Inquire Mapped Display Surface Size ( GPQMDS) subroutine to inquire the size of the mapped display surface.

This subroutine is ignored on workstations that do not use a window to display the graPHIGS API output.

Parameters

wsid -- specified by user, fullword integer

Workstation identifier.

method -- specified by user, fullword integer

Window mapping method ( 1=MAPPED, 2=DIRECT )

length -- specified by user, fullword integer

Length, in bytes, of the method-dependent data (>=0)

data -- specified by user, variable length data

Method-dependent data. Depending on the value specified by the method parameter, method-dependent data is as follows:

If method is 1=MAPPED

N/A (no data is required).

If method is 2=DIRECT

Rendering scale factor (>0.0)

A short floating-point number that specifies the rendering scale factor that the graPHIGS API uses when rendering line width, marker size, edge width, and annotation height primitives. If the value is set to 1.0, then no scaling is performed.

Error Codes

25
SPECIFIED WORKSTATION DOES NOT EXIST
35
WORKSTATION HAS ONLY INPUT CAPABILITIES
509
DATA LENGTH VALUE < ZERO OR REQUIRED LENGTH
512
METHOD NOT SUPPORTED
516
SCALE FACTOR IS INVALID

Related Subroutines

GPCCV
Convert Coordinate Values
GPGWIN
Get Window
GPQMDS
Inquire Mapped Display Surface Size

RCP code

201330181 ( X'0C000E05')


[ Previous | Next | Contents | Glossary | Home | Search ]