mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-16 19:21:52 +00:00
Fixed #1678 Miter join
This commit is contained in:
@@ -37,6 +37,7 @@ All notable changes to this project will be documented in this file.
|
||||
- [#1846] blend modes with alpha
|
||||
- Raw editor does not select item in enum list
|
||||
- Sound not played on frames
|
||||
- [#1678] Miter join
|
||||
|
||||
### Changed
|
||||
- Full path inside bundle is displayed as SWF name instead simple name
|
||||
@@ -2567,6 +2568,7 @@ All notable changes to this project will be documented in this file.
|
||||
[#1863]: https://www.free-decompiler.com/flash/issues/1863
|
||||
[#1865]: https://www.free-decompiler.com/flash/issues/1865
|
||||
[#1846]: https://www.free-decompiler.com/flash/issues/1846
|
||||
[#1678]: https://www.free-decompiler.com/flash/issues/1678
|
||||
[#1414]: https://www.free-decompiler.com/flash/issues/1414
|
||||
[#1755]: https://www.free-decompiler.com/flash/issues/1755
|
||||
[#1460]: https://www.free-decompiler.com/flash/issues/1460
|
||||
@@ -2643,7 +2645,6 @@ All notable changes to this project will be documented in this file.
|
||||
[#1671]: https://www.free-decompiler.com/flash/issues/1671
|
||||
[#1672]: https://www.free-decompiler.com/flash/issues/1672
|
||||
[#1677]: https://www.free-decompiler.com/flash/issues/1677
|
||||
[#1678]: https://www.free-decompiler.com/flash/issues/1678
|
||||
[#1665]: https://www.free-decompiler.com/flash/issues/1665
|
||||
[#1661]: https://www.free-decompiler.com/flash/issues/1661
|
||||
[#1435]: https://www.free-decompiler.com/flash/issues/1435
|
||||
|
||||
@@ -440,7 +440,7 @@ public class BitmapExporter extends ShapeExporterBase {
|
||||
|
||||
if (joinStyle == BasicStroke.JOIN_MITER) {
|
||||
lineStroke = new BasicStroke((float) thickness, capStyle, joinStyle, miterLimit);
|
||||
//lineStroke = new MiterClipBasicStroke((BasicStroke) lineStroke);
|
||||
lineStroke = new MiterClipBasicStroke((BasicStroke) lineStroke);
|
||||
} else {
|
||||
lineStroke = new BasicStroke((float) thickness, capStyle, joinStyle);
|
||||
}
|
||||
|
||||
@@ -151,12 +151,12 @@ public class MiterClipBasicStroke implements Stroke {
|
||||
}
|
||||
|
||||
for (int i = 0; i < vectors.size() - 1; i++) {
|
||||
if (offPath.get(i)) {
|
||||
if (offPath.get(i) || offPath.get(i + 1)) {
|
||||
continue;
|
||||
}
|
||||
Vector u = vectors.get(i).transform(t);
|
||||
Vector v = vectors.get(i + 1).transform(t);
|
||||
|
||||
|
||||
float parallelSign = 1;
|
||||
float dx = u.x2 - u.x1;
|
||||
float dy = u.y2 - u.y1;
|
||||
@@ -194,23 +194,15 @@ public class MiterClipBasicStroke implements Stroke {
|
||||
intersectX = perp2.x1;
|
||||
float line_a = (perp1.y2 - perp1.y1) / (perp1.x2 - perp1.x1);
|
||||
float line_c = perp1.y1 - line_a * perp1.x1;
|
||||
intersectY = line_a * intersectX + line_c;
|
||||
} else if (perp1.y1 == perp1.y2) {
|
||||
intersectY = perp1.y1;
|
||||
float line_b = (perp2.y2 - perp2.y1) / (perp2.x2 - perp2.x1);
|
||||
float line_d = perp2.y1 - line_b * perp2.x1;
|
||||
intersectX = (intersectY - line_d) / line_b;
|
||||
} else if (perp2.y1 == perp2.y2) {
|
||||
intersectY = perp2.y1;
|
||||
float line_a = (perp1.y2 - perp1.y1) / (perp1.x2 - perp1.x1);
|
||||
float line_c = perp1.y1 - line_a * perp1.x1;
|
||||
intersectX = intersectY - line_c / line_a;
|
||||
} else {
|
||||
intersectY = line_a * intersectX + line_c;
|
||||
} else {
|
||||
//y = a x + c
|
||||
float line_a = (perp1.y2 - perp1.y1) / (perp1.x2 - perp1.x1);
|
||||
float line_c = perp1.y1 - line_a * perp1.x1;
|
||||
//y = b x + d
|
||||
float line_b = (perp2.y2 - perp2.y1) / (perp2.x2 - perp2.x1);
|
||||
float line_d = perp2.y1 - line_b * perp2.x1;
|
||||
|
||||
float line_d = perp2.y1 - line_b * perp2.x1;
|
||||
|
||||
intersectX = (line_d - line_c) / (line_a - line_b);
|
||||
intersectY = line_a * intersectX + line_c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user