home *** CD-ROM | disk | FTP | other *** search
- From: azarian@hpcc01.corp.hp.com (Randy Azarian)
- Date: Fri, 21 Aug 1992 01:31:11 GMT
- Subject: GDI: Drawing a dotted line
- Message-ID: <70550002@hpcc01.corp.hp.com>
- Organization: the HP Corporate notes server
- Path: sparky!uunet!usc!sdd.hp.com!hpscdc!hplextra!hpcc05!hpcc01!azarian
- Newsgroups: comp.os.ms-windows.programmer.misc
- Lines: 27
-
- I want to draw a line with alternating pixels; in other words, a dotted line.
- CreatePen provides a number of patterns that I am able to use, however what
- they call PS_DOT alternates about every two or three pixels, but not what I
- want, which is to alternate *every* pixel.
-
- Realizing that CreatePen probably won't work for me, I created a bitmap
- with alternating pixels (8x8) and used PatBlt to copy the bitmap (in a
- single-line width) to the device. This works, but it is way too slow.
-
- I even tried using my own line-drawing algorthm and using SetPixel and
- alternating pixels. This is even slower.
-
- When I use LineTo with CreatePen, the results are almost instantaneous.
- With the other two methods I described, there is a *noticable* line trace.
-
- Can anyone help me to find a way to draw a *true* dotted line ... fast and easy
- (well, easy is not so important, but fast is). Possibly there is some way
- to modify an HPEN after I generated it using CreatePen.
-
- I would think that this would be a common item to use.
-
-
- Thanks for any help.
-
- -------
- Randy Azarian
- HP PAITC
-