ba0k+@andrew.cmu.edu (Brian Patrick Arnold) (05/03/91)
Howdy, today I was trying to tackle a small feat of drawing rotated text at 90 degrees "up" using simple bitmap manipulations until my brain hemmoraged. Having stared at Pascal code for too many years, I am at this moment unable to grasp the fundamentals of bit manipulation. I figure somebody knowledgeable on this wonderful net ought to be able to help jar my brain back into functioning again. Does anybody know of a book that describes bitmap rotation, or of some sample code? All I need to do is stand some text on its side going up vertically. Somebody please help an aspiring Mac programmer whose brain has gone "doooiiinnnng." Not that it matters for this problem, but I use MacApp. Please e-mail or at least echo responses directly to me, and thank you for any help you can provide. - Brian
andreww@uniwa.uwa.oz (Andrew John Williams) (05/08/91)
ba0k+@andrew.cmu.edu (Brian Patrick Arnold) writes: >Howdy, > today I was trying to tackle a small feat of drawing rotated text at >90 degrees "up" using simple bitmap manipulations until my brain >hemmoraged. > Having stared at Pascal code for too many years, I am at this moment >unable to grasp the fundamentals of bit manipulation. I figure somebody >knowledgeable on this wonderful net ought to be able to help jar my >brain back into functioning again. Does anybody know of a book that >describes bitmap rotation, or of some sample code? All I need to do is >stand some text on its side going up vertically. Somebody please help >an aspiring Mac programmer whose brain has gone "doooiiinnnng." Not >that it matters for this problem, but I use MacApp. Please e-mail or at >least echo responses directly to me, and thank you for any help you can >provide. >- Brian I saw a very nice bitmap rotate a while back - used nothing but CopyBits. Now if I could only remember where it was. It was in some book, of a set of (I think) 2 from some Mac mag. WHAT WAS IT CALLED?? Definitely worth having, whatever it was... John West (stealing Andrew's account) My fish has lost its memory too
jmunkki@hila.hut.fi (Juri Munkki) (05/09/91)
In article <1991May8.015923.18676@uniwa.uwa.oz> andreww@uniwa.uwa.oz (Andrew John Williams) writes: >I saw a very nice bitmap rotate a while back - used nothing but >CopyBits. Now if I could only remember where it was. It was in some >book, of a set of (I think) 2 from some Mac mag. WHAT WAS IT CALLED?? >Definitely worth having, whatever it was... Best of MacTutor, probably. I remember a MacTutor article that used copybits recursively to rotate a square bitmap 90 degrees at a time. The discussion that followed the article indicated that the algorithm is only cute, but not fast by any means. To rotate a bitmap to any angle, check out my sample source code from UMPG (Usenet Macintosh Programmer's Guide). Even though that code uses only toolbox calls to access the bitmap (a major bottleneck in this case), it does fairly well and is simple to use in real programs. BTW: I usually like getting mail, so if you like the rotation algorithm or would like to discuss it with me, don't hesitate to mail me. ____________________________________________________________________________ / Juri Munkki / Helsinki University of Technology / Wind / Project / / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / STORM / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sho@gibbs.physics.purdue.edu (Sho Kuwamoto) (05/10/91)
In article <1991May8.201345.27891@santra.uucp> jmunkki@hila.hut.fi (Juri Munkki) writes: >Best of MacTutor, probably. I remember a MacTutor article that used >copybits recursively to rotate a square bitmap 90 degrees at a time. >The discussion that followed the article indicated that the algorithm >is only cute, but not fast by any means. Actually, I remember a MacTutor article in which a bitmap was rotated by 90 degree increments by an assembly procedure. I also remember typing this into a THINK C asm{...} statement, but I lost the code in a disk crash. Has anyone else typed in this code for use with THINK C? I'd give you a nickel... -Sho -- sho@physics.purdue.edu <<-- ok... I'll give you a quarter.
andreww@uniwa.uwa.oz (Andrew John Williams) (05/10/91)
jmunkki@hila.hut.fi (Juri Munkki) writes: >Best of MacTutor, probably. Thats the one! Some very intersting things in there... John West (stealing Andrew's account) How many fish?