Skip to content

Commit 416d572

Browse files
ars18wrwitext-teamcity
authored andcommitted
Consider margins while border-radius processing.
DEVSIX-1717 Autoported commit. Original commit hash: [899d2966e]
1 parent a30527d commit 416d572

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

itext/itext.layout/itext/layout/renderer/AbstractRenderer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,11 +841,11 @@ public virtual void DrawBorder(DrawContext drawContext) {
841841
if (isTagged) {
842842
canvas.OpenTag(new CanvasArtifact());
843843
}
844-
bool isAreaClipped = ClipBorderArea(drawContext, ApplyMargins(occupiedArea.GetBBox().Clone(), GetMargins()
845-
, false));
844+
Rectangle borderRect = ApplyMargins(occupiedArea.GetBBox().Clone(), GetMargins(), false);
845+
bool isAreaClipped = ClipBorderArea(drawContext, borderRect);
846846
BorderRadius[] borderRadii = GetBorderRadii();
847-
float[] verticalRadii = CalculateRadii(borderRadii, occupiedArea.GetBBox(), false);
848-
float[] horizontalRadii = CalculateRadii(borderRadii, occupiedArea.GetBBox(), true);
847+
float[] verticalRadii = CalculateRadii(borderRadii, borderRect, false);
848+
float[] horizontalRadii = CalculateRadii(borderRadii, borderRect, true);
849849
if (borders[0] != null) {
850850
if (0 != horizontalRadii[0] || 0 != verticalRadii[0] || 0 != horizontalRadii[1] || 0 != verticalRadii[1]) {
851851
borders[0].Draw(canvas, x1, y2, x2, y2, horizontalRadii[0], verticalRadii[0], horizontalRadii[1], verticalRadii

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7cb1896c4e9c2e6f5370eac2ca106ea6fc2515eb
1+
899d2966ee00f8d2a6014855ad65136e29b54e39

0 commit comments

Comments
 (0)