@@ -1856,6 +1856,8 @@ public PdfCanvas endLayer() {
1856
1856
1857
1857
/**
1858
1858
* Creates Image XObject from image and adds it to canvas (as Image XObject).
1859
+ * <p>
1860
+ * The float arguments will be used in concatenating the transformation matrix as operands.
1859
1861
*
1860
1862
* @param image the {@code PdfImageXObject} object
1861
1863
* @param a an element of the transformation matrix
@@ -1865,13 +1867,16 @@ public PdfCanvas endLayer() {
1865
1867
* @param e an element of the transformation matrix
1866
1868
* @param f an element of the transformation matrix
1867
1869
* @return created Image XObject.
1870
+ * @see #concatMatrix(double, double, double, double, double, double)
1868
1871
*/
1869
1872
public PdfXObject addImage (ImageData image , float a , float b , float c , float d , float e , float f ) {
1870
1873
return addImage (image , a , b , c , d , e , f , false );
1871
1874
}
1872
1875
1873
1876
/**
1874
1877
* Creates Image XObject from image and adds it to canvas.
1878
+ * <p>
1879
+ * The float arguments will be used in concatenating the transformation matrix as operands.
1875
1880
*
1876
1881
* @param image the {@code PdfImageXObject} object
1877
1882
* @param a an element of the transformation matrix
@@ -1882,6 +1887,7 @@ public PdfXObject addImage(ImageData image, float a, float b, float c, float d,
1882
1887
* @param f an element of the transformation matrix
1883
1888
* @param asInline true if to add image as in-line.
1884
1889
* @return created Image XObject or null in case of in-line image (asInline = true).
1890
+ * @see #concatMatrix(double, double, double, double, double, double)
1885
1891
*/
1886
1892
public PdfXObject addImage (ImageData image , float a , float b , float c , float d , float e , float f , boolean asInline ) {
1887
1893
if (image .getOriginalType () == ImageType .WMF ) {
@@ -1904,11 +1910,15 @@ public PdfXObject addImage(ImageData image, float a, float b, float c, float d,
1904
1910
/**
1905
1911
* Creates Image XObject from image and adds it to canvas.
1906
1912
* The created image will be fit inside on the specified rectangle without preserving aspect ratio.
1913
+ * <p>
1914
+ * The x, y, width and height parameters of the rectangle will be used in concatenating
1915
+ * the transformation matrix as operands.
1907
1916
*
1908
1917
* @param image image from which Image XObject will be created
1909
1918
* @param rect rectangle in which the created image will be fit
1910
1919
* @param asInline true if to add image as in-line.
1911
1920
* @return created XObject or null in case of in-line image (asInline = true).
1921
+ * @see #concatMatrix(double, double, double, double, double, double)
1912
1922
*/
1913
1923
public PdfXObject addImage (ImageData image , Rectangle rect , boolean asInline ) {
1914
1924
return addImage (image , rect .getWidth (), 0 , 0 , rect .getHeight (), rect .getX (), rect .getY (), asInline );
@@ -1943,13 +1953,16 @@ public PdfXObject addImage(ImageData image, float x, float y, boolean asInline)
1943
1953
1944
1954
/**
1945
1955
* Creates Image XObject from image and adds it to the specified position with specified width preserving aspect ratio.
1956
+ * <p>
1957
+ * The float arguments will be used in concatenating the transformation matrix as operand.
1946
1958
*
1947
1959
* @param image image from which Image XObject will be created
1948
1960
* @param x horizontal offset of the created image position
1949
1961
* @param y vertical offset of the created image position
1950
1962
* @param width width of the created image on the basis of which the image height will be calculated
1951
1963
* @param asInline true if to add image as in-line.
1952
1964
* @return created XObject or null in case of in-line image (asInline = true).
1965
+ * @see #concatMatrix(double, double, double, double, double, double)
1953
1966
*/
1954
1967
public PdfXObject addImage (ImageData image , float x , float y , float width , boolean asInline ) {
1955
1968
if (image .getOriginalType () == ImageType .WMF ) {
@@ -1972,6 +1985,8 @@ public PdfXObject addImage(ImageData image, float x, float y, float width, boole
1972
1985
1973
1986
/**
1974
1987
* Creates Image XObject from image and adds it to the specified position with specified width preserving aspect ratio.
1988
+ * <p>
1989
+ * The float arguments will be used in concatenating the transformation matrix as operand.
1975
1990
*
1976
1991
* @param image image from which Image XObject will be created
1977
1992
* @param x horizontal offset of the created image position
@@ -1981,13 +1996,16 @@ public PdfXObject addImage(ImageData image, float x, float y, float width, boole
1981
1996
* @param dummy flag to note that the method works with the height parameter as opposed to the method
1982
1997
* {@link #addImage(ImageData, float, float, float, boolean)}.
1983
1998
* @return created XObject or null in case of in-line image (asInline = true).
1999
+ * @see #concatMatrix(double, double, double, double, double, double)
1984
2000
*/
1985
2001
public PdfXObject addImage (ImageData image , float x , float y , float height , boolean asInline , boolean dummy ) {
1986
2002
return addImage (image , height / image .getHeight () * image .getWidth (), 0 , 0 , height , x , y , asInline );
1987
2003
}
1988
2004
1989
2005
/**
1990
2006
* Adds {@code PdfXObject} to canvas.
2007
+ * <p>
2008
+ * The float arguments will be used in concatenating the transformation matrix as operands.
1991
2009
*
1992
2010
* @param xObject the {@code PdfImageXObject} object
1993
2011
* @param a an element of the transformation matrix
@@ -1997,6 +2015,7 @@ public PdfXObject addImage(ImageData image, float x, float y, float height, bool
1997
2015
* @param e an element of the transformation matrix
1998
2016
* @param f an element of the transformation matrix
1999
2017
* @return current canvas.
2018
+ * @see #concatMatrix(double, double, double, double, double, double)
2000
2019
*/
2001
2020
public PdfCanvas addXObject (PdfXObject xObject , float a , float b , float c , float d , float e , float f ) {
2002
2021
if (xObject instanceof PdfFormXObject ) {
@@ -2049,12 +2068,15 @@ public PdfCanvas addXObject(PdfXObject xObject, Rectangle rect) {
2049
2068
2050
2069
/**
2051
2070
* Adds {@code PdfXObject} to the specified position with specified width preserving aspect ratio.
2071
+ * <p>
2072
+ * The float arguments will be used in concatenating the transformation matrix as operand.
2052
2073
*
2053
2074
* @param xObject Image XObject to be added
2054
2075
* @param x horizontal offset of the image position
2055
2076
* @param y vertical offset of the image position
2056
2077
* @param width width of the image on the basis of which the height will be calculated
2057
2078
* @return current canvas.
2079
+ * @see #concatMatrix(double, double, double, double, double, double)
2058
2080
*/
2059
2081
public PdfCanvas addXObject (PdfXObject xObject , float x , float y , float width ) {
2060
2082
if (xObject instanceof PdfFormXObject ) {
@@ -2068,6 +2090,8 @@ public PdfCanvas addXObject(PdfXObject xObject, float x, float y, float width) {
2068
2090
2069
2091
/**
2070
2092
* Adds {@code PdfXObject} to the specified position with specified height preserving aspect ratio.
2093
+ * <p>
2094
+ * The float arguments will be used in concatenating the transformation matrix as operand.
2071
2095
*
2072
2096
* @param xObject Image XObject to be added
2073
2097
* @param x horizontal offset of the image position
@@ -2076,6 +2100,7 @@ public PdfCanvas addXObject(PdfXObject xObject, float x, float y, float width) {
2076
2100
* @param dummy flag to note that the method works with the height parameter as opposed to the method
2077
2101
* {@link #addXObject(PdfXObject, float, float, float)}
2078
2102
* @return current canvas.
2103
+ * @see #concatMatrix(double, double, double, double, double, double)
2079
2104
*/
2080
2105
public PdfCanvas addXObject (PdfXObject xObject , float x , float y , float height , boolean dummy ) {
2081
2106
if (xObject instanceof PdfFormXObject ) {
0 commit comments