4 ms·
I agree...I want to see the algorithm for drawing rounded rectangles! I assume that he was able take his oval rendering code and use it for the corners of the s
by avgarrison 16y ago
I agree...I want to see the algorithm for drawing rounded rectangles! I assume that he was able take his oval rendering code and use it for the corners of the square. Never mind, that would probably still leave the story unsatisfying.
- sp332 16y agoFine, here's the source file. http://github.com/jrk/QuickDraw/raw/master/RRects.a http://github.com/jrk/QuickDraw/raw/master/RRects.a Edit: Luc already linked to the source archive in this thread, so I changed my link specifically to the RRects.a file.
- Jkeg 16y agoBecause everyone understands Assembly?
- sp332 16y agoDon't worry, 68k assembly is easier to read than x86 assembly. This code is nicely structured and heavily commented. Don Knuth called Atkinson's QuickDraw and MacPaint code some of the best ever written. Of course, if I'd actually read the code before linking to it, I'd have realized that this file doesn't really answer avgarrison's question because the algorithm is in DrawArc.a (see Luc's post earlier in this thread for an archive with the rest of the files).
- HeyLaughingBoy 16y agoShould we take it from your username and the comment about 68k assembly that you've played with the MC68332 a bit or is it just coincidence :-)
- sp332 16y agoHaha, just coincidence :-)
- unwind 16y agoThanks! It's weird that a) Bill Atkinson also used all-caps for his mnemonics, as did I when I grew up on the MC68k; b) how it brings me back to the Amiga (yes, I know this code pre-dates the Amiga, but still).
- Semiapies 16y agoNot sure if you mean to be pointlessly snarky or not, but hearing about his thought process and how he got a quick algorithm for a harder problem to work would have been much more interesting - and from a storytelling POV, would have been much better - than an abrupt "and then he came up with the solution", especially after the long bit on how he generated ovals.