显示面板接口
公共头文件: #include "brookesia/hal_interface/display/panel.hpp"
API 参考
Header File
Classes
-
class DisplayPanelIface : public esp_brookesia::hal::Interface
Display panel interface for rendering pixel data.
Public Types
Public Functions
-
inline DisplayPanelIface(Info info)
Construct a display panel interface.
- 参数
info – [in] Static panel capability information.
-
virtual ~DisplayPanelIface() = default
Virtual destructor for polymorphic panel interfaces.
-
virtual bool draw_bitmap(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, const uint8_t *data) = 0
Draw a bitmap into a rectangular panel region.
The region follows half-open bounds semantics:
[x1, x2)and[y1, y2).- 参数
x1 – [in] Left coordinate.
y1 – [in] Top coordinate.
x2 – [in] Right coordinate (exclusive).
y2 – [in] Bottom coordinate (exclusive).
data – [in] Pixel buffer pointer.
- 返回
trueon success; otherwisefalse.
-
inline virtual bool get_driver_specific(DriverSpecific &specific)
Get the driver-specific data.
- 参数
specific – [out] The driver-specific data.
- 返回
trueon success; otherwisefalse.
Public Static Attributes
-
struct DriverSpecific
Driver-specific data.
-
struct Info
Static panel capability information.
Public Functions
-
inline uint8_t get_pixel_bits() const
Get the number of bits per pixel.
- 返回
Number of bits per pixel.
-
inline bool is_valid() const
Check if the panel information is valid.
- 返回
trueif the panel information is valid; otherwisefalse.
Public Members
-
uint16_t h_res = 0
Horizontal resolution in pixels.
-
uint16_t v_res = 0
Vertical resolution in pixels.
-
PixelFormat pixel_format = PixelFormat::Max
Pixel format.
-
inline uint8_t get_pixel_bits() const
-
inline DisplayPanelIface(Info info)