56 |
public void put(VobScene vs, int coordsys) { |
public void put(VobScene vs, int coordsys) { |
57 |
int x = 0, y = 0; |
int x = 0, y = 0; |
58 |
|
|
59 |
for(int i=1; i<=length; i++) { |
for(int i=0; i<=length; i++) { |
60 |
int from = breaks[i-1]; |
int from, to; |
61 |
int to; |
|
62 |
|
if(i>0) |
63 |
|
from = breaks[i-1]; |
64 |
|
else |
65 |
|
from = 0; |
66 |
|
|
67 |
if(i<length) |
if(i<length) |
68 |
to = breaks[i]; |
to = breaks[i]; |
69 |
else |
else |
70 |
to = chain.length(); |
to = chain.length(); |
71 |
|
|
|
float h = chain.getHeight(from, to, scale); |
|
|
|
|
72 |
for(int j=from; j<to; j++) { |
for(int j=from; j<to; j++) { |
73 |
HBox box = chain.getBox(j); |
HBox box = chain.getBox(j); |
74 |
float w = box.getWidth(scale); |
float w = box.getWidth(scale); |
75 |
|
float h = box.getHeight(scale); |
76 |
Object key = box.getKey(); |
Object key = box.getKey(); |
77 |
|
|
78 |
int cs = vs.coords.coordsys(coordsys, key, 0, x, y, w, h); |
int cs = vs.coords.coordsys(coordsys, key, 0, x, y, w, h); |
82 |
} |
} |
83 |
|
|
84 |
x = 0; |
x = 0; |
85 |
y += h; |
y += chain.getHeight(from, to, scale); |
86 |
} |
} |
87 |
} |
} |
88 |
|
|
89 |
public float getHeight() { |
public float getHeight() { |
90 |
float h = 0; |
float h = 0; |
91 |
for(int i=1; i<length; i++) |
if(length > 0) { |
92 |
h += chain.getHeight(breaks[i-1], breaks[i], scale); |
h += chain.getHeight(0, breaks[0], scale); |
93 |
|
for(int i=1; i<length; i++) |
94 |
|
h += chain.getHeight(breaks[i-1], breaks[i], scale); |
95 |
|
h += chain.getHeight(breaks[length-1], chain.length(), scale); |
96 |
|
} else { |
97 |
|
h = chain.getHeight(0, chain.length(), scale); |
98 |
|
} |
99 |
|
|
100 |
return h; |
return h; |
101 |
} |
} |