Skip to content

Spectrum Anatomy

project-owner edited this page Jan 21, 2024 · 4 revisions

Each spectrum consists of the background, frequency bands/bars and optionally the reflections and toppings. The following image shows how all these components create the final spectrum.

layers

Here is the example of the spectrum configuration section which should be defined for each spectrum in the file spectrum.txt. This file is located in the resolution specific folder. For example the file spectrum.txt in the folder medium defines spectrums for the resolution 480*320.

[s.1]
origin.x = 31
origin.y = 200
spectrum.x = 0
spectrum.y = 0
bgr.type = image.extended
bgr.color =
bgr.gradient =
bgr.filename = bgr-1.png
bar.type = image.extended
bar.color =
bar.gradient =
bar.filename = bar-1.png
bar.width = 12
bar.height = 100
bar.gap = 2
reflection.type = image.extended
reflection.color =
reflection.gradient =
reflection.filename = reflection-1.png
reflection.gap = 0
topping.height = 1
topping.step = 3
fgr.filename =
steps = 12
  • s.1 - the spectrum name. This is arbitrary user-defined string. It should be unique in this file.

The following image shows the meaning of some coordinate and dimensional properties:

dim

  • origin.x/origin.y - these coordinates define the origin of the frequency bands.
  • spectrum.x/spectrum.x - these coordinates define the top-left corner of the spectrum. They allow to embed the spectrum in a larger parent image.
  • bar.width/bar.height - define in pixels the size of the frequency band.
  • bar.gap - this property defines the gap between frequency bands.
  • reflection.gap - defines in pixels the gap between frequency bands and reflections
  • topping.height - the height of the bar topping
  • topping.step - the step of the bar topping
  • fgr.filename - foreground image filename
  • steps - the number of steps in the frequency band used to display value.

There are four background types:

  • color - the background is filled by one solid color.
  • gradient - the background is filled by the vertical gradient defined by multiple colors.
  • image.extended - the background defined by the small image which is extended by the program to occupy the whole spectrum area.
  • image - the background defined by the image which should occupy the whole spectrum area.

The following image explains all four background types.

bgr-types

  • bgr.type - the background type: color, gradient, image.extended or image.
  • bgr.color - the background color when the type is color, for example:
bgr.color = 0, 0, 100
  • bgr.gradient - the comma separated colors which define the background gradient when the type is gradient, for example:
bgr.gradient = (0, 0, 0), (50, 50, 50), (0, 0, 0)
  • bgr.filename - the filename when the type is either image or image.extended.

The frequency bar properties are explained in the following image.

bar-types

The frequency bar properties are similar to the background properties.

  • bar.type - the bar type: color, gradient, image.extended or image.
  • bar.color - the bar color when the type is color. The color can have the alpha channel, for example:
bar.color = 50, 50, 50, 128

where 128 is the value of the alpha/transparency channel.

  • bar.gradient - the comma separated colors which define the vertical bar gradient when the type is gradient. The colors can also include the alpha channel.
  • bar.filename - the filename when the type is either image or image.extended.

The reflection properties have the same meaning as the bar properties but applicable for the reflections. If reflections should not be used the property reflection.type can be left blank.

<<Previous | Next>>