mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Add TextPos relations.
This commit is contained in:
parent
907acf1e18
commit
ad0875aaac
1 changed files with 10 additions and 0 deletions
|
@ -46,6 +46,16 @@ struct TextChar
|
|||
uint8_t vgacolor; // Format of <sortix/vga.h>
|
||||
};
|
||||
|
||||
static inline bool IsTextPosBeforeTextPos(const TextPos& a, const TextPos& b)
|
||||
{
|
||||
return a.y < b.y || (a.y == b.y && a.x < b.x);
|
||||
}
|
||||
|
||||
static inline bool IsTextPosAfterTextPos(const TextPos& a, const TextPos& b)
|
||||
{
|
||||
return a.y > b.y || (a.y == b.y && a.x > b.x);
|
||||
}
|
||||
|
||||
class TextBuffer
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue