5 |
from gfx.libutil import effects |
from gfx.libutil import effects |
6 |
import gzz |
import gzz |
7 |
import java |
import java |
8 |
|
from jarray import zeros |
9 |
|
|
10 |
papermill = gfx.libpaper.papermill.ThePaperMill() |
papermill = gfx.libpaper.papermill.ThePaperMill() |
11 |
|
|
137 |
cliprect = None, |
cliprect = None, |
138 |
fancy = 1, |
fancy = 1, |
139 |
showTessel = 0): |
showTessel = 0): |
140 |
|
self.papercoordsys = cs1into |
141 |
|
self.cliprect = cliprect |
142 |
key = self.cell.getId() |
key = self.cell.getId() |
143 |
# The height in coords |
# The height in coords |
144 |
papers = self.pap |
papers = self.pap |
214 |
return ( |
return ( |
215 |
page * self.scaledsheetsize[0] + self.scale * pointx/72.0/6, self.scale * pointy/72.0/6 |
page * self.scaledsheetsize[0] + self.scale * pointx/72.0/6, self.scale * pointy/72.0/6 |
216 |
) |
) |
217 |
|
def hitClip(self, coords, point3, cliprect): |
218 |
|
src = zeros(3, 'f') # assume only one point |
219 |
|
coords.inverseTransformPoints3(self.papercoordsys, point3, src) |
220 |
|
x = src[0] |
221 |
|
y = src[1] |
222 |
|
print "hitclip: ",point3, src, x, y |
223 |
|
if not cliprect: |
224 |
|
cliprect = (0, 0, self.scaledsize, 1) |
225 |
|
if cliprect[0] < x < cliprect[2] and cliprect[1] < y < cliprect[3]: |
226 |
|
return (x,y) |
227 |
|
return None |
228 |
|
|
229 |
|
|
230 |
class KEY: pass |
class KEY: pass |
231 |
|
|