64 |
Object plane = p.first; |
Object plane = p.first; |
65 |
Rectangle rect = (Rectangle)p.second; |
Rectangle rect = (Rectangle)p.second; |
66 |
|
|
|
/** |
|
67 |
float[] tmp = new float[2]; |
float[] tmp = new float[2]; |
68 |
vs.coords.getSqSize(into, tmp); |
vs.coords.getSqSize(into, tmp); |
69 |
float w = tmp[0], h = tmp[1]; |
float w = tmp[0], h = tmp[1]; |
70 |
pa("rect "+rect+" coords "+w+","+h); |
pa("rect "+rect+" coords "+w+","+h); |
71 |
**/ |
|
72 |
|
float scale = w / rect.width; |
73 |
|
if(scale < h / rect.height) scale = h / rect.height; |
74 |
|
|
75 |
int box2paper = vs.coords.orthoBox(0, 0, rect.x, rect.y, |
int box2paper = vs.coords.orthoBox(0, 0, rect.x, rect.y, |
76 |
1, 1, rect.width, rect.height); |
scale, scale, |
77 |
|
w, h); |
78 |
|
vs.matcher.add(into, box2paper, "BUOYPAP"); |
79 |
|
|
80 |
view.render(vs, plane, into, into, box2paper); |
view.render(vs, plane, into, into, box2paper); |
81 |
return vs.coords.translate(into, rect.width/2f, rect.height/2f); |
return vs.coords.translate(into, w/2f, h/2f); |
82 |
} |
} |
83 |
|
|
84 |
public BuoyViewMainNode createMainNode(Object linkId, |
public BuoyViewMainNode createMainNode(Object linkId, |