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   |
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 . 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
|
|
|
 |
|
RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mirek on Wed, 13 February 2008 08:44
|
 |
|
Re: RectTracker filled with black
By: mrjt on Wed, 13 February 2008 12:13
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mrjt on Wed, 20 February 2008 10:55
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mrjt on Wed, 20 February 2008 14:13
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mrjt on Wed, 20 February 2008 14:52
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mirek on Tue, 26 February 2008 21:13
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mrjt on Fri, 29 February 2008 15:20
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mirek on Mon, 03 March 2008 20:48
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
|
 |
|
Re: RectTracker filled with black
By: mirek on Sat, 22 March 2008 20:33
|
 |
|
Re: RectTracker filled with black
By: mirek on Wed, 20 February 2008 13:57
|
Goto Forum:
Current Time: Mon May 12 01:12:50 CEST 2025
Total time taken to generate the page: 0.00451 seconds
|