29 |
|
|
30 |
import java, org |
import java, org |
31 |
|
|
32 |
from org import fenfire |
from org import fenfire as ff |
33 |
import vob |
import vob |
34 |
from org.nongnu import alph |
from org.nongnu import alph |
35 |
from org.nongnu import storm |
from org.nongnu import storm |
36 |
|
|
37 |
fenfire.test.gfx.needGL() |
ff.test.gfx.needGL() |
38 |
|
|
39 |
from org.nongnu.libvob.gl import GL, GLRen, GLCache |
from org.nongnu.libvob.gl import GL, GLRen, GLCache |
40 |
|
|
101 |
|
|
102 |
z = jarray.zeros(2, "f") |
z = jarray.zeros(2, "f") |
103 |
|
|
104 |
l = fenfire.view.PageSpanLayout(enfMaker.makeEnfilade(sc.getCurrent())) |
l = ff.view.PageSpanLayout( |
105 |
|
enfMaker.makeEnfilade(sc.getCurrent()), |
106 |
|
ff.spanimages.SpanImageFactory.getDefaultInstance()) |
107 |
|
|
108 |
assertApprox(1, l.getWidth(), 2 * 595 * 75 / 72.) |
assertApprox(1, l.getWidth(), 2 * 595 * 75 / 72.) |
109 |
assertApprox(1, l.getHeight(), 842 * 75 / 72.) |
assertApprox(1, l.getHeight(), 842 * 75 / 72.) |
129 |
|
|
130 |
scaled = vs.orthoCS(0, "X", 0, 150, 150, scale, scale) |
scaled = vs.orthoCS(0, "X", 0, 150, 150, scale, scale) |
131 |
|
|
132 |
layout = fenfire.view.PageSpanLayout(enfMaker.makeEnfilade(sc.getCurrent())) |
layout = ff.view.PageSpanLayout( |
133 |
|
enfMaker.makeEnfilade(sc.getCurrent()), |
134 |
|
ff.spanimages.SpanImageFactory.getDefaultInstance()) |
135 |
layout.place(vs, scaled) |
layout.place(vs, scaled) |
136 |
|
|
137 |
gfx.render(vs) |
gfx.render(vs) |
160 |
def testSelection(): |
def testSelection(): |
161 |
"""Test that getting selection returns a good enf. |
"""Test that getting selection returns a good enf. |
162 |
""" |
""" |
163 |
pageSpanLayout = fenfire.view.PageSpanLayout(enfMaker.makeEnfilade(sc.getCurrent())) |
pageSpanLayout = ff.view.PageSpanLayout( |
164 |
|
enfMaker.makeEnfilade(sc.getCurrent()), |
165 |
|
ff.spanimages.SpanImageFactory.getDefaultInstance()) |
166 |
w = pageSpanLayout.getWidth() |
w = pageSpanLayout.getWidth() |
167 |
h = pageSpanLayout.getHeight() |
h = pageSpanLayout.getHeight() |
168 |
|
|