21 |
} |
} |
22 |
private Paper paper; |
private Paper paper; |
23 |
private GLRen.FixedPaperQuad pq; |
private GLRen.FixedPaperQuad pq; |
24 |
|
|
25 |
public AreaSelectingView2D(View2D child) { |
public AreaSelectingView2D(View2D child) { |
26 |
|
this(child, null); |
27 |
|
} |
28 |
|
public AreaSelectingView2D(View2D child, java.awt.Color color) { |
29 |
this.child = child; |
this.child = child; |
30 |
setArea(0,0,0,0); |
setArea(0,0,0,0); |
31 |
|
|
32 |
paper = SpecialPapers.solidPaper(java.awt.Color.red); |
paper = SpecialPapers.selectionPaper(color); |
33 |
pq = GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10); |
pq = GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10); |
34 |
} |
} |
35 |
|
|
36 |
public void render(VobScene vs, Object plane, |
public void render(VobScene vs, Object plane, |
37 |
int matchingParent, |
int matchingParent, |
38 |
int box2screen, int box2paper) { |
int box2screen, int box2paper) { |
|
int cs = vs.orthoCS(box2paper, "foo", 0, x0,y0,x1,y1); |
|
|
vs.put(pq, cs); |
|
39 |
|
|
40 |
if(child != null) |
if(child != null) |
41 |
child.render(vs, plane, matchingParent, |
child.render(vs, plane, matchingParent, |
42 |
box2screen, box2paper); |
box2screen, box2paper); |
43 |
|
|
44 |
|
int paper2box = vs.invertCS(box2paper, "areaselectview_INv"); |
45 |
|
int paper2screen = vs.concatCS(box2screen, "areaselectview_conc", |
46 |
|
paper2box); |
47 |
|
int cs = vs.orthoCS(paper2screen, "selection", 0, x0,y0,x1,y1); |
48 |
|
vs.put(pq, cs); |
49 |
|
|
50 |
} |
} |
51 |
|
|
52 |
|
|