|
From: Darius K. <d.k...@gm...> - 2009-08-12 10:04:55
|
Hi,
I am writing jython application with eclipse SWT/JFace. I have to pass float
array to java object to get back some values from it. I am using jarray
package for it. Is there more pythonic way to do it?
--->8 code 8<---
bounds = zeros(4, 'f')
# from java org.eclipse.swt.graphics.Path.getBounds(float[] bounds)
path.getBounds(bounds)
# from java org.eclipse.swt.graphics.Rectangle(int x, int y, int
width,int height)
rect = Rectangle(int(round(bounds[0])),
int(round(bounds[1])),
int(round(bounds[2])),
int(round(bounds[3])))
--->8 code 8<---
Thanks in advance!
--
Best Regards
Darius Kučinskas
[http://blog-of-darius.blogspot.com/]
|