Re: Cylinder Drawing Essay
- From: "AliR \(VC++ MVP\)" <AliR@xxxxxxxxxxxxx>
- Date: Wed, 26 Mar 2008 13:00:25 -0500
Nice write up joe.
Are you going to provide a download for this article?
AliR.
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:n9rju3htlhhsa1fge7raq2s4flld4kkhen@xxxxxxxxxx
A question had come up a few days before I left on a trip to San Diego. I
had a flight
with a long layover, evenings in the hotel after a day of teaching, and a
long trip back.
So I decided to write a program that could construct a rotatable cylinder
using standard
GDI. It requires under 100 lines of code, and of those, 25 are the
gradient-fill table
that does the 3-D highlighting illusion. Lots of UI stuff, including a
sufficiently
complex set of resizable controls that I nearly downloaded a
geometry-management tool.
You can find it at
http://www.flounder.com/cylinder.htm
It explores some interesting problems, including how to create a clipping
region to clip
an area determined by a transformation matrix (it took several hours to
figure out how to
do this, because the documentation about
::SelectClipRgn/CDC::SelectClipRgn is incomplete
and misleading, but I now have over 100 such defects listed in my "MSDN
Bugs and
Omissions" page)
It probably isn't vaguely like what the OP had wanted, but it is
sufficiently cool that it
is a useful piece of code.
joe
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Cylinder Drawing Essay
- From: Joseph M . Newcomer
- Re: Cylinder Drawing Essay
- References:
- Cylinder Drawing Essay
- From: Joseph M . Newcomer
- Cylinder Drawing Essay
- Prev by Date: Re: OT: Can't set breakpoint
- Next by Date: RE: Disabling a listbox, yet keep scrolling functional...
- Previous by thread: Re: Cylinder Drawing Essay
- Next by thread: Re: Cylinder Drawing Essay
- Index(es):
Relevant Pages
|