Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » RectTracker & MaxRect
RectTracker & MaxRect [message #17960] Thu, 04 September 2008 21:18 Go to previous message
Dochy is currently offline  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 Smile
But I can get (-10,-10,5,5) - if (5,5) is origin - and I don't want this Sad .

Am I wrong or there is error?
Thanks

I naturaly can check and handle it, but I think that there must be better way Cool

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 Smile

[Updated on: Sat, 06 September 2008 10:35]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: exit() -> heap leaks detected.
Next Topic: My mistake... Sorry
Goto Forum:
  


Current Time: Sat May 11 12:06:42 CEST 2024

Total time taken to generate the page: 0.02956 seconds