diff --git a/CHANGELOG.md b/CHANGELOG.md index 62eeb70a2..d4fa72e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - [#2344] Export to FLA CS4 and below with more than 255 library items, bitmap fills or frame duration - [#2341] FLA export - linkage and imported fonts do not work correctly +- [#2345] items smaller than 20 twips were not drawn - caused PDF problems - now ceil is used ## [21.1.1] - 2024-10-13 ### Added @@ -3616,6 +3617,7 @@ Major version of SWF to XML export changed to 2. [alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7 [#2344]: https://www.free-decompiler.com/flash/issues/2344 [#2341]: https://www.free-decompiler.com/flash/issues/2341 +[#2345]: https://www.free-decompiler.com/flash/issues/2345 [#2321]: https://www.free-decompiler.com/flash/issues/2321 [#2305]: https://www.free-decompiler.com/flash/issues/2305 [#2328]: https://www.free-decompiler.com/flash/issues/2328 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java index 59a6c34dd..89423eb46 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java @@ -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);