48 |
if layout == None: |
if layout == None: |
49 |
layout = pscv.getLayout(anchorSpan.getScrollBlock()) |
layout = pscv.getLayout(anchorSpan.getScrollBlock()) |
50 |
# For now, we'll just squish to fit |
# For now, we'll just squish to fit |
51 |
layout.placeBoxed(vs, into, .2, 40) |
layout.placeBoxed(vs, into, .3, 100) |
52 |
|
|
53 |
return into |
return into |
54 |
|
|
55 |
class AnchorPageSpanNodeType(AbstractPageSpanNodeType): |
class AnchorPageSpanNodeType(AbstractPageSpanNodeType): |
56 |
def renderBuoy(self, vs, into, linkId, anchorSpan, layout): |
def renderBuoy(self, vs, into, linkId, anchorSpan, layout): |
57 |
if 1: |
if 0: |
58 |
dbg1 = vs.unitSqCS(into, "U") |
dbg1 = vs.unitSqCS(into, "U") |
59 |
vs.put(coloredQuad((1,0,0)), dbg1) |
vs.put(coloredQuad((1,0,0)), dbg1) |
60 |
|
|
80 |
-extents[1] * scale, scale, scale) |
-extents[1] * scale, scale, scale) |
81 |
|
|
82 |
irregu = gfx.libutil.effects.IrreguFrame(0, 0, layout.w, layout.h, |
irregu = gfx.libutil.effects.IrreguFrame(0, 0, layout.w, layout.h, |
83 |
.05, .25, type="square") |
.5, .25, type="square") |
84 |
# irregu = gfx.libutil.effects.IrreguFrame(-100, -100, 100*layout.w, 100*layout.h, |
# irregu = gfx.libutil.effects.IrreguFrame(-100, -100, 100*layout.w, 100*layout.h, |
85 |
# .05, .25, type="square") |
# .05, .25, type="square") |
86 |
|
|
95 |
vs.map.put(irregu.content, paperCS, paperLoc) |
vs.map.put(irregu.content, paperCS, paperLoc) |
96 |
class LayoutR(java.lang.Runnable): |
class LayoutR(java.lang.Runnable): |
97 |
def run(rself): |
def run(rself): |
98 |
layout.place(vs, paperCS, .6, 100, into) |
layout.place(vs, paperCS, .6, 200, into) |
99 |
|
|
100 |
gzz.gfx.gl.Stencil.drawStenciled(vs, ContentR(), None, FrameR(), LayoutR(), 1) |
gzz.gfx.gl.Stencil.drawStenciled(vs, ContentR(), None, FrameR(), LayoutR(), 1) |
101 |
|
|
152 |
|
|
153 |
# XXX This is not right: the distortion |
# XXX This is not right: the distortion |
154 |
# should be done here. |
# should be done here. |
155 |
self.layout.place(vs, self.shift, .7, 150) |
self.layout.place(vs, self.shift, .7, 300) |
156 |
|
|
157 |
if self.nodetype.scrollBlockLinker.enfiladeOverlap != None: |
if self.nodetype.scrollBlockLinker.enfiladeOverlap != None: |
158 |
matches = (self.nodetype.scrollBlockLinker |
matches = (self.nodetype.scrollBlockLinker |
198 |
# print "Ev: ",size[0], size[1], size[2] |
# print "Ev: ",size[0], size[1], size[2] |
199 |
# print "Self.xy was",self.x,self.y |
# print "Self.xy was",self.x,self.y |
200 |
oldVS.coords.transformPoints3(self.shift, size, tmp) |
oldVS.coords.transformPoints3(self.shift, size, tmp) |
201 |
# print "Retransformed:", tmp[0], tmp[1], tmp[2] |
print "Retransformed:", tmp[0], tmp[1], tmp[2] |
202 |
x = size[0] |
x = size[0] |
203 |
y = size[1] |
y = size[1] |
204 |
if x < 0: x = 0 |
if x < 0: x = 0 |