13#ifndef __MUTEKI_DRAW_LCD_H__
14#define __MUTEKI_DRAW_LCD_H__
60extern void WriteAlignString(
short x,
short y,
const void *s,
short max_length,
int align,
unsigned int flags);
86extern void WriteString(
short x,
short y,
const void *s,
unsigned int flags);
330extern
void GetDrawArea(
short *x0,
short *y0,
short *x1,
short *y1);
342extern
void DrawLine(
short x0,
short y0,
short x1,
short y1,
unsigned int flags);
354extern
void DrawRect(
short x0,
short y0,
short x1,
short y1,
unsigned int flags);
366extern
void FillRect(
short x0,
short y0,
short x1,
short y1,
unsigned int flags);
380extern
void DrawRoundRect(
short x0,
short y0,
short x1,
short y1,
short rx,
short ry,
unsigned int flags);
391extern
void DrawCircle(
short x,
short y,
short r,
unsigned int flags);
403extern
void FillCircle(
short x,
short y,
short r,
unsigned int flags);
415extern
void DrawEllipse(
short x,
short y,
short rx,
short ry,
unsigned int flags);
427extern
void FillEllipse(
short x,
short y,
short rx,
short ry,
unsigned int flags);
458extern
void ScrollDown(
short x0,
short y0,
short x1,
short y1,
short amount);
470extern
void ScrollLeft(
short x0,
short y0,
short x1,
short y1,
short amount);
482extern
void ScrollRight(
short x0,
short y0,
short x1,
short y1,
short amount);
494extern
void ScrollUp(
short x0,
short y0,
short x1,
short y1,
short amount);
#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
void PutImage(short x, short y, lcd_surface_t *surface, unsigned short flags)
Copy pixels from a surface to current active LCD.
void DeleteLCDObject(lcd_t *lcd)
Free a regular LCD descriptor.
bool DeleteLCD(lcd_thread_safe_t *lcd)
Free a thread-safe LCD descriptor.
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 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.
lcd_surface_t * SelectLCDObject(lcd_t *lcd, lcd_surface_t *new_surface)
Checked version of SetDCObject().
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.
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.
unsigned short GetFontType(void)
Get the current font type.
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 the 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_surface_t * CreateCompatibleImage(const lcd_t *source, short width, short height)
Create a surface for an 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.
unsigned short SetFontType(unsigned short font_type)
Set the current font type to font_type.
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.
Display canvas (LCD) type definitions.
struct lcd_base_s lcd_t
lcd_base_s
Definition lcd.h:155
struct lcd_thread_safe_s lcd_thread_safe_t
lcd_thread_safe_s
Definition lcd.h:146
struct lcd_surface_s lcd_surface_t
Descriptor of an LCD drawing surface or hardware framebuffer.