fix displaced caption labels
- use 'dy' in label bounding box
This commit is contained in:
parent
80624a5d06
commit
049751f05f
@ -516,7 +516,8 @@ public class TextRenderLayer extends BasicRenderLayer {
|
||||
|
||||
l.bbox.setNormalized(l.x, l.y, cos, -sin,
|
||||
l.width + MIN_CAPTION_DIST,
|
||||
l.text.fontHeight + MIN_CAPTION_DIST);
|
||||
l.text.fontHeight + MIN_CAPTION_DIST,
|
||||
l.text.dy);
|
||||
|
||||
boolean overlaps = false;
|
||||
|
||||
|
||||
@ -134,13 +134,18 @@ public class OBB2D {
|
||||
computeAxes();
|
||||
}
|
||||
|
||||
public void setNormalized(float cx, float cy, float vx, float vy, float width, float height) {
|
||||
public void setNormalized(float cx, float cy, float vx, float vy, float width, float height, float dy) {
|
||||
float ux = -vy;
|
||||
float uy = vx;
|
||||
|
||||
float hw = width / 2;
|
||||
float hh = height / 2;
|
||||
|
||||
if (dy != 0){
|
||||
cx += vx * dy + vy * dy;
|
||||
cy += -vy * dy + vx * dy;
|
||||
}
|
||||
|
||||
vx *= hw;
|
||||
vy *= hw;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user