@@ -1509,8 +1509,7 @@ protected internal virtual Rectangle CalculateAbsolutePdfBBox() {
15091509 TransformPoints ( contentBoxPoints , rotationTransform ) ;
15101510 }
15111511 }
1512- String [ ] transform = renderer . GetProperty < String [ ] > ( Property . TRANSFORM ) ;
1513- if ( transform != null ) {
1512+ if ( renderer . GetProperty < IList < String [ ] > > ( Property . TRANSFORM ) != null ) {
15141513 if ( renderer is BlockRenderer ) {
15151514 BlockRenderer blockRenderer = ( BlockRenderer ) renderer ;
15161515 AffineTransform rotationTransform = blockRenderer . CreateTransformationInsideOccupiedArea ( ) ;
@@ -1864,25 +1863,30 @@ protected internal virtual void EndTranformationIfApplied(PdfCanvas canvas) {
18641863 }
18651864 }
18661865
1867- private float [ ] GetCssTransformMatrix ( float width , float height ) {
1868- String [ ] strings = this . GetProperty < String [ ] > ( Property . TRANSFORM ) ;
1869- float [ ] floats = new float [ 6 ] ;
1870- for ( int i = 0 ; i < 6 ; i ++ ) {
1871- if ( i == 4 || i == 5 ) {
1872- int indexOfPercent = strings [ i ] . IndexOf ( '%' ) ;
1873- if ( indexOfPercent > 0 ) {
1874- floats [ i ] = float . Parse ( strings [ i ] . JSubstring ( 0 , indexOfPercent ) , System . Globalization . CultureInfo . InvariantCulture
1875- ) / 100 * ( i == 4 ? width : height ) ;
1866+ private AffineTransform GetCssTransformMatrix ( float width , float height ) {
1867+ IList < String [ ] > multipleTransform = this . GetProperty < IList < String [ ] > > ( Property . TRANSFORM ) ;
1868+ AffineTransform affineTransform = new AffineTransform ( ) ;
1869+ for ( int k = multipleTransform . Count - 1 ; k >= 0 ; k -- ) {
1870+ String [ ] transform = multipleTransform [ k ] ;
1871+ float [ ] floats = new float [ 6 ] ;
1872+ for ( int i = 0 ; i < 6 ; i ++ ) {
1873+ if ( i == 4 || i == 5 ) {
1874+ int indexOfPercent = transform [ i ] . IndexOf ( '%' ) ;
1875+ if ( indexOfPercent > 0 ) {
1876+ floats [ i ] = float . Parse ( transform [ i ] . JSubstring ( 0 , indexOfPercent ) , System . Globalization . CultureInfo . InvariantCulture
1877+ ) / 100 * ( i == 4 ? width : height ) ;
1878+ }
1879+ else {
1880+ floats [ i ] = float . Parse ( transform [ i ] , System . Globalization . CultureInfo . InvariantCulture ) ;
1881+ }
18761882 }
18771883 else {
1878- floats [ i ] = float . Parse ( strings [ i ] , System . Globalization . CultureInfo . InvariantCulture ) ;
1884+ floats [ i ] = float . Parse ( transform [ i ] , System . Globalization . CultureInfo . InvariantCulture ) ;
18791885 }
18801886 }
1881- else {
1882- floats [ i ] = float . Parse ( strings [ i ] , System . Globalization . CultureInfo . InvariantCulture ) ;
1883- }
1887+ affineTransform . PreConcatenate ( new AffineTransform ( floats ) ) ;
18841888 }
1885- return floats ;
1889+ return affineTransform ;
18861890 }
18871891
18881892 public abstract IRenderer GetNextRenderer ( ) ;
0 commit comments