Home » U++ Library support » U++ Library : Other (not classified elsewhere) » RectTracker & MaxRect
RectTracker & MaxRect [message #17960] |
Thu, 04 September 2008 21:18 |
Dochy
Messages: 2 Registered: September 2008 Location: Czech rep.
|
Junior Member |
|
|
Hi,
I have problem with RectTracker. I used RectTracker with ALIGN_NULL for user-specific begin of drawing rect. I want to mark part of drawn image. MaxRect is good for limit to bottom and to right, but top and left coordinates aren't limited.
So in view with borders (0,0,10,10) i can't get rect (5,5,20,20) but only (5,5,10,10) - I expected it and want it
But I can get (-10,-10,5,5) - if (5,5) is origin - and I don't want this .
Am I wrong or there is error?
Thanks
I naturaly can check and handle it, but I think that there must be better way
void LeftDown(Point p, dword keyflags){
// Vyrez z obrazku
RectTracker tr(*this);
Size sz = GetSize();
tr.Dashed().Animation(40).MaxRect(RectC(0,0,GetSize().cx,GetSize().cy));
vyrez=RectC(p.x,p.y,0,0);
vyrez=tr.Track(vyrez,ALIGN_NULL,ALIGN_NULL);
Refresh();
};
Edit:
I made modified copy of RectTracker class, that correspond to my need now. But I think that this class (RectTracker) schould be modified or there can be made a new class for clearly defined pixel based operations. Maybe someday I try it. Now I'm beginner only
[Updated on: Sat, 06 September 2008 10:35] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed Jun 05 08:40:48 CEST 2024
Total time taken to generate the page: 0.02250 seconds
|