1 |
//(c): Matti Katila |
//(c): Matti Katila, Tuomas J. Lukka |
2 |
|
|
3 |
package gzz.modules.pp2; |
package gzz.modules.pp2; |
4 |
import gzz.modules.pp.*; |
import gzz.modules.pp.*; |
31 |
return paper; |
return paper; |
32 |
} |
} |
33 |
|
|
34 |
public static SinglePaper i(ViewContext vc, PPDims d, GraphicsAPI.Window win) { |
/** Get instance |
35 |
i().set(vc,d, win); |
*/ |
36 |
|
public static SinglePaper i(ViewContext vc, PPDims d, GraphicsAPI.Window win, Cell current) { |
37 |
|
i().set(vc,d, win,current); |
38 |
return i(); |
return i(); |
39 |
} |
} |
40 |
|
|
41 |
public void set(ViewContext vc, PPDims d, GraphicsAPI.Window win) { |
/** Set the instance. This is usually made with i() method. |
42 |
|
*/ |
43 |
|
public void set(ViewContext vc, PPDims d, GraphicsAPI.Window win, Cell current) { |
44 |
this.context = vc; |
this.context = vc; |
45 |
((AbstractViewContext)context).setCellView(cellview); |
((AbstractViewContext)context).setCellView(cellview); |
46 |
this.d = d; |
this.d = d; |
47 |
this.coordinatePlaneView = new CoordinatePlaneView(d.contains, d.pan); |
this.coordinatePlaneView = new CoordinatePlaneView(d.contains, d.pan); |
48 |
this.window = win; |
this.window = win; |
49 |
|
this.current = current; |
50 |
} |
} |
51 |
|
|
52 |
|
|
55 |
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")); |
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")); |
56 |
private PPDims d; |
private PPDims d; |
57 |
private ViewContext context; |
private ViewContext context; |
58 |
|
private Cell current; |
59 |
|
|
60 |
|
|
61 |
|
|
117 |
final int bg2screen = vs.scaleCS(paper2screen, "BGSCA", |
final int bg2screen = vs.scaleCS(paper2screen, "BGSCA", |
118 |
bgscale, bgscale); |
bgscale, bgscale); |
119 |
|
|
120 |
final Cell cursor = context.getAccursed(); |
final Cell cursor = current; |
121 |
final Cell plane = cursor.h(d.contains); |
final Cell plane = cursor.h(d.contains); |
122 |
|
|
123 |
// BgVob takes two coordsys: |
// BgVob takes two coordsys: |
153 |
// vs.map.put(bg, frameUnit, bg2screen); |
// vs.map.put(bg, frameUnit, bg2screen); |
154 |
bg.put(vs, frameUnit, bg2screen); |
bg.put(vs, frameUnit, bg2screen); |
155 |
vs.map.put(black); |
vs.map.put(black); |
156 |
coordinatePlaneView.render(vs, paper2screen_shifted, context, frameCS); |
coordinatePlaneView.render(vs, paper2screen_shifted, |
157 |
|
context, frameCS, current); |
158 |
}}; |
}}; |
159 |
|
|
160 |
if(useStencil) |
if(useStencil) |