Graphics Namespace Reference
Namespaces | |
| Display | |
| Drawing | |
| Mipi | |
| Resource | |
Classes | |
| class | VirtualTouch |
| class | AbstractDisplay |
| struct | AddressWindow |
| Manages a rectangular area of display memory with position information. More... | |
| class | Asset |
| An asset is used to render an Object, but is not itself drawable. More... | |
| class | AssetTemplate |
| class | SolidBrush |
| class | TextureBrush |
| class | GradientBrush |
| class | ImageBrush |
| Brush using pixels from image. More... | |
| class | Brush |
| The source of colour for drawing. More... | |
| class | Pen |
| class | PenAsset |
| class | TextOptions |
| class | TypeFace |
| Base class for a loaded typeface, e.g. Sans 16pt bold. More... | |
| class | Font |
| Base class for a loaded font. More... | |
| class | ResourceTypeface |
| class | ResourceFont |
| class | TextAsset |
| class | ObjectAsset |
| class | AssetList |
| class | Blend |
| Blend operations. More... | |
| class | BlendTemplate |
| class | BlendWrite |
| class | BlendXor |
| class | BlendXNor |
| class | BlendMask |
| class | BlendTransparent |
| class | BlendAlpha |
| class | SharedBuffer |
| Shared heap-allocated data buffer. More... | |
| struct | ReadBuffer |
| Buffer used for reading pixel data from device. More... | |
| struct | ReadStatus |
| Stores result of read operation. More... | |
| struct | ReadStatusBuffer |
| Composite ReadBuffer with status. More... | |
| union | PixelFormatStruct |
| struct | PackedColor |
| Colour in device pixel format. More... | |
| union | PixelBuffer |
| Structure used to perform pixel format conversions. More... | |
| class | Console |
| class | Button |
| Basic interactive button on screen. More... | |
| class | Control |
| Basic interactive button on screen. More... | |
| class | Label |
| Non-interactive text label. More... | |
| class | Screen |
| class | TimeClock |
| class | Device |
| A physical display device. More... | |
| struct | FillInfo |
| Supports DisplayList blend operations. More... | |
| class | DisplayList |
| Stores list of low-level display commands. More... | |
| class | ImageSurface |
| Virtual class to access an image as a Surface. More... | |
| class | MemoryImageSurface |
| Image surface using RAM as backing store. More... | |
| class | FileImageSurface |
| Image surface using filing system as backing store. More... | |
| class | LcdGlyph |
| class | LcdTypeFace |
| class | LcdFont |
| class | Meta |
| Empty base class to support object enumeration Non-virtual to avoid bloat. More... | |
| class | MetaWriter |
| Writes object content in readable format for debugging. More... | |
| class | MipiDisplay |
| class | MipiSurface |
| class | Renderer |
| Virtual base class to manage rendering of various types of information to a surface. More... | |
| class | Object |
| A drawable object inherits from this virtual base class. More... | |
| class | ObjectTemplate |
| class | ReferenceObject |
| Reference to another object. More... | |
| class | PointObject |
| A single pixel == 1x1 rectangle. More... | |
| class | RectObject |
| A rectangular outline. More... | |
| class | FilledRectObject |
| A filled rectangle. More... | |
| class | LineObject |
| A drawn line. More... | |
| class | PolylineObject |
| A sequence of lines. More... | |
| class | CircleObject |
| A circle outline. More... | |
| class | FilledCircleObject |
| A filled circle. More... | |
| class | EllipseObject |
| An ellipse outline. More... | |
| class | FilledEllipseObject |
| A filled ellipse. More... | |
| class | ArcObject |
| An arc outline. More... | |
| class | FilledArcObject |
| A filled arc. More... | |
| class | ImageObject |
| Virtual base class for an image. More... | |
| class | StreamImageObject |
| Image whose contents are stored in a stream, typically in a file or flash memory. More... | |
| class | BitmapObject |
| A BMP format image. More... | |
| class | RawImageObject |
| Image stored as raw pixels in a specific format. More... | |
| class | RenderTarget |
| Interface for objects which support writing via surfaces. More... | |
| class | MemoryImageObject |
| class | FileImageObject |
| class | GlyphObject |
| A character glyph image. More... | |
| class | TextObject |
| A block of text consisting of zero or more segments. More... | |
| class | SurfaceObject |
| Describes a target surface and corresponding source location. More... | |
| class | CopyObject |
| Describes a copy operation within the same surface. More... | |
| class | ScrollObject |
| Describes a scrolling operation. More... | |
| class | DrawingObject |
| A collection of line and curve drawing operations. More... | |
| class | ItemList |
| Fixed list of types. More... | |
| class | PointList |
| Small list of points for drawing. More... | |
| class | RectList |
| Small list of rectangles, similar to PointList. More... | |
| class | MultiRenderer |
| Base class to render multiple objects. More... | |
| class | SceneRenderer |
| A scene is a list of other objects, so we just iterate through the list and draw each in turn. More... | |
| class | GfxLineRenderer |
| Draws 1-pixel lines. More... | |
| class | LineRenderer |
| Draws lines. More... | |
| class | PolylineRenderer |
Draws series of lines defined by a PolylineObject More... | |
| class | RectRenderer |
| Draws a rectangle as a polyline. More... | |
| class | FilledRectRenderer |
| Draws a filled rectangle. More... | |
| class | RoundedRectRenderer |
| Draws a rectangle outline with rounded corners. More... | |
| class | FilledRoundedRectRenderer |
| Draws a filled rectangle with rounded corners. More... | |
| class | CircleRenderer |
| Draws a circle outline. More... | |
| class | FilledCircleRenderer |
| Draws a filled circle. More... | |
| struct | Ellipse |
| State information for tracing an ellipse outline. More... | |
| class | ArcRectList |
| class | EllipseRenderer |
| Draws an ellipse outline. More... | |
| class | FilledEllipseRenderer |
| Draws a filled ellipse. More... | |
| class | ArcRenderer |
| Render arc outline with adjustable line width. More... | |
| class | FilledArcRenderer |
| Render arc outline with adjustable line width. More... | |
| class | ImageRenderer |
| Render an image object. More... | |
| class | SurfaceRenderer |
| Copy an area to another surface. More... | |
| class | CopyRenderer |
| Copy an area within the same surface. More... | |
| class | ImageCopyRenderer |
| class | ScrollRenderer |
| Scroll an area. More... | |
| class | BlendRenderer |
| Perform blending with draw. More... | |
| class | TextRenderer |
| Draw a line of text. More... | |
| class | RenderQueue |
| Top-level manager to queue objects for rendering to a specific target. More... | |
| class | SceneObject |
| A Scene containing multiple objects. More... | |
| class | SpiDisplay |
| class | SpiDisplayList |
| Display list for hardware SPI devices. More... | |
| class | WriteStream |
| class | ReadStream |
| class | SubStream |
| class | Surface |
| Interface for a drawing surface. More... | |
| class | TextParser |
| Simplifies construction of TextObject instances. More... | |
| class | TextBuilder |
| Simplifies construction of TextObject instances. More... | |
| class | XPT2046 |
| class | Touch |
| struct | Size |
| Size of rectangular area (width x height) More... | |
| struct | TPoint |
| An (x, y) display coordinate. More... | |
| struct | Rect |
| Location and size of rectangular area (x, y, w, h) More... | |
| class | Region |
| Represents the intersection of two rectangles. More... | |
| struct | Location |
| Identifies position within bounding rectangle. More... | |
| class | ColorRange |
| class | Scale |
| struct | GlyphMetrics |
| Glyph metrics. More... | |
Typedefs | |
| using | AssetType = Asset::Type |
| using | GlyphOptions = TextOptions |
| using | BlendMode = Blend::Mode |
| using | DrawingTarget = Drawing::Target |
| using | CustomObject = ObjectTemplate< Object::Kind::Custom > |
| Base class for a custom object. More... | |
| using | AssetID = uint16_t |
| Numeric identifiers for re-useable objects. More... | |
| using | Point = TPoint< int16_t > |
| using | IntPoint = TPoint< int > |
| using | PointF = TPoint< float > |
| using | Range = TRange< uint16_t > |
| using | FontStyles = BitSet< uint16_t, FontStyle, 10 > |
Enumerations | |
| enum class | BrushStyle { FullScreen , SourceLocal } |
| enum class | Color : uint32_t { None = 0 , XX , XX } |
| Standard colour definitions. More... | |
| enum | ColorOrder { orderRGB , orderBGR } |
| Order refers to colour order within bitstream. More... | |
| enum class | PixelFormat : uint8_t { None , XX } |
| enum class | InputEvent { move , down , up } |
| enum class | ControlEvent { activate , deactivate } |
| enum class | Orientation { normal , deg0 = normal , deg90 , deg180 , deg270 } |
| Defines orientation of display. More... | |
| enum class | Align { Near , Centre , Far , Left = Near , Top = Near , Center = Centre , Right = Far , Bottom = Far } |
| enum class | Origin { E , NE , N , NW , W , SW , S , SE , Centre , TopLeft = NW , Top = N , TopRight = NE , Left = W , Center = Centre , Right = E , BottomLeft = SW , Bottom = S , BottomRight = SE } |
| Points on a compass. More... | |
| enum class | FontStyle { XX } |
Functions | |
| GRAPHICS_VERIFY_SIZE (Brush, 8) | |
| GRAPHICS_VERIFY_SIZE (Pen, 8) | |
| constexpr uint32_t | getColorValue (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| Obtain 24-bit colour value from red, green and blue components. More... | |
| constexpr Color | makeColor (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| Function to create a custom colour. More... | |
| constexpr Color | makeColor (uint32_t color, uint8_t alpha=255) |
| constexpr Color | makeColor (Color color, uint8_t alpha) |
| constexpr uint8_t | getAlpha (Color color) |
| constexpr uint8_t | getRed (Color color) |
| constexpr uint8_t | getGreen (Color color) |
| constexpr uint8_t | getBlue (Color color) |
| bool | fromString (const char *s, Color &color) |
| bool | fromString (const String &s, Color &color) |
| uint8_t | getBytesPerPixel (PixelFormat format) |
| Get number of bytes required to store a pixel in the given format. More... | |
| PixelBuffer | pack (PixelBuffer src, PixelFormat format) |
| Convert RGB colour into packed format. More... | |
| PackedColor | pack (Color color, PixelFormat format) |
| PixelBuffer | unpack (PixelBuffer src, PixelFormat format) |
| Convert packed colour into RGB. More... | |
| Color | unpack (PackedColor packed, PixelFormat format) |
| Color | unpack (uint32_t packed, PixelFormat format) |
| size_t | writeColor (void *buffer, PackedColor color, PixelFormat format) |
| Store a packed colour value into memory. More... | |
| size_t | writeColor (void *buffer, Color color, PixelFormat format) |
| size_t | writeColor (void *buffer, PackedColor color, PixelFormat format, size_t count) |
| Store a block of packed colours into memory. More... | |
| size_t | writeColor (void *buffer, Color color, PixelFormat format, size_t count) |
| size_t | convert (const void *srcData, PixelFormat srcFormat, void *dstBuffer, PixelFormat dstFormat, size_t numPixels) |
| Convert block of data from one pixel format to another. More... | |
| void | highlightText (SceneObject &scene) |
| Highlight text segments and print details. More... | |
| void | highlightText (TextObject &object) |
| uint16_t | swapBytes (uint16_t w) |
| uint32_t | makeWord (uint16_t w1, uint16_t w2) |
| Origin | opposite (Origin o) |
| Get the origin for the opposite side of the rectangle. More... | |
| constexpr Size | rotate (Size size, Orientation orientation) |
| template<typename T , typename Q > | |
| constexpr TPoint< T > | operator+ (TPoint< T > pt, const Q &other) |
| template<typename T , typename Q > | |
| constexpr TPoint< T > | operator- (TPoint< T > pt, const Q &other) |
| template<typename T , typename Q > | |
| constexpr TPoint< T > | operator* (TPoint< T > pt, const Q &other) |
| template<typename T > | |
| constexpr TPoint< T > | operator* (TPoint< T > pt, const Size &other) |
| template<typename T , typename Q > | |
| constexpr TPoint< T > | operator/ (TPoint< T > pt, const Q &other) |
| template<typename T > | |
| constexpr TPoint< T > | operator/ (TPoint< T > pt, const Size &other) |
| template<typename T , typename Q > | |
| constexpr TPoint< T > | operator% (TPoint< T > pt, const Q &other) |
| template<typename T > | |
| Rect | operator+ (const Rect &rect, const T &other) |
| Rect | operator- (const Rect &rect, const Point &offset) |
| Rect | intersect (Rect r1, const Rect &r2) |
| Region | operator- (const Region &rgn, const Rect &r) |
| uint16_t | originToDegrees (Origin origin) |
| Get corresponding angle for given origin. More... | |
| Origin | degreesToOrigin (uint16_t angle) |
| Get origin closest to given angle (expressed in degrees) More... | |
| uint16_t | normaliseAngle (int angle) |
| Make 0 <= angle < 360. More... | |
Variables | |
| LcdFont | lcdFont |
| static constexpr uint8_t | PIN_NONE {255} |
| Undefined I/O pin value. More... | |
Typedef Documentation
◆ AssetID
| using Graphics::AssetID = typedef uint16_t |
Numeric identifiers for re-useable objects.
◆ AssetType
| using Graphics::AssetType = typedef Asset::Type |
◆ BlendMode
| using Graphics::BlendMode = typedef Blend::Mode |
◆ CustomObject
| using Graphics::CustomObject = typedef ObjectTemplate<Object::Kind::Custom> |
Base class for a custom object.
◆ DrawingTarget
| using Graphics::DrawingTarget = typedef Drawing::Target |
◆ FontStyles
| using Graphics::FontStyles = typedef BitSet<uint16_t, FontStyle, 10> |
◆ GlyphOptions
| using Graphics::GlyphOptions = typedef TextOptions |
◆ IntPoint
| using Graphics::IntPoint = typedef TPoint<int> |
◆ Point
| using Graphics::Point = typedef TPoint<int16_t> |
◆ PointF
| using Graphics::PointF = typedef TPoint<float> |
◆ Range
| using Graphics::Range = typedef TRange<uint16_t> |
Enumeration Type Documentation
◆ Align
|
strong |
◆ BrushStyle
|
strong |
◆ Color
|
strong |
◆ ColorOrder
| enum Graphics::ColorOrder |
◆ ControlEvent
|
strong |
◆ FontStyle
|
strong |
◆ InputEvent
|
strong |
◆ Orientation
|
strong |
◆ Origin
|
strong |
◆ PixelFormat
|
strong |
Function Documentation
◆ convert()
| size_t Graphics::convert | ( | const void * | srcData, |
| PixelFormat | srcFormat, | ||
| void * | dstBuffer, | ||
| PixelFormat | dstFormat, | ||
| size_t | numPixels | ||
| ) |
Convert block of data from one pixel format to another.
◆ degreesToOrigin()
| Origin Graphics::degreesToOrigin | ( | uint16_t | angle | ) |
Get origin closest to given angle (expressed in degrees)
◆ fromString() [1/2]
| bool Graphics::fromString | ( | const char * | s, |
| Color & | color | ||
| ) |
◆ fromString() [2/2]
◆ getAlpha()
|
inlineconstexpr |
◆ getBlue()
|
inlineconstexpr |
◆ getBytesPerPixel()
|
inline |
Get number of bytes required to store a pixel in the given format.
◆ getColorValue()
|
inlineconstexpr |
Obtain 24-bit colour value from red, green and blue components.
◆ getGreen()
|
inlineconstexpr |
◆ getRed()
|
inlineconstexpr |
◆ GRAPHICS_VERIFY_SIZE() [1/2]
| Graphics::GRAPHICS_VERIFY_SIZE | ( | Brush | , |
| 8 | |||
| ) |
◆ GRAPHICS_VERIFY_SIZE() [2/2]
| Graphics::GRAPHICS_VERIFY_SIZE | ( | Pen | , |
| 8 | |||
| ) |
◆ highlightText() [1/2]
| void Graphics::highlightText | ( | SceneObject & | scene | ) |
Highlight text segments and print details.
◆ highlightText() [2/2]
| void Graphics::highlightText | ( | TextObject & | object | ) |
◆ intersect()
◆ makeColor() [1/3]
◆ makeColor() [2/3]
|
inlineconstexpr |
◆ makeColor() [3/3]
|
inlineconstexpr |
Function to create a custom colour.
◆ makeWord()
| uint32_t Graphics::makeWord | ( | uint16_t | w1, |
| uint16_t | w2 | ||
| ) |
◆ normaliseAngle()
| uint16_t Graphics::normaliseAngle | ( | int | angle | ) |
Make 0 <= angle < 360.
◆ operator%()
template<typename T , typename Q >
|
constexpr |
◆ operator*() [1/2]
template<typename T , typename Q >
|
constexpr |
◆ operator*() [2/2]
template<typename T >
|
constexpr |
◆ operator+() [1/2]
◆ operator+() [2/2]
template<typename T , typename Q >
|
constexpr |
◆ operator-() [1/3]
◆ operator-() [2/3]
◆ operator-() [3/3]
template<typename T , typename Q >
|
constexpr |
◆ operator/() [1/2]
template<typename T , typename Q >
|
constexpr |
◆ operator/() [2/2]
template<typename T >
|
constexpr |
◆ opposite()
Get the origin for the opposite side of the rectangle.
e.g. E -> W, NE -> SW
◆ originToDegrees()
|
inline |
Get corresponding angle for given origin.
◆ pack() [1/2]
|
inline |
◆ pack() [2/2]
| PixelBuffer Graphics::pack | ( | PixelBuffer | src, |
| PixelFormat | format | ||
| ) |
Convert RGB colour into packed format.
- Parameters
-
color The RGB colour to convert format The desired pixel format
- Return values
-
PackedColor
◆ rotate()
|
inlineconstexpr |
◆ swapBytes()
| uint16_t Graphics::swapBytes | ( | uint16_t | w | ) |
◆ unpack() [1/3]
|
inline |
◆ unpack() [2/3]
| PixelBuffer Graphics::unpack | ( | PixelBuffer | src, |
| PixelFormat | format | ||
| ) |
Convert packed colour into RGB.
- Parameters
-
src PixelBuffer loaded with packed colour format The exact format of the source colour
- Return values
-
Color The corresponding RGB colour
◆ unpack() [3/3]
|
inline |
◆ writeColor() [1/4]
|
inline |
◆ writeColor() [2/4]
|
inline |
◆ writeColor() [3/4]
| size_t Graphics::writeColor | ( | void * | buffer, |
| PackedColor | color, | ||
| PixelFormat | format | ||
| ) |
Store a packed colour value into memory.
- Parameters
-
buffer Where to write the colour value color The value to write
- Return values
-
size_t The number of bytes written
◆ writeColor() [4/4]
| size_t Graphics::writeColor | ( | void * | buffer, |
| PackedColor | color, | ||
| PixelFormat | format, | ||
| size_t | count | ||
| ) |
Store a block of packed colours into memory.
- Parameters
-
buffer Where to write the colour value color The value to write count The number of times to repeat the colour
- Return values
-
size_t The number of bytes written
Variable Documentation
◆ lcdFont
|
extern |
◆ PIN_NONE
|
staticconstexpr |
Undefined I/O pin value.
1.9.1