Difference between revisions of "84PCSE:RAM:A03A"

From WikiTI
Jump to: navigation, search
(penFGColorIndex)
 
m (Comments: fix link)
 
Line 12: Line 12:
 
This is the current color index (a number between 1 and 15, which identifies one of the 15 predefined colors.)  It is used as a "foreground" color when drawing text, points, or lines on the graph.
 
This is the current color index (a number between 1 and 15, which identifies one of the 15 predefined colors.)  It is used as a "foreground" color when drawing text, points, or lines on the graph.
  
Note, however, that this only determines what value is stored in the graph buffer; the actual color drawn to the LCD is determined by ([[84PCSE:RAM:8038|penFGColor]]).  (In other words, penFGColor determines what color is used at the time you call VPutMap or IPoint; penFGColorIndex determines what color will be used if the graph is later redisplayed or stored in a Pic variable.)
+
Note, however, that this only determines what value is stored in the graph buffer; the actual color drawn to the LCD is determined by ([[84PCSE:RAM:A038|penFGColor]]).  (In other words, penFGColor determines what color is used at the time you call VPutMap or IPoint; penFGColorIndex determines what color will be used if the graph is later redisplayed or stored in a Pic variable.)
  
 
You may find it convenient to use [[84PCSE:BCALLs:54E5|SetPenFGIndex]] to set both penFGColor and penFGColorIndex at the same time.
 
You may find it convenient to use [[84PCSE:BCALLs:54E5|SetPenFGIndex]] to set both penFGColor and penFGColorIndex at the same time.

Latest revision as of 21:45, 19 October 2013

Synopsis

Unofficial Name: penFGColorIndex

Memory Address: A03Ah

Length: 1 byte

Stores the current color index, used for small-font text display and for some drawing routines, when drawing on the graph.

Comments

This is the current color index (a number between 1 and 15, which identifies one of the 15 predefined colors.) It is used as a "foreground" color when drawing text, points, or lines on the graph.

Note, however, that this only determines what value is stored in the graph buffer; the actual color drawn to the LCD is determined by (penFGColor). (In other words, penFGColor determines what color is used at the time you call VPutMap or IPoint; penFGColorIndex determines what color will be used if the graph is later redisplayed or stored in a Pic variable.)

You may find it convenient to use SetPenFGIndex to set both penFGColor and penFGColorIndex at the same time.

The 15 predefined colors are as follows:

Index Value R G B Name
1 001F 0 0 31 Blue
2 F800 31 0 0 Red
3 0000 0 0 0 Black
4 F81F 31 0 31 Magenta
5 04E0 0 39 0 Green
6 FC64 31 35 4 Orange
7 B100 22 8 0 Brown
8 0010 0 0 16 Navy
9 049F 0 36 31 Light Blue
10 FFE0 31 63 0 Yellow
11 FFFF 31 63 31 White
12 E71C 28 56 28 Light Gray
13 C618 24 48 24 Medium Gray
14 8C51 17 34 17 Gray
15 52AA 10 21 10 Dark Gray

Using a value of 0, or greater than 15, may have strange effects.

Note also that there is no corresponding "penBGColorIndex". When drawing text on the graph, the background color index is always 11 (white) or 13 (medium gray), depending on the value of (penBGColor).