Skip to content

Commit 1747fba

Browse files
committed
Update PdfCanvas javadocs
DEVSIX-1667
1 parent b6ddf5d commit 1747fba

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/PdfCanvas.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,8 @@ public PdfCanvas endLayer() {
18561856

18571857
/**
18581858
* 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.
18591861
*
18601862
* @param image the {@code PdfImageXObject} object
18611863
* @param a an element of the transformation matrix
@@ -1865,13 +1867,16 @@ public PdfCanvas endLayer() {
18651867
* @param e an element of the transformation matrix
18661868
* @param f an element of the transformation matrix
18671869
* @return created Image XObject.
1870+
* @see #concatMatrix(double, double, double, double, double, double)
18681871
*/
18691872
public PdfXObject addImage(ImageData image, float a, float b, float c, float d, float e, float f) {
18701873
return addImage(image, a, b, c, d, e, f, false);
18711874
}
18721875

18731876
/**
18741877
* 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.
18751880
*
18761881
* @param image the {@code PdfImageXObject} object
18771882
* @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,
18821887
* @param f an element of the transformation matrix
18831888
* @param asInline true if to add image as in-line.
18841889
* @return created Image XObject or null in case of in-line image (asInline = true).
1890+
* @see #concatMatrix(double, double, double, double, double, double)
18851891
*/
18861892
public PdfXObject addImage(ImageData image, float a, float b, float c, float d, float e, float f, boolean asInline) {
18871893
if (image.getOriginalType() == ImageType.WMF) {
@@ -1904,11 +1910,15 @@ public PdfXObject addImage(ImageData image, float a, float b, float c, float d,
19041910
/**
19051911
* Creates Image XObject from image and adds it to canvas.
19061912
* 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.
19071916
*
19081917
* @param image image from which Image XObject will be created
19091918
* @param rect rectangle in which the created image will be fit
19101919
* @param asInline true if to add image as in-line.
19111920
* @return created XObject or null in case of in-line image (asInline = true).
1921+
* @see #concatMatrix(double, double, double, double, double, double)
19121922
*/
19131923
public PdfXObject addImage(ImageData image, Rectangle rect, boolean asInline) {
19141924
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)
19431953

19441954
/**
19451955
* 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.
19461958
*
19471959
* @param image image from which Image XObject will be created
19481960
* @param x horizontal offset of the created image position
19491961
* @param y vertical offset of the created image position
19501962
* @param width width of the created image on the basis of which the image height will be calculated
19511963
* @param asInline true if to add image as in-line.
19521964
* @return created XObject or null in case of in-line image (asInline = true).
1965+
* @see #concatMatrix(double, double, double, double, double, double)
19531966
*/
19541967
public PdfXObject addImage(ImageData image, float x, float y, float width, boolean asInline) {
19551968
if (image.getOriginalType() == ImageType.WMF) {
@@ -1972,6 +1985,8 @@ public PdfXObject addImage(ImageData image, float x, float y, float width, boole
19721985

19731986
/**
19741987
* 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.
19751990
*
19761991
* @param image image from which Image XObject will be created
19771992
* @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
19811996
* @param dummy flag to note that the method works with the height parameter as opposed to the method
19821997
* {@link #addImage(ImageData, float, float, float, boolean)}.
19831998
* @return created XObject or null in case of in-line image (asInline = true).
1999+
* @see #concatMatrix(double, double, double, double, double, double)
19842000
*/
19852001
public PdfXObject addImage(ImageData image, float x, float y, float height, boolean asInline, boolean dummy) {
19862002
return addImage(image, height / image.getHeight() * image.getWidth(), 0, 0, height, x, y, asInline);
19872003
}
19882004

19892005
/**
19902006
* Adds {@code PdfXObject} to canvas.
2007+
* <p>
2008+
* The float arguments will be used in concatenating the transformation matrix as operands.
19912009
*
19922010
* @param xObject the {@code PdfImageXObject} object
19932011
* @param a an element of the transformation matrix
@@ -1997,6 +2015,7 @@ public PdfXObject addImage(ImageData image, float x, float y, float height, bool
19972015
* @param e an element of the transformation matrix
19982016
* @param f an element of the transformation matrix
19992017
* @return current canvas.
2018+
* @see #concatMatrix(double, double, double, double, double, double)
20002019
*/
20012020
public PdfCanvas addXObject(PdfXObject xObject, float a, float b, float c, float d, float e, float f) {
20022021
if (xObject instanceof PdfFormXObject) {
@@ -2049,12 +2068,15 @@ public PdfCanvas addXObject(PdfXObject xObject, Rectangle rect) {
20492068

20502069
/**
20512070
* 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.
20522073
*
20532074
* @param xObject Image XObject to be added
20542075
* @param x horizontal offset of the image position
20552076
* @param y vertical offset of the image position
20562077
* @param width width of the image on the basis of which the height will be calculated
20572078
* @return current canvas.
2079+
* @see #concatMatrix(double, double, double, double, double, double)
20582080
*/
20592081
public PdfCanvas addXObject(PdfXObject xObject, float x, float y, float width) {
20602082
if (xObject instanceof PdfFormXObject) {
@@ -2068,6 +2090,8 @@ public PdfCanvas addXObject(PdfXObject xObject, float x, float y, float width) {
20682090

20692091
/**
20702092
* 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.
20712095
*
20722096
* @param xObject Image XObject to be added
20732097
* @param x horizontal offset of the image position
@@ -2076,6 +2100,7 @@ public PdfCanvas addXObject(PdfXObject xObject, float x, float y, float width) {
20762100
* @param dummy flag to note that the method works with the height parameter as opposed to the method
20772101
* {@link #addXObject(PdfXObject, float, float, float)}
20782102
* @return current canvas.
2103+
* @see #concatMatrix(double, double, double, double, double, double)
20792104
*/
20802105
public PdfCanvas addXObject(PdfXObject xObject, float x, float y, float height, boolean dummy) {
20812106
if (xObject instanceof PdfFormXObject) {

0 commit comments

Comments
 (0)