跳转到主要内容

LCD16bppSerialFlash

platform/driver/lcd/LCD16bppSerialFlash.hpp

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 voidcopyAreaFromTFTToClientBuffer(const Rect & region)
Copies part of the displayed framebuffer to current framebuffer.
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 RectcopyFrameBufferRegionToMemory(const Rect & visRegion, const Rect & absRegion, uint8_t * dst, int16_t dstWidth, int16_t dstHeight)
Copies part of the framebuffer to memory.
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 voidfillBuffer(uint8_t *const destination, uint16_t pixelStride, const Rect & rect, const colortype color, const uint8_t alpha)
Draws a filled rectangle in destination memory using the specified color and opacity.
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.
LCD16bppSerialFlash(FlashDataReader & flashReader)
Creates a LCD16bppSerialFlash object.
FORCE_INLINE_FUNCTION uint16_tgetFramebufferStride()
Framebuffer stride in bytes.
FORCE_INLINE_FUNCTION uint16_tgetNativeColor(colortype color)
Generates a color representation to be used on the LCD, based on 24 bit RGB values.
FORCE_INLINE_FUNCTION uint16_tgetNativeColorFromRGB(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.

Protected Functions

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.
voidblitCopyARGB8888Solid(const uint32_t * sourceData, const Rect & source, const Rect & blitRect)
Blits a 2D source-array to the framebuffer never performing alpha-blending per pixel as because it is assumed that all pixels in the bitmap are solid (i.e.
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.
voidblitCopyRGB888(const uint8_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.
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.
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.

Protected Attributes

FlashDataReader &flashReader
Flash reader. Used by routines to read pixel data from the flash.

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.
LCD()
Initializes a new instance of the LCD class.
virtual voidsetDefaultColor(colortype color)
Sets default color as used by alpha level only bitmap formats, e.g.
virtual boolsupportDynamicBitmapDrawing(const Bitmap::BitmapFormat format)
Check if LCD support dynamic bitmap drawing.
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

copyAreaFromTFTToClientBuffer

virtual void copyAreaFromTFTToClientBuffer(const Rect &region)

Copies part of the displayed framebuffer to current framebuffer.

The region given is the absolute region on screen.

Parameters:
regionA rectangle describing what region of the displayed framebuffer is to be copied to the framebuffer.
Note

The copy is performed only when double buffering is enabled. Otherwise the given region in current framebuffer is left untouched.

Reimplements: touchgfx::LCD::copyAreaFromTFTToClientBuffer

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

copyFrameBufferRegionToMemory

virtual Rect copyFrameBufferRegionToMemory(const Rect &visRegion ,
const Rect &absRegion ,
uint8_t *dst ,
int16_tdstWidth ,
int16_tdstHeight
)

Copies part of the framebuffer to memory.

The memory is assumed to have the same format as the framebuffer. 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.
dstDestination memory in same format as the framebuffer.
dstWidthWidth of the destination.
dstHeightHeight of the destination.
Returns:

The rect that was actually copied to the destination buffer.

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 NearestNeighbor 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:

fillBuffer

virtual void fillBuffer(uint8_t *constdestination ,
uint16_tpixelStride ,
const Rect &rect ,
const colortypecolor ,
const uint8_talpha
)

Draws a filled rectangle in destination memory using the specified color and opacity.

The destination memory must have the same format as the display framebuffer. 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:
destinationThe start of the memory area to fill.
pixelStrideThe pixel stride, i.e. number of pixels in a row.
rectThe rectangle to fill absolute coordinates.
colorThe rectangle color.
alphaThe rectangle opacity, from 0=invisible to 255=solid.
Note

The pixelStride is rounded up to nearest whole bytes for displays with more than one pixel per byte (LCD1bpp, LCD2bpp and LCD4bpp)

Reimplements: touchgfx::LCD::fillBuffer

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.
See also:

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

LCD16bppSerialFlash

Creates a LCD16bppSerialFlash object.

The FlashDataReader object is used to fetch data from the external flash.

Parameters:
flashReaderReference to a FlashDataReader object.

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.

getNativeColor

static FORCE_INLINE_FUNCTION uint16_t getNativeColor(colortypecolor)

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

Parameters:
colorThe color.
Returns:

The color representation depending on LCD color format.

getNativeColorFromRGB

static FORCE_INLINE_FUNCTION uint16_t getNativeColorFromRGB(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.

Protected Functions Documentation

blitCopyARGB8888

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.

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)

blitCopyARGB8888Solid

void blitCopyARGB8888Solid(const uint32_t *sourceData ,
const Rect &source ,
const Rect &blitRect
)

Blits a 2D source-array to the framebuffer never performing alpha-blending per pixel as because it is assumed that all pixels in the bitmap are solid (i.e.

alpha for each pixel is 255).

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.

blitCopyL8

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

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

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)

blitCopyRGB888

void blitCopyRGB888(const uint8_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 24 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)

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

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.

Protected Attributes Documentation

flashReader

FlashDataReader & flashReader

Flash reader. Used by routines to read pixel data from the flash.