On Tue, May 27, 2014 at 2:22 AM, Farrukh <[email protected]> wrote:
> I am using FloatCanvas. I am adding "FloatCanvas.Rectangle" and for points
> i m using onDown and onUp. but i m confused that for example consider a
> rectangle on canvas of (-700, 785), (w=400, h=200 ) and i want subtract a
> rectangle (-392, 472), (w=150, h=50). i can perform mathematical result but
> what i cant do is how display this on canvas.
I'm not sure I understand what you mean by "subtract" a rectangle. But if
you mean you want to display the geometric intersection, or something like
this (probably only look right with a fixed-width font):
----------
| |
| |
----------- |
| |
| |
--------------------
Then you'll need to compute the corners yourself, and use a Polygon object
to display in on the Canvas.
Note that if you have much to do of that sort, you may want to use a
geometry library, like shapely, for instance.
-Chris
> can you please guide me in the right direction. i will be grateful for
> your help.
>
> Farrukh
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
>
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[email protected]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas