[qwaq] Make DrawBuffer and TextContext sizes available

This commit is contained in:
Bill Currie 2020-03-13 02:52:23 +09:00
parent 1d3c8d8a6c
commit 45acbddb79
4 changed files with 9 additions and 1 deletions

View file

@ -16,6 +16,7 @@
- (Extent) size;
- (int *) buffer;
- (Rect) rect;
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;

View file

@ -29,6 +29,11 @@
{
return buffer;
}
- (Rect) rect
{
Rect rect = { nil, size };
return rect;
}
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect
{

View file

@ -38,7 +38,8 @@
-initWithRect: (Rect) rect;
-initWithWindow: (window_t) window;
-(window_t) window;
- (window_t) window;
- (Extent) size;
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;

View file

@ -33,6 +33,7 @@ static TextContext *screen;
return nil;
}
window = stdscr;
rect = getwrect (window);
return self;
}