Fixed: #2345 items smaller than 20 twips were not drawn - caused PDF problems - now ceil is used

This commit is contained in:
Jindra Petřík
2024-10-20 10:25:25 +02:00
parent ab7935711f
commit a489f4d1af
2 changed files with 6 additions and 4 deletions

View File

@@ -1100,10 +1100,10 @@ public class Timeline {
boolean canUseSameImage = true;
if (img == null) {
int newWidth = (int) (rect.getWidth() / SWF.unitDivisor);
int newHeight = (int) (rect.getHeight() / SWF.unitDivisor);
int deltaX = (int) (rect.xMin / SWF.unitDivisor);
int deltaY = (int) (rect.yMin / SWF.unitDivisor);
int newWidth = (int) Math.ceil(rect.getWidth() / SWF.unitDivisor);
int newHeight = (int) Math.ceil(rect.getHeight() / SWF.unitDivisor);
int deltaX = (int) Math.ceil(rect.xMin / SWF.unitDivisor);
int deltaY = (int) Math.ceil(rect.yMin / SWF.unitDivisor);
newWidth = Math.min(image.getWidth() - deltaX, newWidth);
newHeight = Math.min(image.getHeight() - deltaY, newHeight);