25 08, 2023

What colours are available for use with the graphics functions?

2023-08-25T18:16:37+10:00Categories: , |

An assortment of colours is available that range from 0x0000 to 0xFFFF. A full listing of named colours can be found in the 4DGL_16bitColours.fnc file, which is located in the installation directory of Workshop4. This file can be added to any project by simply inheriting the file:

#inherit "4DGL_16bitColours.fnc"

Right-click on the file and click ‘Open file at Cursor’ to open the inherited file in a new tab and view the list of predefined colours.

25 08, 2023

What are the GCI and DAT files?

2023-08-25T18:07:27+10:00Categories: , |

These files are the graphical resources compiled by Workshop4 based on the project. These contain the raw graphics and starting offsets required by the display modules’ PmmC to render the designed graphics. These files are required to be copied to the microSD card at least once by agreeing to the IDE to perform the copy.

25 08, 2023

What is the format of a GCI file?

2023-08-25T18:04:28+10:00Categories: , |

An Image (single frame widget) is formatted as:

  • a 6-byte header as 3-words:
    • word1 – Width: horizontal size of the image
    • word2 – Height: vertical size of the image
    • word3:
      • byte5 – colour_mode: 16dec = 65K colour mode / 16-bit colours / 2 bytes per pixel
      • byte6 – zero
  • raw pixel data as drawn from left to right and going down:
    • Pixel11 to Pixel1W
    • Pixel21 to Pixel2W
    • PixelH1 to PixelHW

A Video (multi-frame widget) is formatted as:

  • a 8-byte header as 4-words:
    • word1 – Width: horizontal size of the image
    • word2 – Height: vertical size of the image
    • word3:
      • byte5 – colour_mode: 16dec = 65K colour mode / 16-bit colours / 2 bytes per pixel
      • byte6 – frame delay (non-zero)
    • word4Frames: number of frames
  • raw pixel data as drawn from left to right, going down from first to last frame:
    • Pixel111 to Pixel11W
    • Pixel121 to Pixel12W
    • Pixel1H1 to Pixel1HW
    • Pixel211 to Pixel21W
    • Pixel221 to Pixel22W
    • Pixel2H1 to Pixel2HW
    • PixelF11 to PixelF1W
    • PixelF21 to PixelF2W
    • PixelFH1 to PixelFHW
Go to Top