Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
graphic.h File Reference
#include <type.h>

Go to the source code of this file.

Data Structures

struct  pixel_t
 

Macros

#define FONT_SIZE   14
 

Functions

void put_pixel (int x, int y, uint32_t color)
 
void put_pixel_alpha (int x, int y, pixel_t src)
 
void putc (char c, int x, int y, uint32_t fg, uint32_t bg)
 
void putc_utf8 (const char *s, int col, int row, uint32_t fg, uint32_t bg)
 
int utf8_char_len (uint8_t c)
 
void put_pixel_alpha_fast (int x, int y, pixel_t src)
 
uint32_t vxGetWidth (void)
 
uint32_t vxGetHeight (void)
 
void vxScroll (int px)
 
void clear_screen (uint32_t color)
 
uint32_t screen_cols (void)
 
uint32_t screen_rows (void)
 
void fill_rect (int x, int y, int w, int h, uint32_t color)
 

Macro Definition Documentation

◆ FONT_SIZE

#define FONT_SIZE   14

Definition at line 26 of file graphic.h.

Referenced by do_scroll(), do_scroll(), INIT(), putc(), putc_utf8(), screen_cols(), and screen_rows().

Function Documentation

◆ clear_screen()

void clear_screen ( uint32_t color)

Definition at line 290 of file graphic.c.

References g__fb, and memset().

Referenced by start_tty().

◆ fill_rect()

void fill_rect ( int x,
int y,
int w,
int h,
uint32_t color )

Definition at line 340 of file graphic.c.

References dst, g__fb, h, x, and y.

◆ put_pixel()

void put_pixel ( int x,
int y,
uint32_t color )

Definition at line 192 of file graphic.c.

References pixel_t::a, pixel_t::b, pixel_t::g, g__fb, pixel_t::r, x, and y.

Referenced by __attribute__().

◆ put_pixel_alpha()

void put_pixel_alpha ( int x,
int y,
pixel_t src )

Definition at line 207 of file graphic.c.

References pixel_t::a, pixel_t::b, blend(), pixel_t::g, g__fb, PTR_ADD, pixel_t::r, x, and y.

◆ put_pixel_alpha_fast()

void put_pixel_alpha_fast ( int x,
int y,
pixel_t src )

Definition at line 259 of file graphic.c.

References pixel_t::a, pixel_t::b, pixel_t::g, g__fb, pixel_t::r, x, and y.

◆ putc()

void putc ( char c,
int x,
int y,
uint32_t fg,
uint32_t bg )

Definition at line 151 of file graphic.c.

References dst, FONT_SIZE, serial2_printf(), ssfn_ctx, ssfn_ready, ssfn_render(), and str().

Referenced by put_char_raw(), and tty_check_and_flush().

◆ putc_utf8()

void putc_utf8 ( const char * s,
int col,
int row,
uint32_t fg,
uint32_t bg )

Definition at line 166 of file graphic.c.

References dst, FONT_SIZE, serial2_printf(), ssfn_ctx, ssfn_ready, and ssfn_render().

Referenced by tty_check_and_flush().

◆ screen_cols()

uint32_t screen_cols ( void )

Definition at line 327 of file graphic.c.

References FONT_SIZE, and vxGetWidth().

Referenced by advance_cursor(), and configure_tty().

◆ screen_rows()

uint32_t screen_rows ( void )

Definition at line 333 of file graphic.c.

References FONT_SIZE, h, and vxGetHeight().

Referenced by advance_cursor(), configure_tty(), do_scroll(), and put_char_raw().

◆ utf8_char_len()

int utf8_char_len ( uint8_t c)

Definition at line 180 of file graphic.c.

Referenced by tty_check_and_flush().

◆ vxGetHeight()

uint32_t vxGetHeight ( void )

Definition at line 316 of file graphic.c.

References dst.

Referenced by char_ioctl(), and screen_rows().

◆ vxGetWidth()

uint32_t vxGetWidth ( void )

Definition at line 315 of file graphic.c.

References dst.

Referenced by char_ioctl(), and screen_cols().

◆ vxScroll()

void vxScroll ( int px)

Definition at line 318 of file graphic.c.

References dst, ssfn_memcpy(), and ssfn_memset().

Referenced by do_scroll(), and do_scroll().