Created a block type
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user