Don't draw out of bounds line numbers

This commit is contained in:
Krzosa Karol
2024-07-28 14:38:12 +02:00
parent 0569d64cc9
commit 01a0d5f05f
2 changed files with 13 additions and 1 deletions

View File

@@ -125,6 +125,18 @@ Rect2 Shrink(Rect2 result, float v) {
return result;
}
Rect2 ShrinkVertical(Rect2 result, float v) {
result.min.y += v;
result.max.y -= v;
return result;
}
Rect2 ShrinkHorizontal(Rect2 result, float v) {
result.min.x += v;
result.max.x -= v;
return result;
}
Vec2 GetMid(Rect2 r) {
Vec2 size = GetSize(r);
size.x /= 2.f;