PDFXObjectImageWithLocation.java
2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException
* com.adobe.internal.pdftoolkit.core.types.ASMatrix
* com.adobe.internal.pdftoolkit.core.types.ASRectangle
*/
package com.adobe.internal.pdftoolkit.pdf.graphics.xobject;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException;
import com.adobe.internal.pdftoolkit.core.types.ASMatrix;
import com.adobe.internal.pdftoolkit.core.types.ASRectangle;
import com.adobe.internal.pdftoolkit.pdf.document.PDFDocument;
import com.adobe.internal.pdftoolkit.pdf.graphics.PDFRectangle;
import com.adobe.internal.pdftoolkit.pdf.graphics.xobject.PDFXObjectImage;
public class PDFXObjectImageWithLocation {
private ASMatrix matrix;
private PDFRectangle location;
private PDFXObjectImage xImage;
private final PDFDocument document;
public PDFXObjectImageWithLocation(PDFDocument doc, PDFXObjectImage image, ASMatrix xmatrix) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
this.xImage = image;
this.matrix = xmatrix;
this.document = doc;
this.createImageLocation();
}
public ASMatrix getMatrix() {
return this.matrix;
}
void setMatrix(ASMatrix matrix) {
this.matrix = matrix;
}
public PDFXObjectImage getXImage() {
return this.xImage;
}
public void setXImage(PDFXObjectImage image) {
this.xImage = image;
}
public PDFRectangle getLocation() {
return this.location;
}
public void setLocation(PDFRectangle location) {
this.location = location;
}
public void createImageLocation() throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
ASRectangle rect = new ASRectangle(0.0, 0.0, 1.0, 1.0);
ASRectangle imageRect = rect.transform(this.matrix);
PDFRectangle locRect = PDFRectangle.newInstance(this.document, imageRect);
this.setLocation(locRect);
}
}