• Aucun résultat trouvé

vcur_color ()

Dans le document The information (Page 134-142)

Purpose Set cursor text color index

Syntax ycuccolor (dev_handle, foreJequested, backJequested,

&fore_selected, &back_selected)

Data Types INT16 ycur_color OJ

INT16 deY_handle;

INT16 fore_requested;

INT16 back_requested;

INT16 fore_selected;

INT16 back_selected;

Input dey_handle

Output

Function Returns

Device handle returned from v_opnwk.

Refers to a specific graphics device when multiple workstations are open.

fore_requested

Color index of the foreground of subsequent output cursor text.

default = 1 back_requested.

Color index of the background of subsequent output cursor text.

default =

a

fore_selected

Color index selected for cursor text foreground.

back_selected

Color index selected for cursor text background.

Function vcur_color returns error state

a

if no error -1 if error

Actual error can be retrieved by invoking vq_error.

Description This routine sets the foreground and background colors for cursor addressable text. If an invalid color index is specified, it is mapped to the index closest to the current device's capabilities.

5·68 Control Functions

Purpose

Set color representation

vs_color (dev _handle, ind_in, rgb_in, rgb_out) INT16 vs_color ();

INT16 dev_handle;

INT16 Ind_in;

INT16 rgb_in[3];

INT16 rgb_out[3];

dey_handle

Device handle returned from v_opnwk.

Refers to a specific graphics device when multiple workstations are open.

ind_in

Color index requested.

rgb[O]

Red color intensity.

o

to 1000 (tenths of percent) rgb[1]

Green color intensity.

o

to 1000 (tenths of percent) rgb[2]

Blue color intensity.

o

to 1000 (tenths of percent) rgb_out£O]

Red color intensity selected.

o

to 1000 (tenths of percent) rgb_out[1]

Green color intensity selected.

o

to 1000 (tenths of percent) rgb_out[2]

Blue color intensity selected.

o

to 1000 (tenths of percent) Function vs_color returns

2':0 if index selected -1 if error

Actual error can be retrieved by invoking vq_error.

Attribute Functions 5-69

Description This routine is used to map indices to new colors.

At least two color indices are provided. If the desired index is outside of the device's

capabilities, then the closest device index is set. If a color intensity of less than 0 is requested, it is mapped to

o.

If a color intensity greater than 1000 is requested, it is mapped to 1000.

To change the appearance of a color, you must select the desired levels of the three color components (red, green and blue) that make up the index. This can be used to create nondefault colors such as brown or orange. The new color will only be visible on devices that support color definition.

If the value of the function vs_color is negative then an error occurred. If the function returns a value greater than or equal to zero, then it is equal to the color index selected, and no error occurred.

5-70 Control Functions

vs_editchars 0

Purpose Syntax Data Types

Input

Function Returns

Set line edit characters

INT16 vs_editchars ();

INT16 deY_handle;

INT8 line_del;

INT8 char_del;

dev_handle

Device handle returned from y_opnwk.

Refers to a specific graphics device when multiple workstations are open.

line_del

Character to use to delete previous line.

Default = AU (NAK) char_del

Character to use to delete previous character.

Default = "H (Backspace)

Function vs_editchars returns error state

o

if no error -1 if error

Actual error can be retrieved by invoking Yq._error.

Description This routine sets the current line editing

characters. They are applied to the Input String function only.

Attribute Functions 5· 71

Purpose Syntax Data Types

Input

Function Returns

Set alpha text color index

vsa_color (dev_handle, lnd_in) INT16 vsa_color OJ

INT16 dev_handle;

INT16 ind_ln;

dey_handle

Device handle returned from v_opnwk.

Refers to a specific graphics device when multiple workstations are open.

ind_in

Requested text color index.

1 to device maxim urn

Function vsa_color value returned is:

2::0 if color index selected -1 if error

Actual error can be retrieved by invoking vq_error.

Description This routine selects the alpha text color index for subsequent output.

At least two color indices are provided. Color indices range from 0 to a device-dependent maximum.

If the color index requested is not valid, the closest value within the range of the current device's capabilities is selected.

5-72 Control Functions

Purpose Syntax Data Types

Input

Output

Set alpha text font and size

INT16 vsa_font 0;

INT16 dev_handle;

INT16 fonCin;

INT16 size_in;

INT16 fonCcap[8];

dey_handle

Device handle returned from v_opnwk.

Refers to a specific graphics device when multiple workstations are open.

font_in

Requested font.

H requested font is not available, font 1 (standard font) is used. Fonts 1 to 3 are fixed-space fonts.

1 = Normal/standard font (default) 2

=

Bold (always provided for printers) 3 = Italics

4 = Proportionally spaced normal font 5 = Proportionally spaced bold 6 = Proportionally spaced italics

>6

=

Device-dependent size_in

Requested text size.

1 to device maximum

where size n+ 1 is larger (occupies more area) than size n.

font_cap[O]

Text size index selected.

fonLcap[1]

Number of horizontal character cell positions across the display surface in this font. This is -1 if the font selected is a proportional font, since the character cell size is not constant.

font_cap[21

Number of vertical character cell positions down the display surface in this font.

Attribute Functions 5-73

Function Returns

fonCcap[3]

Number of horizontal character cell positions represented by the distance specified in font_cap[6].

The ratio (font_cap[6]/ fonCcap[3]) can be used to determine the width of a character cell, including any roundoff error.

font_cap[41

Number of vertical character cell positions

represented by the distance specified in font_cap[7].

The ratio (font_cap[7]/ font_cap[4]) can be used to determine the height of a character cell, including any roundoff error.

fonCcap[5]

Proportional spacing flag.

0= No 1 = Yes

If this valu~ is 1, then the size represented by font_cap[6] and font_cap[7] may not represent the selected font. This is the case if the desired font is proportionally spaced.

font_cap [6]

Width in NDC units of the number of character cells in the selected font specified in font_cap[3].

The ratio (font_cap[6]/ font_cap[3]) can be used to determine the width of a character cell, including any roundoff error. This value is not accurate if the proportional spacing flag is set, since the character cell size is not constant.

font_cap[71

Height in NDC units of the number of character cells in the selected font specified in font_cap[S].

The ratio (font_cap[7]/ font_cap[4]) can be used to determine the height of a character cell including any roundoff error.

Function vsa_font returns

~O if font selected -1 if error

Actual error can be retrieved by invoking vq_error.

5-74 Control Functions

Description This routine sets the hardware alpha text font and size for subsequent output alpha text functions.

On printers, the resident font capability is used.

Unlike graphics text, alpha text capabilities do not include font emulation.

Attribute Functions 5-75

Dans le document The information (Page 134-142)

Documents relatifs