77 |
if(!foundCenter && center != null && center.intersects(pages[p])) { |
if(!foundCenter && center != null && center.intersects(pages[p])) { |
78 |
foundCenter = true; |
foundCenter = true; |
79 |
Point l_c = center.getLocation(); // XXX Center? |
Point l_c = center.getLocation(); // XXX Center? |
80 |
|
Dimension d_c = center.getSize(); // XXX Center? |
81 |
|
|
82 |
xoffs = w + scale * (psps[p].getX(l_c.x) - xywh[4*p + 0]); |
xoffs = w + scale * (psps[p].getX(l_c.x + .5f * d_c.width) - xywh[4*p + 0]); |
83 |
yoffs = scale * (psps[p].getY(l_c.y) - xywh[4*p + 1]); |
yoffs = scale * (psps[p].getY(l_c.y + .5f * d_c.height) - xywh[4*p + 1]); |
84 |
|
if(dbg) pa("Center found: "+p+" "+pages[p]+" "+ |
85 |
|
xoffs + " " + yoffs); |
86 |
|
|
87 |
} |
} |
88 |
w += scale * xywh[4*p + 2]; |
w += scale * xywh[4*p + 2]; |