Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ public virtual void TSpanTextAnchorFunctionalTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "textspan-textAnchor");
}

//Text-anchor test using transform attribute for X position
[NUnit.Framework.Test]
public virtual void TSpanTextAnchorTransformFunctionalTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "textspan-textAnchor-transform");
}

[NUnit.Framework.Test]
//TODO: update after DEVSIX-2507 and DEVSIX-3005 fix
[LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,11 @@ internal virtual float GetTextAnchorAlignmentCorrection(float childContentLength
String textAnchorValue = this.GetAttribute(SvgConstants.Attributes.TEXT_ANCHOR);
// Middle
if (SvgConstants.Values.TEXT_ANCHOR_MIDDLE.Equals(textAnchorValue)) {
if (xPos != null && xPos.Length > 0) {
textAnchorXCorrection -= childContentLength / 2;
}
textAnchorXCorrection -= childContentLength / 2;
}
// End
if (SvgConstants.Values.TEXT_ANCHOR_END.Equals(textAnchorValue)) {
if (xPos != null && xPos.Length > 0) {
textAnchorXCorrection -= childContentLength;
}
textAnchorXCorrection -= childContentLength;
}
}
return textAnchorXCorrection;
Expand Down