Skip to main content
Version: 4.16

LCD16bpp

This class contains the various low-level drawing routines for drawing bitmaps, texts and rectangles on 16 bits per pixel displays.

See: LCD

Note: All coordinates are expected to be in absolute coordinates!

Inherits from: LCD

Public Functions#

virtual uint8_tbitDepth() const
Number of bits per pixel used by the display.
virtual voidblitCopy(const uint16_t * sourceData, const Rect & source, const Rect & blitRect, uint8_t alpha, bool hasTransparentPixels)
Blits (directly copies) a block of data to the framebuffer, performing alpha blending (and tranparency keying) as specified.
virtual voidblitCopy(const uint8_t * sourceData, Bitmap::BitmapFormat sourceFormat, const Rect & source, const Rect & blitRect, uint8_t alpha, bool hasTransparentPixels)
Blits (directly copies) a block of data to the framebuffer, performing alpha blending (and tranparency keying) as specified.
virtual uint16_t *copyFrameBufferRegionToMemory(const Rect & visRegion, const Rect & absRegion, const BitmapId bitmapId)
Copies part of the framebuffer to the data section of a bitmap.
virtual voiddrawPartialBitmap(const Bitmap & bitmap, int16_t x, int16_t y, const Rect & rect, uint8_t alpha =255, bool useOptimized =true)
Draws all (or a part) of a bitmap.
voidenableTextureMapperA4()
Enables the texture mappers for A4 image format.
voidenableTextureMapperA4_BilinearInterpolation()
Enables the texture mappers for A4 image format.
voidenableTextureMapperA4_NearestNeighbor()
Enables the texture mappers for A4 image format.
voidenableTextureMapperAll()
Enables the texture mappers for all image formats.
voidenableTextureMapperARGB8888()
Enables the texture mappers for ARGB8888 image format.
voidenableTextureMapperARGB8888_BilinearInterpolation()
Enables the texture mappers for ARGB8888 image format.
voidenableTextureMapperARGB8888_NearestNeighbor()
Enables the texture mappers for ARGB8888 image format.
voidenableTextureMapperL8_ARGB8888()
Enables the texture mappers for L8_ARGB8888 image format.
voidenableTextureMapperL8_ARGB8888_BilinearInterpolation()
Enables the texture mappers for L8_ARGB8888 image format.
voidenableTextureMapperL8_ARGB8888_NearestNeighbor()
Enables the texture mappers for L8_ARGB8888 image format.
voidenableTextureMapperL8_RGB565()
Enables the texture mappers for L8_RGB565 image format.
voidenableTextureMapperL8_RGB565_BilinearInterpolation()
Enables the texture mappers for L8_RGB565 image format.
voidenableTextureMapperL8_RGB565_NearestNeighbor()
Enables the texture mappers for L8_RGB565 image format.
voidenableTextureMapperL8_RGB888()
Enables the texture mappers for L8_RGB888 image format.
voidenableTextureMapperL8_RGB888_BilinearInterpolation()
Enables the texture mappers for L8_RGB888 image format.
voidenableTextureMapperL8_RGB888_NearestNeighbor()
Enables the texture mappers for L8_RGB888 image format.
voidenableTextureMapperRGB565()
Enables the texture mappers for RGB565 image format.
voidenableTextureMapperRGB565_NonOpaque_BilinearInterpolation()
Enables the texture mappers for NonOpaque RGB565 image format.
voidenableTextureMapperRGB565_NonOpaque_NearestNeighbor()
Enables the texture mappers for NonOpaque RGB565 image format.
voidenableTextureMapperRGB565_Opaque_BilinearInterpolation()
Enables the texture mappers for Opaque RGB565 image format.
voidenableTextureMapperRGB565_Opaque_NearestNeighbor()
Enables the texture mappers for Opaque RGB565 image format.
virtual voidfillRect(const Rect & rect, colortype color, uint8_t alpha =255)
Draws a filled rectangle in the framebuffer in the specified color and opacity.
virtual Bitmap::BitmapFormatframebufferFormat() const
Framebuffer format used by the display.
virtual uint16_tframebufferStride() const
Framebuffer stride in bytes.
virtual uint8_tgetBlueColor(colortype color) const
Gets the blue color part of a color.
virtual colortypegetColorFrom24BitRGB(uint8_t red, uint8_t green, uint8_t blue) const
Generates a color representation to be used on the LCD, based on 24 bit RGB values.
virtual uint8_tgetGreenColor(colortype color) const
Gets the green color part of a color.
virtual uint8_tgetRedColor(colortype color) const
Gets the red color part of a color.
LCD16bpp()
FORCE_INLINE_FUNCTION uint8_tgetBlueFromColor(colortype color)
Gets blue from color.
FORCE_INLINE_FUNCTION colortypegetColorFromRGB(uint8_t red, uint8_t green, uint8_t blue)
Generates a color representation to be used on the LCD, based on 24 bit RGB values.
FORCE_INLINE_FUNCTION uint16_tgetFramebufferStride()
Framebuffer stride in bytes.
FORCE_INLINE_FUNCTION uint8_tgetGreenFromColor(colortype color)
Gets green from color.
FORCE_INLINE_FUNCTION uint8_tgetRedFromColor(colortype color)
Gets red from color.

Protected Functions#

virtual voiddrawGlyph(uint16_t wbuf16, Rect widgetArea, int16_t x, int16_t y, uint16_t offsetX, uint16_t offsetY, const Rect & invalidatedArea, const GlyphNode glyph, const uint8_t * glyphData, uint8_t byteAlignRow, colortype color, uint8_t bitsPerPixel, uint8_t alpha, TextRotation rotation)
Private version of draw-glyph with explicit destination buffer pointer argument.
virtual DrawTextureMapScanLineBase *getTextureMapperDrawScanLine(const TextureSurface & texture, RenderingVariant renderVariant, uint8_t alpha)
Gets pointer to object that can draw a scan line which allows for highly specialized and optimized implementation.
voidblitCopyAlphaPerPixel(const uint16_t sourceData, const uint8_t alphaData, const Rect & source, const Rect & blitRect, uint8_t alpha)
Blits a 2D source-array to the framebuffer performing alpha-blending per pixel as specified.
voidblitCopyARGB8888(const uint32_t * sourceData, const Rect & source, const Rect & blitRect, uint8_t alpha)
Blits a 2D source-array to the framebuffer performing alpha-blending per pixel as specified.
voidblitCopyL8(const uint8_t sourceData, const uint8_t clutData, const Rect & source, const Rect & blitRect, uint8_t alpha)
Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if indexed format is not supported by the DMA a software blend is performed.
voidblitCopyL8_ARGB8888(const uint8_t sourceData, const uint8_t clutData, const Rect & source, const Rect & blitRect, uint8_t alpha)
Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if L8_ARGB8888 is not supported by the DMA a software blend is performed.
voidblitCopyL8_RGB565(const uint8_t sourceData, const uint8_t clutData, const Rect & source, const Rect & blitRect, uint8_t alpha)
Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if L8_RGB565 is not supported by the DMA a software blend is performed.
voidblitCopyL8_RGB888(const uint8_t sourceData, const uint8_t clutData, const Rect & source, const Rect & blitRect, uint8_t alpha)
Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if L8_RGB888 is not supported by the DMA a software blend is performed.
intnextLine(bool rotatedDisplay, TextRotation textRotation)
Find out how much to advance in the display buffer to get to the next line.
intnextPixel(bool rotatedDisplay, TextRotation textRotation)
Find out how much to advance in the display buffer to get to the next pixel.

Additional inherited members#

Public Classes inherited from LCD#

structStringVisuals
The visual elements when writing a string.

Protected Classes inherited from LCD#

classDrawTextureMapScanLineBase
Base class for drawing scanline by the texture mapper.

Public Functions inherited from LCD#

voiddrawString(Rect widgetArea, const Rect & invalidatedArea, const StringVisuals & stringVisuals, const Unicode::UnicodeChar * format, ... )
Draws the specified Unicode string.
virtual voiddrawTextureMapQuad(const DrawingSurface & dest, const Point3D * vertices, const TextureSurface & texture, const Rect & absoluteRect, const Rect & dirtyAreaAbsolute, RenderingVariant renderVariant, uint8_t alpha =255, uint16_t subDivisionSize =12)
Texture map quad.
virtual voiddrawTextureMapTriangle(const DrawingSurface & dest, const Point3D * vertices, const TextureSurface & texture, const Rect & absoluteRect, const Rect & dirtyAreaAbsolute, RenderingVariant renderVariant, uint8_t alpha =255, uint16_t subDivisionSize =12)
Texture map triangle.
colortypegetDefaultColor() const
Gets default color previously set using setDefaultColor.
voidsetDefaultColor(colortype color)
Sets default color as used by alpha level only bitmap formats, e.g.
virtual ~LCD()
Finalizes an instance of the LCD class.
FORCE_INLINE_FUNCTION uint8_tdiv255(uint16_t num)
Approximates an integer division of a 16bit value by 255.
FORCE_INLINE_FUNCTION uint32_tdiv255g(uint32_t pixelxAlpha)
Divides the green component of pixelxAlpha by 255.
FORCE_INLINE_FUNCTION uint32_tdiv255rb(uint32_t pixelxAlpha)
Divides the red and blue components of pixelxAlpha by 255.

Protected Functions inherited from LCD#

voiddrawStringLTR(const Rect & widgetArea, const Rect & invalidatedArea, const StringVisuals & visuals, const Unicode::UnicodeChar * format, va_list pArg)
Draws the specified Unicode string.
voiddrawStringRTL(const Rect & widgetArea, const Rect & invalidatedArea, const StringVisuals & visuals, const Unicode::UnicodeChar * format, va_list pArg)
Draws the specified Unicode string.
virtual voiddrawTextureMapScanLine(const DrawingSurface & dest, const Gradients & gradients, const Edge leftEdge, const Edge rightEdge, const TextureSurface & texture, const Rect & absoluteRect, const Rect & dirtyAreaAbsolute, RenderingVariant renderVariant, uint8_t alpha, uint16_t subDivisionSize)
Draw scan line.
FORCE_INLINE_FUNCTION uint8_tgetAlphaFromA4(const uint16_t * data, uint32_t offset)
Gets alpha from A4 image at given offset.
uint16_tgetNumLines(TextProvider & textProvider, WideTextAction wideTextAction, TextDirection textDirection, const Font * font, int16_t width)
Gets number of lines for a given text taking word wrap into consideration.
intrealX(const Rect & widgetArea, int16_t x, int16_t y, TextRotation rotation)
Find the real, absolute x coordinate of a point inside a widget with regards to rotation.
intrealY(const Rect & widgetArea, int16_t x, int16_t y, TextRotation rotation)
Find the real, absolute y coordinate of a point inside a widget with regards to rotation.
voidrotateRect(Rect & rect, const Rect & canvas, const TextRotation rotation)
Rotate a rectangle inside another rectangle.
uint16_tstringWidth(TextProvider & textProvider, const Font & font, const int numChars, TextDirection textDirection)
Find string width of the given number of ligatures read from the given TextProvider.

Protected Attributes inherited from LCD#

colortypedefaultColor
Default Color to use when displaying transparency-only elements, e.g. A4 bitmaps.
const uint16_tnewLine
NewLine value.

Public Functions Documentation#

bitDepth#

virtual uint8_t bitDepth()const

Number of bits per pixel used by the display.

Returns:

The number of bits per pixel.

Reimplements: touchgfx::LCD::bitDepth

blitCopy#

virtual void blitCopy(const uint16_t *sourceData ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha ,
boolhasTransparentPixels
)

Blits (directly copies) a block of data to the framebuffer, performing alpha blending (and tranparency keying) as specified.

Performs a software blend if HAL does not support BLIT_COPY_WITH_ALPHA and alpha != 255 (solid).

Parameters:
sourceDataThe source array pointer (points to the beginning of the data). The sourceData must be stored in a format suitable for the selected display.
sourceThe position and dimensions of the source. The x and y of this rect should both be 0.
blitRectA rectangle describing what region of the sourceData is to be copied to the framebuffer.
alphaThe alpha value to use for blending ranging from 0=invisible to 255=solid=no blending.
hasTransparentPixelsIf true, this data copy contains transparent pixels and require hardware support for that to be enabled.

Reimplements: touchgfx::LCD::blitCopy

blitCopy#

virtual void blitCopy(const uint8_t *sourceData ,
Bitmap::BitmapFormatsourceFormat ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha ,
boolhasTransparentPixels
)

Blits (directly copies) a block of data to the framebuffer, performing alpha blending (and tranparency keying) as specified.

Performs a software blend if HAL does not support BLIT_COPY_WITH_ALPHA and alpha < 255 (solid).

If the display does not support the specified sourceFormat, an assert will be raised.

Parameters:
sourceDataThe source array pointer (points to the beginning of the data). The sourceData must be stored in a format suitable for the selected display.
sourceFormatThe bitmap format used in the source data.
sourceThe position and dimensions of the source. The x and y of this rect should both be 0.
blitRectA rectangle describing what region of the sourceData is to be copied to the framebuffer.
alphaThe alpha value to use for blending ranging from 0=invisible to 255=solid=no blending.
hasTransparentPixelsIf true, this data copy contains transparent pixels and require hardware support for that to be enabled.

Reimplements: touchgfx::LCD::blitCopy

copyFrameBufferRegionToMemory#

virtual uint16_t * copyFrameBufferRegionToMemory(const Rect &visRegion ,
const Rect &absRegion ,
const BitmapIdbitmapId
)

Copies part of the framebuffer to the data section of a bitmap.

The bitmap must be a dynamic bitmap or animation storage (BITMAP_ANIMATION_STORAGE). The two regions given are the visible region and the absolute region on screen. This is used to copy only a part of the framebuffer. This might be the case if a SnapshotWidget is placed inside a Container where parts of the SnapshowWidget is outside the area defined by the Container. The visible region must be completely inside the absolute region.

Parameters:
visRegionThe visible region.
absRegionThe absolute region.
bitmapIdIdentifier for the bitmap.
Returns:

Null if it fails, else a pointer to the data in the given bitmap.

Note

There is only one instance of animation storage. The content of the bitmap data /animation storage outside the given region is left untouched.

See also:

Reimplements: touchgfx::LCD::copyFrameBufferRegionToMemory

drawPartialBitmap#

virtual void drawPartialBitmap(const Bitmap &bitmap ,
int16_tx ,
int16_ty ,
const Rect &rect ,
uint8_talpha =255,
booluseOptimized =true
)

Draws all (or a part) of a bitmap.

The coordinates of the corner of the bitmap is given in (x, y) and rect describes which part of the bitmap should be drawn. The bitmap can be drawn as it is or more or less transparent depending on the value of alpha. The value of alpha is independent of the transparency of the individual pixels of the given bitmap.

Parameters:
bitmapThe bitmap to draw.
xThe absolute x coordinate to place (0, 0) of the bitmap on the screen.
yThe absolute y coordinate to place (0, 0) of the bitmap on the screen.
rectA rectangle describing what region of the bitmap is to be drawn.
alpha(Optional) Optional alpha value ranging from 0=invisible to 255=solid. Default is 255 (solid).
useOptimized(Optional) if false, do not attempt to substitute (parts of) this bitmap with faster fillrects.

Reimplements: touchgfx::LCD::drawPartialBitmap

enableTextureMapperA4#

Enables the texture mappers for A4 image format.

This allows drawing A4 images using Bilinear Interpolation and Nearest Neighbor algorithms.

See also:

enableTextureMapperA4_BilinearInterpolation#

Enables the texture mappers for A4 image format.

This allows drawing A4 images using Bilinear Interpolation algorithm.

See also:

enableTextureMapperA4_NearestNeighbor#

Enables the texture mappers for A4 image format.

This allows drawing A4 images using Nearest Neighbor algorithm.

See also:

enableTextureMapperAll#

Enables the texture mappers for all image formats.

This allows drawing any image using Bilinear Interpolation and Nearest Neighbor algorithms, but might use a lot of memory for the drawing algorithms.

enableTextureMapperARGB8888#

Enables the texture mappers for ARGB8888 image format.

This allows drawing ARGB8888 images using Bilinear Interpolation and Nearest Neighbor algorithms.

See also:

enableTextureMapperARGB8888_BilinearInterpolation#

Enables the texture mappers for ARGB8888 image format.

This allows drawing ARGB8888 images using Bilinear Interpolation algorithm.

See also:

enableTextureMapperARGB8888_NearestNeighbor#

Enables the texture mappers for ARGB8888 image format.

This allows drawing ARGB8888 images using Nearest Neighbor algorithm.

See also:

enableTextureMapperL8_ARGB8888#

Enables the texture mappers for L8_ARGB8888 image format.

This allows drawing L8_ARGB8888 images using Bilinear Interpolation and Nearest Neighbor algorithms.

See also:

enableTextureMapperL8_ARGB8888_BilinearInterpolation#

Enables the texture mappers for L8_ARGB8888 image format.

This allows drawing L8_ARGB8888 images using Bilinear Interpolation algorithm.

See also:

enableTextureMapperL8_ARGB8888_NearestNeighbor#

Enables the texture mappers for L8_ARGB8888 image format.

This allows drawing L8_ARGB8888 images using Nearest Neighbor algorithm.

See also:

enableTextureMapperL8_RGB565#

Enables the texture mappers for L8_RGB565 image format.

This allows drawing L8_RGB565 images using Bilinear Interpolation and Nearest Neighbor algorithms.

See also:

enableTextureMapperL8_RGB565_BilinearInterpolation#

Enables the texture mappers for L8_RGB565 image format.

This allows drawing L8_RGB565 images using Bilinear Interpolation algorithm.

See also:

enableTextureMapperL8_RGB565_NearestNeighbor#

Enables the texture mappers for L8_RGB565 image format.

This allows drawing L8_RGB565 images using Nearest Neighbor algorithm.

See also:

enableTextureMapperL8_RGB888#

Enables the texture mappers for L8_RGB888 image format.

This allows drawing L8_RGB888 images using Bilinear Interpolation and Nearest Neighbor algorithms.

See also:

enableTextureMapperL8_RGB888_BilinearInterpolation#

Enables the texture mappers for L8_RGB888 image format.

This allows drawing L8_RGB888 images using Bilinear Interpolation algorithm.

See also:

enableTextureMapperL8_RGB888_NearestNeighbor#

Enables the texture mappers for L8_RGB888 image format.

This allows drawing L8_RGB888 images using Nearest Neighbor algorithm.

See also:

enableTextureMapperRGB565#

Enables the texture mappers for RGB565 image format.

This allows drawing RGB565 images using Bilinear Interpolation and Nearest Neighbor algorithms.

See also:

enableTextureMapperRGB565_NonOpaque_BilinearInterpolation#

Enables the texture mappers for NonOpaque RGB565 image format.

This allows drawing RGB565 images using Bilinear Interpolation algorithm.

See also:

enableTextureMapperRGB565_NonOpaque_NearestNeighbor#

Enables the texture mappers for NonOpaque RGB565 image format.

This allows drawing RGB565 images using Nearest Neighbor algorithm.

See also:

enableTextureMapperRGB565_Opaque_BilinearInterpolation#

Enables the texture mappers for Opaque RGB565 image format.

This allows drawing RGB565 images using Bilinear Interpolation algorithm.

See also:

enableTextureMapperRGB565_Opaque_NearestNeighbor#

Enables the texture mappers for Opaque RGB565 image format.

This allows drawing RGB565 images using Nearest Neighbor algorithm.

See also:

fillRect#

virtual void fillRect(const Rect &rect ,
colortypecolor ,
uint8_talpha =255
)

Draws a filled rectangle in the framebuffer in the specified color and opacity.

By default the rectangle will be drawn as a solid box. The rectangle can be drawn with transparency by specifying alpha from 0=invisible to 255=solid.

Parameters:
rectThe rectangle to draw in absolute display coordinates.
colorThe rectangle color.
alpha(Optional) The rectangle opacity, from 0=invisible to 255=solid.

Reimplements: touchgfx::LCD::fillRect

framebufferFormat#

virtual Bitmap::BitmapFormat framebufferFormat()const

Framebuffer format used by the display.

Returns:

Reimplements: touchgfx::LCD::framebufferFormat

framebufferStride#

virtual uint16_t framebufferStride()const

Framebuffer stride in bytes.

The distance (in bytes) from the start of one framebuffer row, to the next.

Returns:

The number of bytes in one framebuffer row.

Reimplements: touchgfx::LCD::framebufferStride

getBlueColor#

virtual uint8_t getBlueColor(colortypecolor)

Gets the blue color part of a color.

As this function must work for all color depths, it can be somewhat slow if used in speed critical sections. Consider finding the color in another way, if possible.

Parameters:
colorThe 16 bit color value.
Returns:

The blue part of the color.

Reimplements: touchgfx::LCD::getBlueColor

getColorFrom24BitRGB#

virtual colortype getColorFrom24BitRGB(uint8_tred ,const
uint8_tgreen ,const
uint8_tblueconst
)const

Generates a color representation to be used on the LCD, based on 24 bit RGB values.

Depending on your chosen color bit depth, the color will be interpreted internally as either a 16 bit or 24 bit color value. This function can be safely used regardless of whether your application is configured for 16 or 24 bit colors.

Parameters:
redValue of the red part (0-255).
greenValue of the green part (0-255).
blueValue of the blue part (0-255).
Returns:

The color representation depending on LCD color format.

Reimplements: touchgfx::LCD::getColorFrom24BitRGB

getGreenColor#

virtual uint8_t getGreenColor(colortypecolor)

Gets the green color part of a color.

As this function must work for all color depths, it can be somewhat slow if used in speed critical sections. Consider finding the color in another way, if possible.

Parameters:
colorThe 16 bit color value.
Returns:

The green part of the color.

Reimplements: touchgfx::LCD::getGreenColor

getRedColor#

virtual uint8_t getRedColor(colortypecolor)

Gets the red color part of a color.

As this function must work for all color depths, it can be somewhat slow if used in speed critical sections. Consider finding the color in another way, if possible.

Parameters:
colorThe color value.
Returns:

The red part of the color.

Reimplements: touchgfx::LCD::getRedColor

LCD16bpp#

getBlueFromColor#

static FORCE_INLINE_FUNCTION uint8_t getBlueFromColor(colortypecolor)

Gets blue from color.

Parameters:
colorThe color.
Returns:

The blue from color.

getColorFromRGB#

static FORCE_INLINE_FUNCTION colortype getColorFromRGB(uint8_tred ,
uint8_tgreen ,
uint8_tblue
)

Generates a color representation to be used on the LCD, based on 24 bit RGB values.

Parameters:
redValue of the red part (0-255).
greenValue of the green part (0-255).
blueValue of the blue part (0-255).
Returns:

The color representation depending on LCD color format.

getFramebufferStride#

static FORCE_INLINE_FUNCTION uint16_t getFramebufferStride()

Framebuffer stride in bytes.

The distance (in bytes) from the start of one framebuffer row, to the next.

Returns:

The number of bytes in one framebuffer row.

getGreenFromColor#

static FORCE_INLINE_FUNCTION uint8_t getGreenFromColor(colortypecolor)

Gets green from color.

Parameters:
colorThe color.
Returns:

The green from color.

getRedFromColor#

static FORCE_INLINE_FUNCTION uint8_t getRedFromColor(colortypecolor)

Gets red from color.

Parameters:
colorThe color.
Returns:

The red from color.

Protected Functions Documentation#

drawGlyph#

virtual void drawGlyph(uint16_t *wbuf16 ,
RectwidgetArea ,
int16_tx ,
int16_ty ,
uint16_toffsetX ,
uint16_toffsetY ,
const Rect &invalidatedArea ,
const GlyphNode *glyph ,
const uint8_t *glyphData ,
uint8_tbyteAlignRow ,
colortypecolor ,
uint8_tbitsPerPixel ,
uint8_talpha ,
TextRotationrotation
)

Private version of draw-glyph with explicit destination buffer pointer argument.

For all parameters (except the buffer pointer) see the public function drawString().

Parameters:
wbuf16The destination (frame) buffer to draw to.
widgetAreaThe canvas to draw the glyph inside.
xHorizontal offset to start drawing the glyph.
yVertical offset to start drawing the glyph.
offsetXHorizontal offset in the glyph to start drawing from.
offsetYVertical offset in the glyph to start drawing from.
invalidatedAreaThe area to draw inside.
glyphSpecifications of the glyph to draw.
glyphDataData containing the actual glyph (dense format)
byteAlignRowEach row of glyph data starts in a new byte.
colorThe color of the glyph.
bitsPerPixelBit depth of the glyph.
alphaThe transparency of the glyph.
rotationRotation to do before drawing the glyph.

Reimplements: touchgfx::LCD::drawGlyph

getTextureMapperDrawScanLine#

virtual DrawTextureMapScanLineBase * getTextureMapperDrawScanLine(const TextureSurface &texture ,
RenderingVariantrenderVariant ,
uint8_talpha
)

Gets pointer to object that can draw a scan line which allows for highly specialized and optimized implementation.

Parameters:
textureThe texture Surface.
renderVariantThe render variant.
alphaThe global alpha.
Returns:

Null if it fails, else the pointer to the texture mapper draw scan line object.

Reimplements: touchgfx::LCD::getTextureMapperDrawScanLine

blitCopyAlphaPerPixel#

static void blitCopyAlphaPerPixel(const uint16_t *sourceData ,
const uint8_t *alphaData ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha
)

Blits a 2D source-array to the framebuffer performing alpha-blending per pixel as specified.

Always performs a software blend.

Parameters:
sourceDataThe source-array pointer (points to the beginning of the data). The sourceData must be stored as 16- bits RGB565 values.
alphaDataThe alpha channel array pointer (points to the beginning of the data)
sourceThe location and dimensions of the source.
blitRectA rectangle describing what region is to be drawn.
alphaThe alpha value to use for blending applied to the whole image (255 = solid, no blending)

blitCopyARGB8888#

static void blitCopyARGB8888(const uint32_t *sourceData ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha
)

Blits a 2D source-array to the framebuffer performing alpha-blending per pixel as specified.

If ARGB8888 is not supported by the DMA a software blend is performed.

Parameters:
sourceDataThe source-array pointer (points to the beginning of the data). The sourceData must be stored as 32- bits ARGB8888 values.
sourceThe location and dimensions of the source.
blitRectA rectangle describing what region is to be drawn.
alphaThe alpha value to use for blending applied to the whole image (255 = solid, no blending)

blitCopyL8#

static void blitCopyL8(const uint8_t *sourceData ,
const uint8_t *clutData ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha
)

Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if indexed format is not supported by the DMA a software blend is performed.

Parameters:
sourceDataThe source-indexes pointer (points to the beginning of the data). The sourceData must be stored as 8- bits indexes.
clutDataThe source-clut pointer (points to the beginning of the CLUT color format and size data followed by colors entries.
sourceThe location and dimensions of the source.
blitRectA rectangle describing what region is to be drawn.
alphaThe alpha value to use for blending applied to the whole image (255 = solid, no blending)

blitCopyL8_ARGB8888#

static void blitCopyL8_ARGB8888(const uint8_t *sourceData ,
const uint8_t *clutData ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha
)

Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if L8_ARGB8888 is not supported by the DMA a software blend is performed.

Parameters:
sourceDataThe source-indexes pointer (points to the beginning of the data). The sourceData must be stored as 8- bits indexes.
clutDataThe source-clut pointer (points to the beginning of the CLUT color format and size data followed by colors entries stored as 32- bits (ARGB8888) format.
sourceThe location and dimensions of the source.
blitRectA rectangle describing what region is to be drawn.
alphaThe alpha value to use for blending applied to the whole image (255 = solid, no blending)

blitCopyL8_RGB565#

static void blitCopyL8_RGB565(const uint8_t *sourceData ,
const uint8_t *clutData ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha
)

Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if L8_RGB565 is not supported by the DMA a software blend is performed.

Parameters:
sourceDataThe source-indexes pointer (points to the beginning of the data). The sourceData must be stored as 8- bits indexes.
clutDataThe source-clut pointer points to the beginning of the CLUT color format and size data followed by colors entries stored as 16- bits (RGB565) format. If the source have per pixel alpha channel, then alpha channel data will be following the clut entries data.
sourceThe location and dimensions of the source.
blitRectA rectangle describing what region is to be drawn.
alphaThe alpha value to use for blending applied to the whole image (255 = solid, no blending)

blitCopyL8_RGB888#

static void blitCopyL8_RGB888(const uint8_t *sourceData ,
const uint8_t *clutData ,
const Rect &source ,
const Rect &blitRect ,
uint8_talpha
)

Blits a 2D indexed 8-bit source to the framebuffer performing alpha-blending per pixel as specified if L8_RGB888 is not supported by the DMA a software blend is performed.

Parameters:
sourceDataThe source-indexes pointer (points to the beginning of the data). The sourceData must be stored as 8- bits indexes.
clutDataThe source-clut pointer (points to the beginning of the CLUT color format and size data followed by colors entries stored as 32- bits (ARGB8888) format.
sourceThe location and dimensions of the source.
blitRectA rectangle describing what region is to be drawn.
alphaThe alpha value to use for blending applied to the whole image (255 = solid, no blending)

nextLine#

static int nextLine(boolrotatedDisplay ,
TextRotationtextRotation
)

Find out how much to advance in the display buffer to get to the next line.

Parameters:
rotatedDisplayIs the display running in portrait mode?
textRotationRotation to perform.
Returns:

How much to advance to get to the next line.

nextPixel#

static int nextPixel(boolrotatedDisplay ,
TextRotationtextRotation
)

Find out how much to advance in the display buffer to get to the next pixel.

Parameters:
rotatedDisplayIs the display running in portrait mode?
textRotationRotation to perform.
Returns:

How much to advance to get to the next pixel.