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 » Draw, Display, Images, Bitmaps, Icons » RectTracker filled with black
Re: RectTracker filled with black [message #14122 is a reply to message #14120] Wed, 13 February 2008 12:13 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
DrawDragRect doesn't work properly with backwards rectangles.
...
		if(tx == ALIGN_NULL) {
			rect.right = min(org.right - op.x + p.x, maxrect.right);
			if (rect.right < rect.left) Swap(rect.left, rect.right);
		}
		if(ty == ALIGN_NULL) {
			rect.bottom = min(org.bottom - op.y + p.y, maxrect.bottom);
			if (rect.bottom < rect.top) Swap(rect.top, rect.bottom);
		}
...

KeepRatio won't work properly, but since it only works correctly with ALIGN_RIGHT/ALIGN_BOTTOM anyway I don't see this as a major problem.

For a test case just change the default behaviour in RectTracker example (ie no control keys) to ALIGN_NULL/ALIGN_NULL.

I love looking through Upp source, there is always something new and cool to find Smile. For instance, what is the purpose of ViewDraw? Could I use it to do drawing over a TopWindow full of controls? I've been looking for a way to do that for a while.

[Updated on: Wed, 13 February 2008 12:33]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I use RectTracker in a rubber-band like operation?
Next Topic: [Bug] Windows UI Refresh Missed.
Goto Forum:
  


Current Time: Mon May 12 01:12:50 CEST 2025

Total time taken to generate the page: 0.00451 seconds