mirror of
https://github.com/retrotheory/InvertCorners_VintageMacintosh.git
synced 2024-12-30 12:29:49 +00:00
Add files via upload
This commit is contained in:
commit
d656b2e81e
BIN
InvertCorners.sit
Normal file
BIN
InvertCorners.sit
Normal file
Binary file not shown.
1
invertcorners.c
Normal file
1
invertcorners.c
Normal file
@ -0,0 +1 @@
|
||||
#include <Quickdraw.h>
int main(void)
{
// Setup
Rect s;
RgnHandle CornersRgn;
RgnHandle WholeRgn;
InitGraf(&qd.thePort);
InitWindows();
s = qd.screenBits.bounds;
// Whole screen set
RectRgn(qd.thePort->visRgn, &s);
// Draw the rounded corners
WholeRgn = NewRgn();
OpenRgn();
FrameRoundRect(&s, 16, 16);
CloseRgn(WholeRgn);
// Invert just the corners
CornersRgn = NewRgn();
DiffRgn(qd.thePort->visRgn, WholeRgn, CornersRgn);
InvertRgn(CornersRgn);
// Set screen as rounded screen
CopyRgn(WholeRgn, qd.thePort->visRgn);
DisposeRgn(WholeRgn);
}
|
Loading…
Reference in New Issue
Block a user