mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
video: Add a function to draw a rectangle
Provide a way to draw an unfilled box of a certain width. This is useful for grouping menu items together. Add a comment showing how to see the copy-framebuffer, for testing. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -249,7 +249,7 @@ int video_fill(struct udevice *dev, u32 colour);
|
||||
/**
|
||||
* video_fill_part() - Erase a region
|
||||
*
|
||||
* Erase a rectangle of the display within the given bounds.
|
||||
* Erase a rectangle on the display within the given bounds
|
||||
*
|
||||
* @dev: Device to update
|
||||
* @xstart: X start position in pixels from the left
|
||||
@@ -262,6 +262,23 @@ int video_fill(struct udevice *dev, u32 colour);
|
||||
int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend,
|
||||
int yend, u32 colour);
|
||||
|
||||
/**
|
||||
* video_draw_box() - Draw a box
|
||||
*
|
||||
* Draw a rectangle on the display within the given bounds
|
||||
*
|
||||
* @dev: Device to update
|
||||
* @x0: X start position in pixels from the left
|
||||
* @y0: Y start position in pixels from the top
|
||||
* @x1: X end position in pixels from the left
|
||||
* @y1: Y end position in pixels from the top
|
||||
* @width: width in pixels
|
||||
* @colour: Value to write
|
||||
* Return: 0 if OK, -ENOSYS if the display depth is not supported
|
||||
*/
|
||||
int video_draw_box(struct udevice *dev, int x0, int y0, int x1, int y1,
|
||||
int width, u32 colour);
|
||||
|
||||
/**
|
||||
* video_sync() - Sync a device's frame buffer with its hardware
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user