From e2f80d961c11784a8a7ebf74ae3502c74f9033a3 Mon Sep 17 00:00:00 2001 From: Angelina Pavlovets Date: Tue, 11 Feb 2025 09:34:25 +0000 Subject: [PATCH] Cover public API in SVG module with javadocs DEVSIX-8873 Autoported commit. Original commit hash: [ff83ae4f7] Manual files: svg/src/sharpenconfig/java/com/itextpdf/svg/SharpenConfigMapping.java --- .../impl/SvgTagSvgNodeRendererUnitTest.cs | 6 ++ .../impl/SymbolSvgNodeRendererUnitTest.cs | 6 ++ .../itext/svg/css/impl/SvgStyleResolver.cs | 26 +++++++ .../processors/impl/SvgConverterProperties.cs | 29 +++++++ .../processors/impl/font/SvgFontProcessor.cs | 12 ++- .../impl/AbstractContainerSvgNodeRenderer.cs | 1 + .../svg/renderers/impl/DefsSvgNodeRenderer.cs | 4 + .../renderers/impl/ISvgTextNodeRenderer.cs | 5 ++ .../renderers/impl/PolylineSvgNodeRenderer.cs | 14 +++- .../renderers/impl/SymbolSvgNodeRenderer.cs | 4 + .../renderers/impl/TextSvgBranchRenderer.cs | 76 +++++++++++++++++++ .../impl/TextSvgTSpanBranchRenderer.cs | 9 +++ .../svg/renderers/path/IPathShapeMapper.cs | 11 ++- .../renderers/path/impl/AbstractPathShape.cs | 46 +++++++++++ .../svg/renderers/path/impl/ClosePath.cs | 19 ++++- .../itext/svg/renderers/path/impl/CurveTo.cs | 36 ++++++++- .../itext/svg/renderers/path/impl/LineTo.cs | 19 ++++- .../itext/svg/renderers/path/impl/MoveTo.cs | 19 ++++- .../renderers/path/impl/QuadraticCurveTo.cs | 36 ++++++++- .../path/impl/QuadraticSmoothCurveTo.cs | 19 ++++- .../svg/renderers/path/impl/SmoothSCurveTo.cs | 19 ++++- port-hash | 2 +- 22 files changed, 406 insertions(+), 12 deletions(-) diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs index 359b115b0..ed874b0fa 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs @@ -64,5 +64,11 @@ public virtual void NoObjectBoundingBoxTest() { SvgTagSvgNodeRenderer renderer = new SvgTagSvgNodeRenderer(); NUnit.Framework.Assert.IsNull(renderer.GetObjectBoundingBox(null)); } + + [NUnit.Framework.Test] + public virtual void CanConstructViewPortTest() { + SvgTagSvgNodeRenderer renderer = new SvgTagSvgNodeRenderer(); + NUnit.Framework.Assert.IsTrue(renderer.CanConstructViewPort()); + } } } diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolSvgNodeRendererUnitTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolSvgNodeRendererUnitTest.cs index 949711507..972d0161d 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolSvgNodeRendererUnitTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolSvgNodeRendererUnitTest.cs @@ -30,5 +30,11 @@ public virtual void NoObjectBoundingBoxTest() { SymbolSvgNodeRenderer renderer = new SymbolSvgNodeRenderer(); NUnit.Framework.Assert.IsNull(renderer.GetObjectBoundingBox(null)); } + + [NUnit.Framework.Test] + public virtual void CanConstructViewPortTest() { + SymbolSvgNodeRenderer renderer = new SymbolSvgNodeRenderer(); + NUnit.Framework.Assert.IsTrue(renderer.CanConstructViewPort()); + } } } diff --git a/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs b/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs index 19052afb2..214fba28f 100644 --- a/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs +++ b/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs @@ -129,6 +129,14 @@ public SvgStyleResolver(INode rootNode, SvgProcessorContext context) { CollectFonts(); } + /// Resolves the font size stored inside the current element. + /// attributes map of the current element + /// + /// + /// + /// instance in order to resolve relative font size + /// + /// parent font size value public static void ResolveFontSizeStyle(IDictionary styles, SvgCssContext cssContext, String parentFontSizeStr) { String elementFontSize = styles.Get(SvgConstants.Attributes.FONT_SIZE); @@ -166,6 +174,24 @@ public static void ResolveFontSizeStyle(IDictionary styles, SvgC styles.Put(SvgConstants.Attributes.FONT_SIZE, resolvedFontSize + CommonCssConstants.PT); } + /// Checks whether element is nested within the passed parent element. + /// + /// Checks whether element is nested within the passed parent element. Nesting is checked at several levels + /// (recursively). + /// + /// + /// + /// + /// element to check + /// + /// expected parent element name + /// + /// + /// + /// if element is nested within the expected parent, + /// + /// otherwise + /// public static bool IsElementNested(IElementNode element, String parentElementNameForSearch) { if (!(element.ParentNode() is IElementNode)) { return false; diff --git a/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.cs b/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.cs index 7d404f579..d75dc0269 100644 --- a/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.cs +++ b/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.cs @@ -96,12 +96,34 @@ public virtual void SetCustomViewport(Rectangle customViewport) { this.customViewport = customViewport; } + /// Sets renderer factory. + /// + /// + /// + /// to set + /// + /// + /// this + /// + /// instance + /// public virtual iText.Svg.Processors.Impl.SvgConverterProperties SetRendererFactory(ISvgNodeRendererFactory rendererFactory) { this.rendererFactory = rendererFactory; return this; } + /// Sets font provider. + /// + /// + /// + /// to set + /// + /// + /// this + /// + /// instance + /// public virtual iText.Svg.Processors.Impl.SvgConverterProperties SetFontProvider(FontProvider fontProvider) { this.fontProvider = fontProvider; return this; @@ -116,6 +138,13 @@ public virtual String GetCharset() { return charset; } + /// Sets the character set. + /// the character set to set + /// + /// this + /// + /// instance + /// public virtual iText.Svg.Processors.Impl.SvgConverterProperties SetCharset(String charset) { this.charset = charset; return this; diff --git a/itext/itext.svg/itext/svg/processors/impl/font/SvgFontProcessor.cs b/itext/itext.svg/itext/svg/processors/impl/font/SvgFontProcessor.cs index 98ee74944..079ef1a81 100644 --- a/itext/itext.svg/itext/svg/processors/impl/font/SvgFontProcessor.cs +++ b/itext/itext.svg/itext/svg/processors/impl/font/SvgFontProcessor.cs @@ -35,8 +35,18 @@ You should have received a copy of the GNU Affero General Public License namespace iText.Svg.Processors.Impl.Font { /// Class that processes and add resolved css fonts to the FontProvider public class SvgFontProcessor { - private SvgProcessorContext context; + private readonly SvgProcessorContext context; + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// to add resolved fonts to + /// public SvgFontProcessor(SvgProcessorContext context) { this.context = context; } diff --git a/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs index 4921f45ba..a9f4baf84 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs @@ -27,6 +27,7 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Utils; namespace iText.Svg.Renderers.Impl { + /// Abstract class that will be the superclass for any element that instantiates new view port. public abstract class AbstractContainerSvgNodeRenderer : AbstractBranchSvgNodeRenderer { public override bool CanConstructViewPort() { return true; diff --git a/itext/itext.svg/itext/svg/renderers/impl/DefsSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/DefsSvgNodeRenderer.cs index ee842f326..bfb5083ec 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/DefsSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/DefsSvgNodeRenderer.cs @@ -26,6 +26,10 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Renderers; namespace iText.Svg.Renderers.Impl { + /// + /// + /// implementation for the <defs> tag. + /// public class DefsSvgNodeRenderer : AbstractBranchSvgNodeRenderer, INoDrawSvgNodeRenderer { protected internal override void DoDraw(SvgDrawContext context) { throw new NotSupportedException(SvgExceptionMessageConstant.DRAW_NO_DRAW); diff --git a/itext/itext.svg/itext/svg/renderers/impl/ISvgTextNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/ISvgTextNodeRenderer.cs index 2b30341f8..97c6ad1a9 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/ISvgTextNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/ISvgTextNodeRenderer.cs @@ -27,7 +27,12 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Utils; namespace iText.Svg.Renderers.Impl { + /// Interface for <text> and <tspan> related renderers. public interface ISvgTextNodeRenderer : ISvgNodeRenderer { + /// Gets text content length. + /// parent font size + /// current font + /// text content length [Obsolete] float GetTextContentLength(float parentFontSize, PdfFont font); diff --git a/itext/itext.svg/itext/svg/renderers/impl/PolylineSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/PolylineSvgNodeRenderer.cs index b1356aed3..56c9b9a62 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/PolylineSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/PolylineSvgNodeRenderer.cs @@ -37,16 +37,26 @@ namespace iText.Svg.Renderers.Impl { /// implementation for the <polyline> tag. /// public class PolylineSvgNodeRenderer : AbstractSvgNodeRenderer, IMarkerCapable { - /// orientation vector which is used for marker angle calculation. + /// Orientation vector which is used for marker angle calculation. private Vector previousOrientationVector = new Vector(1, 0, 0); /// /// A List of /// - /// objects representing the path to be drawn by the polyline tag + /// objects representing the path to be drawn by the polyline tag. /// protected internal IList points = new List(); + /// + /// Returns a list of + /// + /// objects representing the path to be drawn by the polyline tag. + /// + /// + /// a list of + /// + /// objects + /// protected internal virtual IList GetPoints() { return this.points; } diff --git a/itext/itext.svg/itext/svg/renderers/impl/SymbolSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/SymbolSvgNodeRenderer.cs index 68f814a75..0d185196c 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/SymbolSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/SymbolSvgNodeRenderer.cs @@ -24,6 +24,10 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Renderers; namespace iText.Svg.Renderers.Impl { + /// + /// + /// implementation for the <symbol> tag. + /// public class SymbolSvgNodeRenderer : AbstractContainerSvgNodeRenderer, INoDrawSvgNodeRenderer { public override ISvgNodeRenderer CreateDeepCopy() { SymbolSvgNodeRenderer copy = new SymbolSvgNodeRenderer(); diff --git a/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs index 8f8ac231a..5f4dec8e3 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs @@ -71,6 +71,11 @@ public class TextSvgBranchRenderer : AbstractSvgNodeRenderer, ISvgTextNodeRender private bool whiteSpaceProcessed = false; + /// + /// Creates new + /// + /// instance. + /// public TextSvgBranchRenderer() { performRootTransformations = true; moveResolved = false; @@ -90,6 +95,16 @@ internal virtual void FillCopy(iText.Svg.Renderers.Impl.TextSvgBranchRenderer co } //\endcond + /// + /// Adds a child to the current + /// + /// renderer. + /// + /// + /// + /// + /// child to add + /// public void AddChild(ISvgTextNodeRenderer child) { // Final method, in order to disallow adding null if (child != null) { @@ -97,6 +112,16 @@ public void AddChild(ISvgTextNodeRenderer child) { } } + /// + /// Retrieves a list of all children of the current + /// + /// renderer. + /// + /// + /// a list of + /// + /// children + /// public IList GetChildren() { // Final method, in order to disallow modifying the List return JavaCollectionsUtil.UnmodifiableList(children); @@ -113,6 +138,18 @@ public virtual float[] GetRelativeTranslation() { return GetRelativeTranslation(new SvgDrawContext(null, null)); } + /// Gets relative translation of the current <text> or <tspan> element. + /// + /// current + /// + /// + /// + /// float array that contains relative + /// dx + /// and + /// dy + /// translations + /// public virtual float[] GetRelativeTranslation(SvgDrawContext context) { if (!moveResolved) { ResolveRelativeTextMove(context); @@ -125,6 +162,18 @@ public virtual bool ContainsRelativeMove() { return ContainsRelativeMove(new SvgDrawContext(null, null)); } + /// Checks whether current <text> or <tspan> element contains relative position change. + /// + /// current + /// + /// + /// + /// + /// + /// is current element contains relative position, + /// + /// otherwise + /// public virtual bool ContainsRelativeMove(SvgDrawContext context) { if (!moveResolved) { ResolveRelativeTextMove(context); @@ -138,6 +187,19 @@ public virtual bool ContainsAbsolutePositionChange() { return ContainsAbsolutePositionChange(new SvgDrawContext(null, null)); } + /// Checks whether current <text> or <tspan> element contains absolute position attributes. + /// + /// + /// current + /// + /// + /// + /// + /// + /// is current element contains absolute position, + /// + /// otherwise + /// public virtual bool ContainsAbsolutePositionChange(SvgDrawContext context) { if (!posResolved) { ResolveAbsoluteTextPosition(context); @@ -149,6 +211,19 @@ public virtual float[][] GetAbsolutePositionChanges() { return GetAbsolutePositionChanges(new SvgDrawContext(null, null)); } + /// Gets absolute position of the current <text> or <tspan> element. + /// + /// current + /// + /// + /// + /// float array that contains absolute + /// x + /// and + /// y + /// positions as either single item arrays + /// or null if attribute is not present + /// public virtual float[][] GetAbsolutePositionChanges(SvgDrawContext context) { if (!posResolved) { ResolveAbsoluteTextPosition(context); @@ -156,6 +231,7 @@ public virtual float[][] GetAbsolutePositionChanges(SvgDrawContext context) { return new float[][] { xPos, yPos }; } + /// Marks white-space property as processed. public virtual void MarkWhiteSpaceProcessed() { whiteSpaceProcessed = true; } diff --git a/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs index e1146c170..c6d60d0b5 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs @@ -23,7 +23,16 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Renderers; namespace iText.Svg.Renderers.Impl { + /// + /// + /// implementation for the <tspan> tag. + /// public class TextSvgTSpanBranchRenderer : TextSvgBranchRenderer { + /// + /// Creates new + /// + /// instance. + /// public TextSvgTSpanBranchRenderer() { this.performRootTransformations = false; } diff --git a/itext/itext.svg/itext/svg/renderers/path/IPathShapeMapper.cs b/itext/itext.svg/itext/svg/renderers/path/IPathShapeMapper.cs index af93715a7..9965d85c9 100644 --- a/itext/itext.svg/itext/svg/renderers/path/IPathShapeMapper.cs +++ b/itext/itext.svg/itext/svg/renderers/path/IPathShapeMapper.cs @@ -33,12 +33,21 @@ public interface IPathShapeMapper { /// /// a /// - /// with Strings as keys and {link @ + /// with Strings as keys and /// /// implementations as values /// IDictionary GetMapping(); + /// + /// Provides a mapping of SVG path element's path-data instruction name to the appropriate number of arguments + /// for a path command, based on this passed SVG path data instruction tag. + /// + /// + /// a + /// + /// with Strings as keys and Integers as values + /// IDictionary GetArgumentCount(); } } diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs b/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs index 9bfadf237..921869776 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs @@ -50,14 +50,36 @@ public abstract class AbstractPathShape : IPathShape { protected internal SvgDrawContext context; + /// + /// Creates new + /// + /// instance. + /// public AbstractPathShape() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// boolean defining whether this is a relative operator public AbstractPathShape(bool relative) : this(relative, new DefaultOperatorConverter()) { } + /// + /// Creates new + /// + /// instance. + /// + /// boolean defining whether this is a relative operator + /// + /// + /// + /// copier for converting relative coordinates to absolute coordinates + /// public AbstractPathShape(bool relative, IOperatorConverter copier) { this.relative = relative; this.copier = copier; @@ -67,6 +89,30 @@ public virtual bool IsRelative() { return this.relative; } + /// + /// Creates + /// + /// based on provided + /// x + /// and + /// y + /// coordinates. + /// + /// + /// + /// x + /// coordinate of the point + /// + /// + /// + /// y + /// coordinate of the point + /// + /// + /// created + /// + /// instance + /// protected internal virtual Point CreatePoint(String coordX, String coordY) { return new Point((double)CssDimensionParsingUtils.ParseDouble(coordX), (double)CssDimensionParsingUtils.ParseDouble (coordY)); diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/ClosePath.cs b/itext/itext.svg/itext/svg/renderers/path/impl/ClosePath.cs index 8d49c818b..e59f06f86 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/ClosePath.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/ClosePath.cs @@ -21,16 +21,33 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ namespace iText.Svg.Renderers.Path.Impl { - /// Implements closePath(Z) attribute of SVG's path element + /// Implements closePath(Z) attribute of SVG's path element. public class ClosePath : LineTo { //\cond DO_NOT_DOCUMENT internal const int ARGUMENT_SIZE = 0; //\endcond + /// + /// Creates new + /// + /// instance. + /// public ClosePath() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// public ClosePath(bool relative) : base(relative) { } diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/CurveTo.cs b/itext/itext.svg/itext/svg/renderers/path/impl/CurveTo.cs index 86118446e..5a8319bcf 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/CurveTo.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/CurveTo.cs @@ -28,7 +28,7 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Exceptions; namespace iText.Svg.Renderers.Path.Impl { - /// Implements curveTo(C) attribute of SVG's path element + /// Implements curveTo(C) attribute of SVG's path element. public class CurveTo : AbstractPathShape, IControlPointCurve { //\cond DO_NOT_DOCUMENT internal const int ARGUMENT_SIZE = 6; @@ -36,14 +36,48 @@ public class CurveTo : AbstractPathShape, IControlPointCurve { private const double ZERO_EPSILON = 1e-12; + /// + /// Creates new + /// + /// instance. + /// public CurveTo() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// public CurveTo(bool relative) : this(relative, new DefaultOperatorConverter()) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// + /// + /// + /// + /// copier for converting relative coordinates to absolute coordinates + /// public CurveTo(bool relative, IOperatorConverter copier) : base(relative, copier) { } diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/LineTo.cs b/itext/itext.svg/itext/svg/renderers/path/impl/LineTo.cs index f3261e073..8bdb6804b 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/LineTo.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/LineTo.cs @@ -26,16 +26,33 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Exceptions; namespace iText.Svg.Renderers.Path.Impl { - /// Implements lineTo(L) attribute of SVG's path element + /// Implements lineTo(L) attribute of SVG's path element. public class LineTo : AbstractPathShape { //\cond DO_NOT_DOCUMENT internal const int ARGUMENT_SIZE = 2; //\endcond + /// + /// Creates new + /// + /// instance. + /// public LineTo() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// public LineTo(bool relative) : base(relative) { } diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/MoveTo.cs b/itext/itext.svg/itext/svg/renderers/path/impl/MoveTo.cs index 96f9aaa6d..96a4ed3ee 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/MoveTo.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/MoveTo.cs @@ -26,16 +26,33 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Exceptions; namespace iText.Svg.Renderers.Path.Impl { - /// Implements moveTo(M) attribute of SVG's path element + /// Implements moveTo(M) attribute of SVG's path element. public class MoveTo : AbstractPathShape { //\cond DO_NOT_DOCUMENT internal const int ARGUMENT_SIZE = 2; //\endcond + /// + /// Creates new + /// + /// instance. + /// public MoveTo() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// public MoveTo(bool relative) : base(relative) { } diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticCurveTo.cs b/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticCurveTo.cs index bba158921..9deba6617 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticCurveTo.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticCurveTo.cs @@ -28,20 +28,54 @@ You should have received a copy of the GNU Affero General Public License using iText.Svg.Exceptions; namespace iText.Svg.Renderers.Path.Impl { - /// Implements quadratic Bezier curveTo(Q) attribute of SVG's path element + /// Implements quadratic Bezier curveTo(Q) attribute of SVG's path element. public class QuadraticCurveTo : AbstractPathShape, IControlPointCurve { //\cond DO_NOT_DOCUMENT internal const int ARGUMENT_SIZE = 4; //\endcond + /// + /// Creates new + /// + /// instance. + /// public QuadraticCurveTo() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// public QuadraticCurveTo(bool relative) : this(relative, new DefaultOperatorConverter()) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// + /// + /// + /// + /// copier for converting relative coordinates to absolute coordinates + /// public QuadraticCurveTo(bool relative, IOperatorConverter copier) : base(relative, copier) { } diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticSmoothCurveTo.cs b/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticSmoothCurveTo.cs index d68ca1dc0..e98f61d2f 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticSmoothCurveTo.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/QuadraticSmoothCurveTo.cs @@ -21,16 +21,33 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ namespace iText.Svg.Renderers.Path.Impl { - /// Implements shorthand/smooth quadraticCurveTo (T) attribute of SVG's path element + /// Implements shorthand/smooth quadraticCurveTo (T) attribute of SVG's path element. public class QuadraticSmoothCurveTo : QuadraticCurveTo { //\cond DO_NOT_DOCUMENT internal const int ARGUMENT_SIZE = 2; //\endcond + /// + /// Creates new + /// + /// instance. + /// public QuadraticSmoothCurveTo() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// public QuadraticSmoothCurveTo(bool relative) : base(relative, new SmoothOperatorConverter()) { } diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/SmoothSCurveTo.cs b/itext/itext.svg/itext/svg/renderers/path/impl/SmoothSCurveTo.cs index 0c2f45f90..708d240aa 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/SmoothSCurveTo.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/SmoothSCurveTo.cs @@ -21,16 +21,33 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ namespace iText.Svg.Renderers.Path.Impl { - /// Implements shorthand/smooth curveTo (S) attribute of SVG's path element + /// Implements shorthand/smooth curveTo (S) attribute of SVG's path element. public class SmoothSCurveTo : CurveTo { //\cond DO_NOT_DOCUMENT internal const int ARGUMENT_SIZE = 4; //\endcond + /// + /// Creates new + /// + /// instance. + /// public SmoothSCurveTo() : this(false) { } + /// + /// Creates new + /// + /// instance. + /// + /// + /// + /// + /// in case it is a relative operator, + /// + /// if it is an absolute operator + /// public SmoothSCurveTo(bool relative) : base(relative, new SmoothOperatorConverter()) { } diff --git a/port-hash b/port-hash index 198d8826a..ebdf73272 100644 --- a/port-hash +++ b/port-hash @@ -1 +1 @@ -ec4929e366ec4e87fe7696f7a5fb5ed0d64d5ed7 +ff83ae4f7d0f91c1aef18b34b918be26e6751d97