|
-
April 26th, 1999, 06:32 AM
#1
rect size problem
In OnLButtonDown(...) I got CPoint p1.
In OnMouseMove(...) I got CPoint p2.
Then I have a rect CRect rect(p1.x,p1.y,p2.x,p2.y).
I think the size of rect should be:
width=p2.x-p1.x+1
height=p2.y-p1.y+1
but rect.Width()=p2.x-p1.x while rect.Height()=p2.y-p1.y
What's the problem?
If I want to get the bitmap covered by the rect,
what about the size of bitmap? rect.Height() or
rect.Height()+1? The start point and end point of
bitmap?
Thanks,
-
April 27th, 1999, 01:50 AM
#2
Re: rect size problem
one point .... (3,4)
another point ..... (10,7)
above points are diagonal point of rectangle
What is the Surface?
Surface = width * height;
so Surface = (10-3)*(7-4),
not Surface = (10-3+1)*(7-4+1),
I don't know. sorry.!
by nfuox
-
April 27th, 1999, 08:15 AM
#3
Re: rect size problem
Is the diagonal point of the Surface (3,4) and (10-1,7-1)?
Thanks for your reply,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|