Configuration: Colors and markers/points

Colors

For compatibility reasons, colors are sometimes defined by arrays and sometimes defined by hexadecimal numbers. The latter situation is as follows:

  • For three digits “f” is the maximum value.
    Example: ’3af’ ==> red=3, green=a, blue=f
  • At four digits, the last one is for the transparency.
    Example: ’3af5′ ==> red=3, green=a, blue=f, alpha=5
  • For six digits “ff” is the maximum value.
    Example: ’37abf6′ ==> red=37, green=ab, blue=f6
  • With eight digits, the last two ones indicate the transparency.
    Example: ’33a0ff5a’ ==> red=33, green=a0, blue=ff, alpha=5a

Marker / Points

The position of a strike, a city or a station is shown by markers. As an example, the default setting for cities is the following one:

$_BO['points']['whitered1']['point'] = array(3, 2, 'f008', 1, 'fff8');

1. Position: The type of the marker

1 = Circle
2 = Plus
3 = Square
10 = Station sign
20 = Strike sign
Text = Callback function

2. Position: Size

The size of the marker

3. Position: Main color

Is usually the fill color. When displaying strikes, the color is replaced by the one for the strikes in function of time.

4. Position: Border width

Border width in pixels

5. Position: Second color

Usually the color of the border.

Text style

Again, the default setting for cities:
$_BO['points']['whitered1']['font'] = array(7, 1, array('fff8',1,'000c'), 6, -11);

1. Position: Font size

Font size in pixels. When the values ?is ?below 6 non-TTF fonts will be shown..

2. Position: Font type

- true = bold
- 1 = “mono-style”
- other = normal

3. Position: Style

Either a color name such as ‘f7a’.

Or an array with:
1. Position = Font color
2. Position = Border-width (Pixels)
3. Position = Color of the border

4. Position: x value

The position of the text relative to the point.

5. Position: y value

The position of the text relative to the point.

Assignment of markers

There are some predefined styles: ‘whitered1′, ‘stations_dots_active’, ‘stations_dots_inactive’ …

You can assign them like the following (see details on the cities-page):
$_BO['mapimg'][x]['cities'][1] = $_BO['points']['whitered1'];

Or with strikes:
$_BO['mapimg'][x]['point_style'] = $_BO['points']['whitered1']['point'];

Or you assign your own style:
$_BO['mapimg'][x]['cities'][1]['font'] = array(7, 1, array('fff8',1,'000c'), 6, -11);
$_BO['mapimg'][x]['cities'][1]['point'] = array(3, 2, 'f008', 1, 'fff8');

On strikes, you can omit assignment of the font-style ‘font’ .