Graphics Namespace Reference
Namespaces | |
Display | |
Drawing | |
Mipi | |
Resource | |
Classes | |
class | AbstractDisplay |
struct | AddressWindow |
Manages a rectangular area of display memory with position information. More... | |
class | ArcObject |
An arc outline. More... | |
class | ArcRectList |
class | ArcRenderer |
Render arc outline with adjustable line width. More... | |
class | Asset |
An asset is used to render an Object, but is not itself drawable. More... | |
class | AssetList |
class | AssetTemplate |
class | BitmapObject |
A BMP format image. More... | |
class | Blend |
Blend operations. More... | |
class | BlendAlpha |
class | BlendMask |
class | BlendRenderer |
Perform blending with draw. More... | |
class | BlendTemplate |
class | BlendTransparent |
class | BlendWrite |
class | BlendXNor |
class | BlendXor |
class | Brush |
The source of colour for drawing. More... | |
class | Button |
Basic interactive button on screen. More... | |
class | CircleObject |
A circle outline. More... | |
class | CircleRenderer |
Draws a circle outline. More... | |
class | ColorRange |
class | Console |
class | Control |
Basic interactive button on screen. More... | |
class | CopyObject |
Describes a copy operation within the same surface. More... | |
class | CopyRenderer |
Copy an area within the same surface. More... | |
class | Device |
A physical display device. More... | |
class | DisplayList |
Stores list of low-level display commands. More... | |
class | DrawingObject |
A collection of line and curve drawing operations. More... | |
struct | Ellipse |
State information for tracing an ellipse outline. More... | |
class | EllipseObject |
An ellipse outline. More... | |
class | EllipseRenderer |
Draws an ellipse outline. More... | |
class | FileImageObject |
class | FileImageSurface |
Image surface using filing system as backing store. More... | |
class | FilledArcObject |
A filled arc. More... | |
class | FilledArcRenderer |
Render arc outline with adjustable line width. More... | |
class | FilledCircleObject |
A filled circle. More... | |
class | FilledCircleRenderer |
Draws a filled circle. More... | |
class | FilledEllipseObject |
A filled ellipse. More... | |
class | FilledEllipseRenderer |
Draws a filled ellipse. More... | |
class | FilledRectObject |
A filled rectangle. More... | |
class | FilledRectRenderer |
Draws a filled rectangle. More... | |
class | FilledRoundedRectRenderer |
Draws a filled rectangle with rounded corners. More... | |
struct | FillInfo |
Supports DisplayList blend operations. More... | |
class | Font |
Base class for a loaded font. More... | |
class | GfxLineRenderer |
Draws 1-pixel lines. More... | |
struct | GlyphMetrics |
Glyph metrics. More... | |
class | GlyphObject |
A character glyph image. More... | |
class | GradientBrush |
class | ImageBrush |
Brush using pixels from image. More... | |
class | ImageCopyRenderer |
class | ImageObject |
Virtual base class for an image. More... | |
class | ImageRenderer |
Render an image object. More... | |
class | ImageSurface |
Virtual class to access an image as a Surface. More... | |
class | ItemList |
Fixed list of types. More... | |
class | Label |
Non-interactive text label. More... | |
class | LcdFont |
class | LcdGlyph |
class | LcdTypeFace |
class | LineObject |
A drawn line. More... | |
class | LineRenderer |
Draws lines. More... | |
struct | Location |
Identifies position within bounding rectangle. More... | |
class | MemoryImageObject |
class | MemoryImageSurface |
Image surface using RAM as backing store. More... | |
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 | MultiRenderer |
Base class to render multiple objects. More... | |
class | Object |
A drawable object inherits from this virtual base class. More... | |
class | ObjectAsset |
class | ObjectTemplate |
struct | PackedColor |
Colour in device pixel format. More... | |
class | Pen |
class | PenAsset |
union | PixelBuffer |
Structure used to perform pixel format conversions. More... | |
union | PixelFormatStruct |
class | PointList |
Small list of points for drawing. More... | |
class | PointObject |
A single pixel == 1x1 rectangle. More... | |
class | PolylineObject |
A sequence of lines. More... | |
class | PolylineRenderer |
Draws series of lines defined by a PolylineObject More... | |
class | RawImageObject |
Image stored as raw pixels in a specific format. 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... | |
class | ReadStream |
struct | Rect |
Location and size of rectangular area (x, y, w, h) More... | |
class | RectList |
Small list of rectangles, similar to PointList. More... | |
class | RectObject |
A rectangular outline. More... | |
class | RectRenderer |
Draws a rectangle as a polyline. More... | |
class | ReferenceObject |
Reference to another object. More... | |
class | Region |
Represents the intersection of two rectangles. More... | |
class | Renderer |
Virtual base class to manage rendering of various types of information to a surface. More... | |
class | RenderQueue |
Top-level manager to queue objects for rendering to a specific target. More... | |
class | RenderTarget |
Interface for objects which support writing via surfaces. More... | |
class | ResourceFont |
class | ResourceTypeface |
class | RoundedRectRenderer |
Draws a rectangle outline with rounded corners. More... | |
class | Scale |
class | SceneObject |
A Scene containing 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 | Screen |
class | ScrollObject |
Describes a scrolling operation. More... | |
class | ScrollRenderer |
Scroll an area. More... | |
class | SharedBuffer |
Shared heap-allocated data buffer. More... | |
struct | Size |
Size of rectangular area (width x height) More... | |
class | SolidBrush |
class | SpiDisplay |
class | SpiDisplayList |
Display list for hardware SPI devices. More... | |
class | StreamImageObject |
Image whose contents are stored in a stream, typically in a file or flash memory. More... | |
class | SubStream |
class | Surface |
Interface for a drawing surface. More... | |
class | SurfaceObject |
Describes a target surface and corresponding source location. More... | |
class | SurfaceRenderer |
Copy an area to another surface. More... | |
class | TextAsset |
class | TextBuilder |
Simplifies construction of TextObject instances. More... | |
class | TextObject |
A block of text consisting of zero or more segments. More... | |
class | TextOptions |
class | TextParser |
Simplifies construction of TextObject instances. More... | |
class | TextRenderer |
Draw a line of text. More... | |
class | TextureBrush |
class | TimeClock |
class | Touch |
struct | TPoint |
An (x, y) display coordinate. More... | |
class | TypeFace |
Base class for a loaded typeface, e.g. Sans 16pt bold. More... | |
class | VirtualTouch |
class | WriteStream |
class | XPT2046 |
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 > |
Functions | |
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()
Get origin closest to given angle (expressed in degrees)
◆ fromString() [1/2]
◆ fromString() [2/2]
◆ getAlpha()
◆ getBlue()
◆ 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()
◆ getRed()
◆ 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]
◆ makeColor() [3/3]
|
inlineconstexpr |
Function to create a custom colour.
◆ makeWord()
◆ normaliseAngle()
◆ 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()
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()
◆ 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
LcdFont Graphics::lcdFont |
◆ PIN_NONE
|
staticconstexpr |
Undefined I/O pin value.