Re: Overlaping of rectangles

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I see you've found the problem. There are kinds of graphics systems: those which include
the final point, and those which do not. Each has its own set of unique problems. In the
"coin toss" of the decision, Microsoft chose the non-inclusive model. I've worked in
both, and both will drive you nuts at the boundary conditions.
joe

On 8 Aug 2006 00:51:00 -0700, "Arpit" <arpitpmehta@xxxxxxxxx> wrote:

I got the answer Its because rectangle function draws rectangle one
pixel up and left than the bottom right point. Drawing must be made
taking this into consideration
Bye.

Arpit wrote:
Hi Experts Of MFC,

i m drawing rectangles for each cells
in an application of the kind of Excel spreadsheet. I want to make
appear each cell of the spreadshhet like that in excel. My problem is
when i use rectangle function I get double pixel lines due to
overlapping of lines common to neighbouring cells. I dont want this .
only one line should be drawn for sides common to adjacent rectangle.
can any one help me.

--------------------
| |
| |
____________ -> Pixel 1
--------------------- ->
Pixel 2
| |
| |
---------------------

I m using SDI Application in MFC and OnPaint of Derived
class of CWnd object.

Thanks in advance
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Overlaping of rectangles
    ... Each has its own set of unique problems. ... pixel up and left than the bottom right point. ... overlapping of lines common to neighbouring cells. ... only one line should be drawn for sides common to adjacent rectangle. ...
    (microsoft.public.vc.mfc)
  • Overlaping of rectangles
    ... in an application of the kind of Excel spreadsheet. ... overlapping of lines common to neighbouring cells. ... only one line should be drawn for sides common to adjacent rectangle. ...
    (microsoft.public.vc.mfc)
  • Re: Odd BeginRange/EndRange behavior
    ... set in advance and can then guarantee defining a useful rectangle. ... While it would be possible to do an execute with Begin/EndRange only to ... BeginRange and EndRange define ... All cells returned will fall into this rectangle. ...
    (microsoft.public.data.xmlanalysis)
  • Re: Fast and simple way to determine bounds of difference...
    ... That should help with the basic transfer of pixel data. ... rectangle of the image difference, ... Find great Windows Forms articles in Windows Forms Tips and Tricks ...
    (microsoft.public.dotnet.framework.drawing)