@@ -345,7 +345,7 @@ public virtual iText.Kernel.Pdf.Canvas.PdfCanvas RestoreState() {
345345 /// Concatenates the 2x3 affine transformation matrix to the current matrix
346346 /// in the content stream managed by this Canvas.
347347 /// Contrast with
348- /// <see cref="SetTextMatrix(float, float )"/>
348+ /// <see cref="SetTextMatrix(iText.Kernel.Geom.AffineTransform )"/>
349349 /// </remarks>
350350 /// <param name="a">operand 1,1 in the matrix.</param>
351351 /// <param name="b">operand 1,2 in the matrix.</param>
@@ -595,6 +595,19 @@ public virtual iText.Kernel.Pdf.Canvas.PdfCanvas SetTextMatrix(float a, float b,
595595 return this ;
596596 }
597597
598+ /// <summary>Replaces the text matrix.</summary>
599+ /// <remarks>
600+ /// Replaces the text matrix. Contrast with
601+ /// <see cref="ConcatMatrix(iText.Kernel.Pdf.PdfArray)"/>
602+ /// </remarks>
603+ /// <param name="transform">new textmatrix as transformation</param>
604+ /// <returns>current canvas</returns>
605+ public virtual iText . Kernel . Pdf . Canvas . PdfCanvas SetTextMatrix ( AffineTransform transform ) {
606+ float [ ] matrix = new float [ 6 ] ;
607+ transform . GetMatrix ( matrix ) ;
608+ return SetTextMatrix ( matrix [ 0 ] , matrix [ 1 ] , matrix [ 2 ] , matrix [ 3 ] , matrix [ 4 ] , matrix [ 5 ] ) ;
609+ }
610+
598611 /// <summary>Changes the text matrix.</summary>
599612 /// <param name="x">operand 3,1 in the matrix.</param>
600613 /// <param name="y">operand 3,2 in the matrix.</param>
0 commit comments