XFA - Don't display invisible rectangle borders
- partial fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1716980.
This commit is contained in:
parent
248efb16a7
commit
d76f11a0ce
@ -181,7 +181,9 @@ class Arc extends XFAObject {
|
||||
} else {
|
||||
style.fill = "transparent";
|
||||
}
|
||||
style.strokeWidth = measureToString(Math.round(edge.thickness));
|
||||
style.strokeWidth = measureToString(
|
||||
edge.presence === "visible" ? Math.round(edge.thickness) : 0
|
||||
);
|
||||
style.stroke = edgeStyle.color;
|
||||
let arc;
|
||||
const attributes = {
|
||||
@ -2951,16 +2953,18 @@ class Line extends XFAObject {
|
||||
const edge = this.edge ? this.edge : new Edge({});
|
||||
const edgeStyle = edge[$toStyle]();
|
||||
const style = Object.create(null);
|
||||
style.strokeWidth = measureToString(Math.round(edge.thickness));
|
||||
const thickness =
|
||||
edge.presence === "visible" ? Math.round(edge.thickness) : 0;
|
||||
style.strokeWidth = measureToString(thickness);
|
||||
style.stroke = edgeStyle.color;
|
||||
let x1, y1, x2, y2;
|
||||
let width = "100%";
|
||||
let height = "100%";
|
||||
|
||||
if (parent.w <= edge.thickness) {
|
||||
if (parent.w <= thickness) {
|
||||
[x1, y1, x2, y2] = ["50%", 0, "50%", "100%"];
|
||||
width = style.strokeWidth;
|
||||
} else if (parent.h <= edge.thickness) {
|
||||
} else if (parent.h <= thickness) {
|
||||
[x1, y1, x2, y2] = [0, "50%", "100%", "50%"];
|
||||
height = style.strokeWidth;
|
||||
} else {
|
||||
@ -3801,7 +3805,9 @@ class Rectangle extends XFAObject {
|
||||
} else {
|
||||
style.fill = "transparent";
|
||||
}
|
||||
style.strokeWidth = measureToString(2 * edge.thickness);
|
||||
style.strokeWidth = measureToString(
|
||||
edge.presence === "visible" ? 2 * edge.thickness : 0
|
||||
);
|
||||
style.stroke = edgeStyle.color;
|
||||
|
||||
const corner = this.corner.children.length
|
||||
|
Loading…
x
Reference in New Issue
Block a user