Add files via upload

This commit is contained in:
Retro-Theory 2021-12-28 21:00:31 +00:00 committed by GitHub
commit d656b2e81e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 0 deletions

BIN
InvertCorners.sit Normal file

Binary file not shown.

1
invertcorners.c Normal file
View 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); }