FabGL
ESP32 Display Controller and Graphics Library
displaycontroller.h File Reference

This file contains fabgl::BitmappedDisplayController definition. More...

#include <stdint.h>
#include <stddef.h>
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "freertos/task.h"
#include "fabglconf.h"
#include "fabutils.h"
Include dependency graph for displaycontroller.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fabgl::BaseDisplayController
 Represents the base abstract class for all display controllers. More...
 
struct  fabgl::Bitmap
 Represents an image. More...
 
class  fabgl::BitmappedDisplayController
 Represents the base abstract class for bitmapped display controllers. More...
 
struct  fabgl::Cursor
 Defines a cursor. More...
 
struct  fabgl::Glyph
 Represents a glyph position, size and binary data. More...
 
union  fabgl::GlyphOptions
 Specifies various glyph painting options. More...
 
struct  fabgl::PaintOptions
 Specifies general paint options. More...
 
struct  fabgl::RGB222
 Represents a 6 bit RGB color. More...
 
struct  fabgl::RGB888
 Represents a 24 bit RGB color. More...
 
struct  fabgl::RGBA2222
 Represents an 8 bit ABGR color. More...
 
struct  fabgl::RGBA8888
 Represents a 32 bit RGBA color. More...
 
struct  fabgl::Sprite
 Represents a sprite. More...
 
class  fabgl::TextualDisplayController
 Represents the base abstract class for textual display controllers. More...
 

Enumerations

enum  fabgl::Color {
  fabgl::Black, fabgl::Red, fabgl::Green, fabgl::Yellow,
  fabgl::Blue, fabgl::Magenta, fabgl::Cyan, fabgl::White,
  fabgl::BrightBlack, fabgl::BrightRed, fabgl::BrightGreen, fabgl::BrightYellow,
  fabgl::BrightBlue, fabgl::BrightMagenta, fabgl::BrightCyan, fabgl::BrightWhite
}
 This enum defines named colors. More...
 
enum  fabgl::CursorName : uint8_t {
  fabgl::CursorPointerAmigaLike, fabgl::CursorPointerSimpleReduced, fabgl::CursorPointerSimple, fabgl::CursorPointerShadowed,
  fabgl::CursorPointer, fabgl::CursorPen, fabgl::CursorCross1, fabgl::CursorCross2,
  fabgl::CursorPoint, fabgl::CursorLeftArrow, fabgl::CursorRightArrow, fabgl::CursorDownArrow,
  fabgl::CursorUpArrow, fabgl::CursorMove, fabgl::CursorResize1, fabgl::CursorResize2,
  fabgl::CursorResize3, fabgl::CursorResize4, fabgl::CursorTextInput
}
 This enum defines a set of predefined mouse cursors. More...
 
enum  fabgl::DisplayControllerType { fabgl::DisplayControllerType::Textual, fabgl::DisplayControllerType::Bitmapped }
 This enum defines types of display controllers. More...
 
enum  fabgl::LineEnds : uint8_t { fabgl::LineEnds::None, fabgl::LineEnds::Circle }
 This enum defines line ends when pen width is greater than 1. More...
 
enum  fabgl::NativePixelFormat : uint8_t { fabgl::NativePixelFormat::Mono, fabgl::NativePixelFormat::SBGR2222, fabgl::NativePixelFormat::RGB565BE, fabgl::NativePixelFormat::PALETTE16 }
 This enum defines the display controller native pixel format. More...
 
enum  fabgl::PixelFormat : uint8_t {
  fabgl::PixelFormat::Undefined, fabgl::PixelFormat::Native, fabgl::PixelFormat::Mask, fabgl::PixelFormat::RGBA2222,
  fabgl::PixelFormat::RGBA8888
}
 This enum defines a pixel format. More...
 

Functions

GlyphOptions & Blank (uint8_t value)
 Helper method to set or reset foreground and background swapping. More...
 
GlyphOptions & Bold (bool value)
 Helper method to set or reset bold. More...
 
GlyphOptions & DoubleWidth (uint8_t value)
 Helper method to set or reset doubleWidth. More...
 
GlyphOptions & FillBackground (bool value)
 Helper method to set or reset fillBackground. More...
 
GlyphOptions & Invert (uint8_t value)
 Helper method to set or reset foreground and background swapping. More...
 
GlyphOptions & Italic (bool value)
 Helper method to set or reset italic. More...
 
GlyphOptions & Underline (bool value)
 Helper method to set or reset underlined. More...
 

Variables

uint8_t B
 
uint8_t const * data
 
uint8_t G
 
uint8_t height
 
uint8_t NOT
 
uint8_t R
 
uint8_t swapFGBG
 
uint8_t width
 
int16_t X
 
int16_t Y
 

Detailed Description

This file contains fabgl::BitmappedDisplayController definition.

Function Documentation

◆ Blank()

GlyphOptions& __attribute__::Blank ( uint8_t  value)

Helper method to set or reset foreground and background swapping.

◆ Bold()

GlyphOptions& __attribute__::Bold ( bool  value)

Helper method to set or reset bold.

Examples:
SSD1306_OLED/128x64/RTClock/RTClock.ino.

◆ DoubleWidth()

GlyphOptions& __attribute__::DoubleWidth ( uint8_t  value)

Helper method to set or reset doubleWidth.

Examples:
VGA/ModelineStudio/ModelineStudio.ino, and VGA/SpaceInvaders/SpaceInvaders.ino.

◆ FillBackground()

GlyphOptions& __attribute__::FillBackground ( bool  value)

◆ Invert()

GlyphOptions& __attribute__::Invert ( uint8_t  value)

Helper method to set or reset foreground and background swapping.

◆ Italic()

GlyphOptions& __attribute__::Italic ( bool  value)

Helper method to set or reset italic.

◆ Underline()

GlyphOptions& __attribute__::Underline ( bool  value)

Helper method to set or reset underlined.

Variable Documentation

◆ B

uint8_t B

The Blue channel

◆ blank

uint16_t blank

If enabled the glyph is filled with the background color. To implement characters invisible or blink.

◆ bold

uint16_t bold

If enabled produces a bold-like style.

◆ data

uint8_t const* data

Byte aligned binary data of the glyph. A 0 represents background or a transparent pixel. A 1 represents foreground.

Examples:
VGA/MultitaskingCPM/MultitaskingCPM.ino, and VGA/VIC20/VIC20.ino.

◆ doubleWidth

uint16_t doubleWidth

If enabled the glyph is doubled. To implement characters double width. 0 = normal, 1 = double width, 2 = double width - double height top, 3 = double width - double height bottom.

◆ fillBackground

uint16_t fillBackground

If enabled glyph background is filled with current background color.

◆ G

uint8_t G

The Green channel

◆ height

uint8_t height

Glyph vertical size

Examples:
VGA/Audio/Audio.ino.

◆ invert

uint16_t invert

If enabled swaps foreground and background colors. To implement characters inverse (XORed with PaintOptions.swapFGBG)

◆ italic

uint16_t italic

If enabled skews the glyph on the right. To implement characters italic.

◆ NOT

uint8_t NOT

If enabled performs NOT logical operator on destination. Implemented only for straight lines and non-filled rectangles.

◆ R

uint8_t R

The Red channel

◆ reduceLuminosity

uint16_t reduceLuminosity

If enabled reduces luminosity. To implement characters faint.

◆ swapFGBG

uint8_t swapFGBG

If enabled swaps foreground and background colors

◆ underline

uint16_t underline

If enabled the glyph is underlined. To implement characters underline.

◆ userOpt1

uint16_t userOpt1

User defined option

◆ userOpt2

uint16_t userOpt2

User defined option

◆ width

uint8_t width

Glyph horizontal size

◆ X

int16_t X

Horizontal glyph coordinate

◆ Y

int16_t Y

Vertical glyph coordinate