Template Struct TargetPixelBuffer¶
Defined in File slint-platform.h
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 - it’s 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 fill_rectangle(int16_t x, int16_t y, int16_t width, int16_t height, const RgbaColor<uint8_t> &premultiplied_color, CompositionMode composition_mode) = 0¶
Fill a rectangle at the specified pixel coordinates with the given color. Return true if the operation succeeded; false otherwise;
-
virtual bool draw_texture(int16_t x, int16_t y, int16_t width, int16_t height, const Texture &texture, const RgbaColor<uint8_t> &colorize, uint8_t alpha, int screen_rotation_degrees, CompositionMode composition_mode) = 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.
-
inline virtual ~TargetPixelBuffer()¶