Add TextPos relations.
This commit is contained in:
parent
907acf1e18
commit
ad0875aaac
|
@ -46,6 +46,16 @@ struct TextChar
|
||||||
uint8_t vgacolor; // Format of <sortix/vga.h>
|
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
|
class TextBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue