Skip to content

Commit 9efeb7d

Browse files
committed
Fixed: #2345 items smaller than 20 twips were not drawn - caused PDF problems - now ceil is used
1 parent 506cb11 commit 9efeb7d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
1212
- [#2344] Export to FLA CS4 and below with more than 255 library items,
1313
bitmap fills or frame duration
1414
- [#2341] FLA export - linkage and imported fonts do not work correctly
15+
- [#2345] items smaller than 20 twips were not drawn - caused PDF problems - now ceil is used
1516

1617
## [21.1.1] - 2024-10-13
1718
### Added
@@ -3616,6 +3617,7 @@ Major version of SWF to XML export changed to 2.
36163617
[alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7
36173618
[#2344]: https://www.free-decompiler.com/flash/issues/2344
36183619
[#2341]: https://www.free-decompiler.com/flash/issues/2341
3620+
[#2345]: https://www.free-decompiler.com/flash/issues/2345
36193621
[#2321]: https://www.free-decompiler.com/flash/issues/2321
36203622
[#2305]: https://www.free-decompiler.com/flash/issues/2305
36213623
[#2328]: https://www.free-decompiler.com/flash/issues/2328

libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1100,10 +1100,10 @@ private void drawDrawable(SWF swf, Matrix strokeTransform, DepthState layer, Mat
11001100

11011101
boolean canUseSameImage = true;
11021102
if (img == null) {
1103-
int newWidth = (int) (rect.getWidth() / SWF.unitDivisor);
1104-
int newHeight = (int) (rect.getHeight() / SWF.unitDivisor);
1105-
int deltaX = (int) (rect.xMin / SWF.unitDivisor);
1106-
int deltaY = (int) (rect.yMin / SWF.unitDivisor);
1103+
int newWidth = (int) Math.ceil(rect.getWidth() / SWF.unitDivisor);
1104+
int newHeight = (int) Math.ceil(rect.getHeight() / SWF.unitDivisor);
1105+
int deltaX = (int) Math.ceil(rect.xMin / SWF.unitDivisor);
1106+
int deltaY = (int) Math.ceil(rect.yMin / SWF.unitDivisor);
11071107
newWidth = Math.min(image.getWidth() - deltaX, newWidth);
11081108
newHeight = Math.min(image.getHeight() - deltaY, newHeight);
11091109

0 commit comments

Comments
 (0)