Chroma/inc/kernel/video/draw.h

66 lines
1.7 KiB
C
Raw Normal View History

#pragma once
#include <stdint.h>
/************************
*** Team Kitty, 2021 ***
*** Chroma ***
***********************/
2021-07-04 20:47:09 +00:00
#ifdef __cplusplus
extern "C" {
#endif
/**
* Drawing routines for screen manipulation.
* This will be pulled out into the Helix library soon.
*
* Set color with PrintInfo.
*/
2021-06-16 20:06:49 +00:00
void _swap_size_t(size_t a, size_t b);
int abs(int x);
typedef struct {
uint32_t charHeight;
uint32_t charWidth;
uint32_t charFGColor;
uint32_t charHLColor;
uint32_t charBGColor;
uint32_t minX;
uint32_t minY;
uint32_t charScale;
size_t charPosX;
size_t charPosY;
size_t horizontalOffset;
size_t charsPerRow;
size_t rowsPerScrn;
uint32_t scrlMode;
2021-06-16 20:06:49 +00:00
size_t screenWidth;
size_t screenHeight;
} PRINTINFO;
extern PRINTINFO PrintInfo;
void DrawPixel(size_t x, size_t y);
void FillScreen();
void SetForegroundColor(uint32_t color);
uint32_t GetForegroundColor();
void SetBackgroundColor(uint32_t color);
uint32_t GetBackgroundColor();
2021-06-16 20:06:49 +00:00
void DrawLine(size_t x0, size_t y0, size_t x1, size_t y1);
void DrawFilledRect(size_t x, size_t y, size_t width, size_t height);
void DrawLineRect(size_t x, size_t y, size_t width, size_t height, size_t thickness);
2021-06-16 20:06:49 +00:00
void DrawFilledRoundedRect(size_t x, size_t y, size_t width, size_t height, size_t radius);
void DrawLineRoundedRect(size_t x, size_t y, size_t width, size_t height, size_t radius);
2021-06-16 20:06:49 +00:00
void DrawFilledCircle(size_t centerX, size_t centerY, size_t radius);
void DrawLineCircle(size_t centerX, size_t centerY, size_t radius);
2021-07-04 20:47:09 +00:00
void DrawLineCircleCorners(size_t centerX, size_t centerY, size_t radius, char cornerMask);
#ifdef __cplusplus
}
#endif