Re: Calculate the interior of a rectangle
- From: "Mike Williams" <mikea@xxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Mar 2007 19:31:45 -0000
"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in message news:unvZQFyaHHA.596@xxxxxxxxxxxxxxxxxxxxxxx
.. . . still not sure whether you're agreeing with me or disagreeing with me there, Rick. My latest post was in response to a statement by Steve in which he implied that what I had said earlier about the VB Line method and / or the API Rectangle method was incorrect. Just to make sure we're talking about the same thing, here is what I first posted on the subject a few days ago:
You also need to take into account which method you are using to draw
your stuff, and in some cases you need to do that for all lines, even single pixel lines. This is because the VB methods do not in all cases produce
the exact same effect as the equivalent API methods. For example, if you
are using a single pixel line thickness and you draw a rectangle using the
VB Line method with coordinates (100,100) - (200,200) you will not
get exactly the same sized rectangle as you would get if you instead
drew it using the API Rectangle method with exactly the same
(100,100) - (200,200) coordinates. The "VB drawn" rectangle would
be one pixel wider and one pixel higher than the "API drawn" rectangle,
because VB draws "up to and including" the second set of coordinates
whereas the API draws "up to but excluding" the second set of coordinates.
In his latest post, Steve seems to think that what I said then was incorrect, and I think Steve is wrong on that point. All my tests at this end point to the fact that it works in exactly the way I stated. That is why I posted the code in my last post, so that you (and perhaps Steve) can run that code (the code that draws the two small rectangles) for me at your end to confirm that it actually works in the way I have said.
Mike
.
- Follow-Ups:
- Re: Calculate the interior of a rectangle
- From: Rick Rothstein \(MVP - VB\)
- Re: Calculate the interior of a rectangle
- References:
- Calculate the interior of a rectangle
- From: Steve
- Re: Calculate the interior of a rectangle
- From: Steve
- Re: Calculate the interior of a rectangle
- From: Rick Rothstein \(MVP - VB\)
- Re: Calculate the interior of a rectangle
- From: Steve
- Re: Calculate the interior of a rectangle
- From: Rick Rothstein \(MVP - VB\)
- Re: Calculate the interior of a rectangle
- From: Steve
- Re: Calculate the interior of a rectangle
- From: Rick Rothstein \(MVP - VB\)
- Re: Calculate the interior of a rectangle
- From: Rick Rothstein \(MVP - VB\)
- Calculate the interior of a rectangle
- Prev by Date: VBsight GradFrameCTL error in VB ide
- Next by Date: Re: VBsight GradFrameCTL error in VB ide
- Previous by thread: Re: Calculate the interior of a rectangle
- Next by thread: Re: Calculate the interior of a rectangle
- Index(es):
Relevant Pages
|