13#ifndef __MUTEKI_UI_CANVAS_H__
14#define __MUTEKI_UI_CANVAS_H__
59extern void WriteAlignString(
short x,
short y,
const void *s,
short max_length,
int align,
unsigned int flags);
85extern void WriteString(
short x,
short y,
const void *s,
unsigned int flags);
328extern
void GetDrawArea(
short *x0,
short *y0,
short *x1,
short *y1);
340extern
void DrawLine(
short x0,
short y0,
short x1,
short y1,
unsigned int flags);
352extern
void DrawRect(
short x0,
short y0,
short x1,
short y1,
unsigned int flags);
364extern
void FillRect(
short x0,
short y0,
short x1,
short y1,
unsigned int flags);
378extern
void DrawRoundRect(
short x0,
short y0,
short x1,
short y1,
short rx,
short ry,
unsigned int flags);
389extern
void DrawCircle(
short x,
short y,
short r,
unsigned int flags);
401extern
void FillCircle(
short x,
short y,
short r,
unsigned int flags);
413extern
void DrawEllipse(
short x,
short y,
short rx,
short ry,
unsigned int flags);
425extern
void FillEllipse(
short x,
short y,
short rx,
short ry,
unsigned int flags);
456extern
void ScrollDown(
short x0,
short y0,
short x1,
short y1,
short amount);
468extern
void ScrollLeft(
short x0,
short y0,
short x1,
short y1,
short amount);
480extern
void ScrollRight(
short x0,
short y0,
short x1,
short y1,
short amount);
492extern
void ScrollUp(
short x0,
short y0,
short x1,
short y1,
short amount);
void PutImage(short x, short y, lcd_surface_t *surface, unsigned short flags)
Copy pixels from a surface to current active LCD.
void GetCursorPosition(short *x, short *y)
Get the cursor position on the current canvas.
void DrawRect(short x0, short y0, short x1, short y1, unsigned int flags)
Stroke a rectangle on the current active LCD.
void SetFontType(short font_type)
Set the current font type to font_type.
void Printf(const char *format,...) SYS_IS_PRINTF(1
Format and draw a string.
short GetPenSize(void)
Get the stroke width.
void DrawCircle(short x, short y, short r, unsigned int flags)
Stroke a circle on the current active LCD.
void SetDrawArea(short x0, short y0, short x1, short y1)
Set the drawing area of the current active LCD.
short GetPenStyle(unsigned int *dash_pattern)
Get the stroke dash pattern.
int rgbSetColor(int color)
Set display canvas foreground fill color.
void WriteString(short x, short y, const void *s, unsigned int flags)
Draw a string s aligned to the top left corner at (x, y) px.
void DrawRoundRect(short x0, short y0, short x1, short y1, short rx, short ry, unsigned int flags)
Stroke a rounded corner rectangle on the current active LCD.
void ScrollUp(short x0, short y0, short x1, short y1, short amount)
Move a rectangle up by amount pixels.
void InverseSetArea(short x0, short y0, short x1, short y1)
Invert color within a rectangle.
short GetMaxScrY(void)
Get Y coordinate of the bottom-most visible pixels on the current canvas.
void ScrollDown(short x0, short y0, short x1, short y1, short amount)
Move a rectangle down by amount pixels.
int SetPixel(short x, short y, int color)
Set the pixel color on the current active surface with the given pixel.
void FillCircle(short x, short y, short r, unsigned int flags)
Fill a circle on the current active LCD.
void FillRect(short x0, short y0, short x1, short y1, unsigned int flags)
Fill a rectangle on the current active LCD.
void void PrintfXY(short x, short y, const char *format,...) SYS_IS_PRINTF(3
Format and draw a string aligned to the top left corner at (x, y) px.
unsigned int GetCursorSize(void)
Get the size of the cursor on the current canvas.
lcd_surface_t * SetDCObject(lcd_t *lcd, lcd_surface_t *new_surface)
Link a surface (device context) to an LCD descriptor.
size_t GetImage(short x0, short y0, short x1, short y1, lcd_surface_t *surface)
Copy a rectangle of pixels from current active LCD and save it to the specified buffer.
lcd_t * SetActiveLCD(lcd_t *new_lcd)
Set an LCD descriptor as active.
void WriteAlignString(short x, short y, const void *s, short max_length, int align, unsigned int flags)
Draw a string s with specified alignment at (x, y) px.
int rgbSetBkColor(int color)
Set display canvas background fill color.
void FillEllipse(short x, short y, short rx, short ry, unsigned int flags)
Fill an ellipse on the current active LCD.
void WriteChar(short x, short y, UTF16 c, unsigned int flags)
Draw a UTF-16 character c aligned to the top left corner at (x, y) px.
short SetCursorType(short new_type)
Set the type of the cursor on the current canvas.
void CursorUnlock(void)
Unlock the cursor on the current canvas.
short SetPenSize(short size)
Set the stroke width.
lcd_t * CreateVirtualLCD(short width, short height, short width_bytes)
Create a virtual LCD descriptor.
void CursorLock(void)
Lock the cursor on the current canvas.
short GetFontType(void)
Get the current font type.
void ClearScreen(bool fill_with_fg)
Fill the current display canvas with background color, effectively clearing it.
void SetCursorPosition(short x, short y)
Move the cursor position on the current canvas to the specified coordinate.
short GetMaxScrX(void)
Get X coordinate of the rightmost visible pixels on the current canvas.
int SetTransparentColor(int color)
Set display canvas transparent color.
void void int ShowGraphic(short x, short y, lcd_surface_t *surface, unsigned short flags)
Draw a surface onto current active LCD.
void ScrollLeft(short x0, short y0, short x1, short y1, short amount)
Move a rectangle left by amount pixels.
void DeleteVirtualLCD(lcd_t *lcd)
Dispose a previously created virtual LCD descriptor.
lcd_t * GetActiveLCD(void)
Get the current active LCD descriptor.
void DrawLine(short x0, short y0, short x1, short y1, unsigned int flags)
Stroke a line on the current active LCD.
short GetCursorType(void)
Get the type of the cursor on the current canvas.
void GetDrawArea(short *x0, short *y0, short *x1, short *y1)
Get the drawing area of the current active LCD.
lcd_t * CreateCompatibleLCD(lcd_t *source)
Copy an LCD descriptor (excluding surface).
unsigned int SetCursorSize(unsigned int new_size)
Set the size of the cursor on the current canvas.
int GetPixel(short x, short y)
Get the RGB value of a pixel on the current active surface.
void DrawEllipse(short x, short y, short rx, short ry, unsigned int flags)
Stroke an ellipse on the current active LCD.
void ScrollRight(short x0, short y0, short x1, short y1, short amount)
Move a rectangle right by amount pixels.
short SetPenStyle(short dash, unsigned int *dash_pattern)
Set the stroke dash pattern.
#define UTF16
"Portable" Besta UTF-16 type used by other headers.
Definition common.h:54
#define SYS_IS_PRINTF(arg_index_str, arg_index_fmt)
Attribute for opting a function in for printf static checking.
Definition common.h:92
The LCD descriptor.
Definition common.h:901
Descriptor of an LCD drawing surface or hardware framebuffer.
Definition common.h:728
Common data structures and definitions for the UI subsystem.