IPB

> SetPalette (procedure) (Graph unit)
Чат
Форум
Загрузка...
 

Language:
Русский
English

 SetPalette (procedure)     (Graph unit)


Changes one palette color as specified by ColorNum and Color.

Declaration

 procedure SetPalette(ColorNum: Word; Color: Shortint);

Target

Real, Protected

Remarks

Changes the ColorNum entry in the palette to Color. SetPalette(0, LightCyan) makes the first color in the palette light cyan. ColorNum can range from 0 to 15, depending on the current graphics driver and current graphics mode. If invalid input is passed to SetPalette, GraphResult returns a value of grError, and the palette remains unchanged.

Changes made to the palette are seen immediately onscreen. In the example here, several lines are drawn onscreen, then the palette is changed ran-dom-ly. Each time a palette color is changed, all onscreen occurrences of that color will be changed to the new color value. See Color constants for a list of defined color constants.

Restrictions

Must be in graphics mode, and can be used only with EGA, EGA 64, or VGA (not the IBM 8514).

See Also

Sample Code

 
 К началу страницы 
Тэги: SetPalette
 

Код для вставки: :: :: :: ГОСТ ::
Поделиться: //
 



-
Хостинг предоставлен компанией "Веб Сервис Центр" при поддержке компании "ДокЛаб"