mirror of
https://github.com/retrotheory/InvertCorners_VintageMacintosh.git
synced 2024-12-06 21:49:28 +00:00
1 line
643 B
C
1 line
643 B
C
#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);
|
|
} |