Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Fine, here's the source file. 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.


Thanks! 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).


Because everyone understands Assembly?


Don'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).


Should 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 :-)


Haha, just coincidence :-)


Not 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: