GitOS
Operating system exercise
Loading...
Searching...
No Matches
FramebufferGraphics Class Reference

#include <framebuffer.hpp>

Public Member Functions

void draw_pixel (uint32_t x, uint32_t y, uint32_t color)
 
uint32_t get_pixel (uint32_t x, uint32_t y)
 
void draw_char (uint32_t x, uint32_t y, char c, uint32_t color)
 
void draw_string (uint32_t x, uint32_t y, const char *str, uint32_t color)
 
void print_char (char c)
 
void print_char_color (char c, uint32_t color)
 
void print_string (const char *str)
 
void print_string_color (const char *str, uint32_t color)
 
void clear_screen ()
 
void set_cursor (uint32_t x, uint32_t y)
 
uint32_t get_cursor_x ()
 
uint32_t get_cursor_y ()
 
uint32_t get_current_color ()
 
void set_text_color (uint32_t color)
 
uint8_t * get_buffer () const
 
uint32_t get_width () const
 
uint32_t get_height () const
 
uint32_t get_bpp () const
 
uint32_t get_buffer_size () const
 
uint32_t get_offset (uint32_t x, uint32_t y)
 
 FramebufferGraphics (uint32_t w, uint32_t h, uint32_t bpp)
 

Static Public Member Functions

static FramebufferGraphicsthe ()
 

Constructor & Destructor Documentation

◆ FramebufferGraphics()

FramebufferGraphics ( uint32_t  w,
uint32_t  h,
uint32_t  bpp 
)

Member Function Documentation

◆ clear_screen()

void clear_screen ( )

References draw_pixel().

◆ draw_char()

void draw_char ( uint32_t  x,
uint32_t  y,
char  c,
uint32_t  color 
)

References draw_pixel().

◆ draw_pixel()

void draw_pixel ( uint32_t  x,
uint32_t  y,
uint32_t  color 
)

References offset.

◆ draw_string()

void draw_string ( uint32_t  x,
uint32_t  y,
const char *  str,
uint32_t  color 
)

References draw_char().

◆ get_bpp()

uint32_t get_bpp ( ) const

◆ get_buffer()

uint8_t * get_buffer ( ) const

◆ get_buffer_size()

uint32_t get_buffer_size ( ) const

References get_bpp(), get_height(), and get_width().

◆ get_current_color()

uint32_t get_current_color ( )

◆ get_cursor_x()

uint32_t get_cursor_x ( )

◆ get_cursor_y()

uint32_t get_cursor_y ( )

◆ get_height()

uint32_t get_height ( ) const

◆ get_offset()

uint32_t get_offset ( uint32_t  x,
uint32_t  y 
)

◆ get_pixel()

uint32_t get_pixel ( uint32_t  x,
uint32_t  y 
)

References offset.

◆ get_width()

uint32_t get_width ( ) const

◆ print_char()

void print_char ( char  c)

References print_char_color().

◆ print_char_color()

void print_char_color ( char  c,
uint32_t  color 
)

References draw_char().

◆ print_string()

void print_string ( const char *  str)

References print_string_color().

◆ print_string_color()

void print_string_color ( const char *  str,
uint32_t  color 
)

References print_char_color().

◆ set_cursor()

void set_cursor ( uint32_t  x,
uint32_t  y 
)

◆ set_text_color()

void set_text_color ( uint32_t  color)

◆ the()

FramebufferGraphics * the ( )
static

The documentation for this class was generated from the following files: