Created a block type

This commit is contained in:
2026-04-17 22:45:17 -05:00
parent 6589ac9c58
commit 1de39a5824
7 changed files with 31 additions and 18 deletions
+3 -2
View File
@@ -7,6 +7,7 @@ const Allocator = mem.Allocator;
const Matrix = grome.container.Matrix;
const SubMatrix = grome.container.SubMatrix;
const Point = grome.container.Point;
const Block = grome.container.Block;
const Rect = grome.container.Rect;
const Cell = grome.view.Cell;
@@ -40,8 +41,8 @@ pub const DoubleBuffer = struct {
// frame returns a subset of the backbuffer where `loc` is the top left point of the
// subsection, and `size` is the area or size of the subset.
pub fn frame(self: *@This(), loc: Point, size: Rect) SubMatrix(Cell) {
return .init(&self.back, loc, size);
pub fn frame(self: *@This(), mask: Block) SubMatrix(Cell) {
return .init(&self.back, mask);
}
// swap the front and back. This should be called right before rendering