FabGL
ESP32 VGA Controller and Graphics Library
vgacontroller.h File Reference

This file contains fabgl::VGAControllerClass definition and the VGAController instance. More...

#include <stdint.h>
#include <stddef.h>
#include <atomic>
#include "rom/lldesc.h"
#include "driver/gpio.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "fabglconf.h"
#include "fabutils.h"
Include dependency graph for vgacontroller.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fabgl::Bitmap
 Represents an image with 64 colors image and transparency. 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::RawData
 Represents a region of raw screen buffer. More...
 
struct  fabgl::RGB
 Represents an RGB color. More...
 
struct  fabgl::Sprite
 Represents a sprite. More...
 
struct  fabgl::Timings
 Specifies the VGA timings. This is a modeline decoded. More...
 
class  fabgl::VGAControllerClass
 Represents the VGA controller. 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 {
  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::ScreenBlock { fabgl::FrontPorch, fabgl::Sync, fabgl::BackPorch, fabgl::VisibleArea }
 Represents one of the four blocks of horizontal or vertical line. More...
 

Detailed Description

This file contains fabgl::VGAControllerClass definition and the VGAController instance.

Enumeration Type Documentation

◆ Color

This enum defines named colors.

First eight full implement all available colors when 1 bit per channel mode is used (having 8 colors).

Enumerator
Black 

Equivalent to R = 0, G = 0, B = 0

Red 

Equivalent to R = 1, G = 0, B = 0

Green 

Equivalent to R = 0, G = 1, B = 0

Yellow 

Equivalent to R = 1, G = 1, B = 0

Blue 

Equivalent to R = 0, G = 0, B = 1

Magenta 

Equivalent to R = 1, G = 0, B = 1

Cyan 

Equivalent to R = 0, G = 1, B = 1

White 

Equivalent to R = 1, G = 1, B = 1

BrightBlack 

Equivalent to R = 1, G = 1, B = 1

BrightRed 

Equivalent to R = 3, G = 0, B = 0

BrightGreen 

Equivalent to R = 0, G = 3, B = 0

BrightYellow 

Equivalent to R = 3, G = 3, B = 0

BrightBlue 

Equivalent to R = 0, G = 0, B = 3

BrightMagenta 

Equivalent to R = 3, G = 0, B = 3

BrightCyan 

Equivalent to R = 0, G = 3, B = 3

BrightWhite 

Equivalent to R = 3, G = 3, B = 3

◆ CursorName

This enum defines a set of predefined mouse cursors.

Enumerator
CursorPointerAmigaLike 

11x11 Amiga like colored mouse pointer

CursorPointerSimpleReduced 

10x15 mouse pointer

CursorPointerSimple 

11x19 mouse pointer

CursorPointerShadowed 

11x19 shadowed mouse pointer

CursorPointer 

12x17 mouse pointer

CursorPen 

16x16 pen

CursorCross1 

9x9 cross

CursorCross2 

11x11 cross

CursorPoint 

5x5 point

CursorLeftArrow 

11x11 left arrow

CursorRightArrow 

11x11 right arrow

CursorDownArrow 

11x11 down arrow

CursorUpArrow 

11x11 up arrow

CursorMove 

19x19 move

CursorResize1 

12x12 resize orientation 1

CursorResize2 

12x12 resize orientation 2

CursorResize3 

11x17 resize orientation 3

CursorResize4 

17x11 resize orientation 4

CursorTextInput 

7x15 text input

Examples:
MouseOnScreen/MouseOnScreen.ino.

◆ ScreenBlock

Represents one of the four blocks of horizontal or vertical line.

Enumerator
FrontPorch 

Horizontal line sequence is: FRONTPORCH -> SYNC -> BACKPORCH -> VISIBLEAREA

Sync 

Horizontal line sequence is: SYNC -> BACKPORCH -> VISIBLEAREA -> FRONTPORCH

BackPorch 

Horizontal line sequence is: BACKPORCH -> VISIBLEAREA -> FRONTPORCH -> SYNC

VisibleArea 

Horizontal line sequence is: VISIBLEAREA -> FRONTPORCH -> SYNC -> BACKPORCH