DefineJPEG3 tag reading fix, Caching Shape outline, zoom to fit fixed, shape caching

This commit is contained in:
honfika@gmail.com
2014-11-06 23:33:42 +01:00
parent b51fdfb6a9
commit 660520f44b
8 changed files with 28 additions and 10 deletions

View File

@@ -406,7 +406,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
}
@Override
public void zoomToFit() {
public double getZoomToFit() {
if (timelined instanceof BoundedTag) {
RECT bounds = ((BoundedTag) timelined).getRect(new HashSet<BoundedTag>());
double w1 = bounds.getWidth() / SWF.unitDivisor;
@@ -424,8 +424,10 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
} else {
w = w2;
}
zoom = (double) w / (double) w1;
return (double) w / (double) w1;
}
return 1;
}
public void setImage(byte[] data) {