34 |
|
|
35 |
from org.fenfire.test.gfx import * |
from org.fenfire.test.gfx import * |
36 |
|
|
|
class DummyMill(vob.gl.PaperMill): |
|
|
def __init__(self, pap): |
|
|
self.pap = pap |
|
|
def getPaper(self, seed): |
|
|
return self.pap |
|
|
|
|
37 |
def testRenderClick(): |
def testRenderClick(): |
38 |
"""Test that rendering a canvas works right and |
"""Test that rendering a canvas works right and |
39 |
that we get a click. |
that we get a click. |
65 |
|
|
66 |
canvasView2D = ff.view.CanvasView2D(fen, textnodeview) |
canvasView2D = ff.view.CanvasView2D(fen, textnodeview) |
67 |
|
|
68 |
paperView2D = ff.view.PaperView2D(canvasView2D) |
paperView2D = ff.view.PaperView2D( |
69 |
paperView2D.paperMill = DummyMill( |
ff.functional.ConstantFunction( |
70 |
vob.gl.SpecialPapers.solidPaper(Color.yellow) |
vob.gl.SpecialPapers.solidPaper(Color.yellow) |
71 |
) |
), |
72 |
|
canvasView2D) |
73 |
paperView2D.paperScaling = 1 |
paperView2D.paperScaling = 1 |
74 |
|
|
75 |
irregu2D = ff.view.IrregularViewportView2D(paperView2D) |
irregu2D = ff.view.IrregularViewportView2D(paperView2D) |