Template Struct SoftwareRenderer::TargetPixelBuffer¶
Defined in File slint-platform.h
Nested Relationships¶
This struct is a nested type of Class SoftwareRenderer.
Struct Documentation¶
-
template<typename PixelType>
struct TargetPixelBuffer Abstract base class for a target pixel buffer where certain drawing operations can be delegated. Use this to implement support for hardware accelerators such as DMA2D, PPA, or PXP on Microcontrollers.
Note: This class is still experimental - its API is subject to changes and not stabilized yet. To use the class, you must enable the
SLINT_FEATURE_EXPERIMENTAL=ON
CMake option.Public Functions
-
inline virtual ~TargetPixelBuffer()
-
virtual std::span<PixelType> line_slice(std::size_t line_number) = 0
Returns a span of pixels for the specified line number.
-
virtual std::size_t num_lines() = 0
Returns the number of lines in the buffer. This is the height of the buffer in pixels.
-
virtual bool draw_texture(const DrawTextureArgs &texture, const PhysicalRegion &clip) = 0
Draw a portion of provided texture to the specified pixel coordinates. Each pixel of the texture is to be blended with the given colorize color as well as the alpha value.
-
virtual bool fill_background(const Brush &brush, const PhysicalRegion &clip) = 0
Fill the background of the buffer with the given brush.
-
virtual bool draw_rectangle(const DrawRectangleArgs &args, const PhysicalRegion &clip) = 0
Draw a rectangle specified by the DrawRectangleArgs. That rectangle must be clipped to the given region.
-
inline virtual ~TargetPixelBuffer()