@@ -2014,9 +2014,13 @@ public PdfCanvas addXObject(PdfXObject xObject, float x, float y) {
2014
2014
2015
2015
/**
2016
2016
* Adds {@code PdfXObject} to specified rectangle on canvas.
2017
+ * Do note that using this method of adding an XObject <b>will scale</b> the XObject using the width and the height
2018
+ * of the provided Rectangle. If you don't wish to scale the XObject, use {@link PdfCanvas#addXObject(PdfXObject, float, float)},
2019
+ * {@link PdfCanvas#addXObject(PdfXObject, float, float, float)}, {@link PdfCanvas#addXObject(PdfXObject, float, float, float, boolean)},
2020
+ * or {@link PdfCanvas#addXObject(PdfXObject, float, float, float, float, float, float)}.
2017
2021
*
2018
- * @param xObject
2019
- * @param rect
2022
+ * @param xObject the XObject to add
2023
+ * @param rect rectangle containing x and y coordinates and scaling information
2020
2024
* @return current canvas.
2021
2025
*/
2022
2026
public PdfCanvas addXObject (PdfXObject xObject , Rectangle rect ) {
@@ -2288,10 +2292,10 @@ private PdfCanvas addForm(PdfFormXObject form, float x, float y) {
2288
2292
}
2289
2293
2290
2294
/**
2291
- * Adds {@code PdfFormXObject} to specified rectangle on canvas.
2295
+ * Adds {@code PdfFormXObject} to specified rectangle on canvas and scale it using the rectangle's width and height .
2292
2296
*
2293
- * @param form
2294
- * @param rect
2297
+ * @param form PdfFormXObject to add
2298
+ * @param rect rectangle containing x and y coordinates and scaling information
2295
2299
* @return current canvas.
2296
2300
*/
2297
2301
private PdfCanvas addForm (PdfFormXObject form , Rectangle rect ) {
@@ -2378,10 +2382,10 @@ private PdfCanvas addImage(PdfImageXObject image, float x, float y) {
2378
2382
}
2379
2383
2380
2384
/**
2381
- * Adds {@code PdfImageXObject} to specified rectangle on canvas.
2385
+ * Adds {@code PdfImageXObject} to specified rectangle on canvas and scale it using the rectangle's width and height .
2382
2386
*
2383
- * @param image
2384
- * @param rect
2387
+ * @param image PdfImageXObject to add
2388
+ * @param rect rectangle containing x and y coordinates and scaling information
2385
2389
* @return current canvas
2386
2390
*/
2387
2391
private PdfCanvas addImage (PdfImageXObject image , Rectangle rect ) {
0 commit comments