[comp.sys.mac.programmer] Novice QuickDraw Question

john@newave.UUCP (John A. Weeks III) (02/28/91)

I have an array of data that represents a screen bitmap from a
non-Mac system.  I want to display this data in a Mac window.
In looking through the QuickDraw sections of the Mac programming
books, I find all kinds of procedures to draw lines, squares,
circles, etc, but no procedure to draw a single point (pixel).

How do you plot a point in QuickDraw?  I worked around this by
plotting lines of length 1, but this seems like it would carry
extra overhead (I could have also used squares of size 1 x 1).

-john-

-- 
===============================================================================
John A. Weeks III               (612) 942-6969               john@newave.mn.org
NeWave Communications                 ...uunet!rosevax!tcnet!wd0gol!newave!john
===============================================================================

pepke@gw.scri.fsu.edu (Eric Pepke) (02/28/91)

A much better way to do this would be to transform the data into an 
offscreen bitmap internally and then copy it to the screen with a single 
CopyBits.

The last time the single pixel question came up, the consensus seemed to 
be that the fastest way to do it was with a CopyBits of a rectangle 
containing a single black pixel.

Eric Pepke                                    INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute MFENET:   pepke@fsu
Florida State University                      SPAN:     scri::pepke
Tallahassee, FL 32306-4052                    BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.

Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) (03/02/91)

Eric Pepke writes in a message to All

EP> The last time the single pixel question came up, the consensus 
EP> seemed to be that the fastest way to do it was with a CopyBits 
EP> of a rectangle containing a single black pixel.

No doubt with NGetTrapUsed prior to the first call to CopyBIts...


Lawson
 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English
Internet: Lawson.English@p88.f15.n300.z1.fidonet.org