🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #632

Re: Drawing Speed

#632
From: James Seidman
Date: Thu, 15 Nov 1990 00:27
24 lines
1651 bytes
In article <319@pcad.UUCP> rob@pcad.UUCP (Ralph Brown) writes:
>I'm looking at Win 3.0 for a heavy graphics application and have done some
>drawing timings which seem pretty odd. Perhaps I've just overlooked some
>obvious setting for the PEN or GC which will make it all fine, if so, please
>let me know.
>[...]
>Using NULL_PEN and BLACK_BRUSH and
>        Rectangle                      -  31 Sec.

One thing which might be even faster than this (but maybe not...) is to
use FillRect() instead of Rectangle().  Even though you have the overhead
of filling up a RECT structure, you don't have the time spent drawing
the rectangle's border.  (I don't know how smart the system is, and if
it jumps over all that stuff if using NULL_PEN.  Considering how smart
it was about the 4-pixel wide pen, I wouldn't hold my breath.)  I know
that when I had a series of different colored rectangles to draw,
FillRect was much faster because I didn't have to keep selecting different
brushes into the device context.

-- 
Jim Seidman (Drax), the accidental engineer.
"It doesn't have to work... they'll be paralyzed just from laughing at me."
							- Dr. Who, _Shada_
UUCP: ames!vsi1!hsv3!jls	         INTERNET: hsv3.UUCP!jls@apple.com
Technical Details
Message-ID: <5787@hsv3.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!psuvax1!julius.cs.uiuc.edu!usc!apple!vsi1!hsv3!jls
References: <319@pcad.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!psuvax1!julius.cs.uiuc.edu!usc!apple!vsi1!hsv3!jls
From: jls@hsv3.UUCP (James Seidman)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Drawing Speed
Message-ID: <5787@hsv3.UUCP>
Date: 15 Nov 90 00:27:33 GMT
References: <319@pcad.UUCP>
Reply-To: jls@hsv3.UUCP (James Seidman)
Organization: Video Seven / Headland Technology
Lines: 24