Button vs cursor pos fix

This commit is contained in:
Jindra Petřík
2022-12-17 12:30:20 +01:00
parent f51e46f8b9
commit ef3dccb922
12 changed files with 36 additions and 29 deletions

View File

@@ -2135,7 +2135,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
}
int dframe = time % drawableFrameCount;
Shape outline = dt.getOutline(dframe, time, ds.ratio, renderContext, Matrix.getScaleInstance(1 / SWF.unitDivisor).concatenate(m.concatenate(new Matrix(ds.matrix))), true);
Shape outline = dt.getOutline(dframe, time, ds.ratio, renderContext, Matrix.getScaleInstance(1 / SWF.unitDivisor).concatenate(m.concatenate(new Matrix(ds.matrix))), true, viewRect, zoom);
Rectangle bounds = outline.getBounds();
gg.setStroke(new BasicStroke(2.0f,
BasicStroke.CAP_BUTT,
@@ -2164,10 +2164,10 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
int dframe = time % drawableFrameCount;
//Matrix finalMatrix = Matrix.getScaleInstance(1 / SWF.unitDivisor).concatenate(m).concatenate(new Matrix(ds.matrix));
Shape outline = dt.getOutline(dframe, time, ds.ratio, renderContext, transform, true);
Shape outline = dt.getOutline(dframe, time, ds.ratio, renderContext, transform, true, viewRect, zoom);
if (temporaryMatrix != null) {
Shape tempOutline = dt.getOutline(dframe, time, ds.ratio, renderContext, temporaryMatrix, true);
Shape tempOutline = dt.getOutline(dframe, time, ds.ratio, renderContext, temporaryMatrix, true, viewRect, zoom);
gg.setStroke(new BasicStroke(1));
gg.setPaint(Color.black);
gg.draw(tempOutline);
@@ -3122,7 +3122,11 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
Matrix b = getNewMatrix().concatenate(new Matrix(ds.matrix).inverse());
int dframe = time % drawableFrameCount;
Shape outline = dt.getOutline(dframe, time, ds.ratio, renderContext, b.concatenate(new Matrix(ds.matrix)), true);
double zoomDouble = zoom.fit ? getZoomToFit() : zoom.value;
if (lowQuality) {
zoomDouble /= LQ_FACTOR;
}
Shape outline = dt.getOutline(dframe, time, ds.ratio, renderContext, b.concatenate(new Matrix(ds.matrix)), true, _viewRect, zoomDouble);
return outline.getBounds2D();
}
}