Example usage for org.apache.pdfbox.util Matrix clone

List of usage examples for org.apache.pdfbox.util Matrix clone

Introduction

In this page you can find the example usage for org.apache.pdfbox.util Matrix clone.

Prototype

@Override
public Matrix clone() 

Source Link

Document

Clones this object.

Usage

From source file:chiliad.parser.pdf.extractor.image.PDFImage.java

License:Apache License

public PDFImage(String imageName, PDXObjectImage image, Matrix ctmNew, double pageHeight) {
    this.imageName = imageName;
    this.image = image;
    this.ctmNew = (Matrix) ctmNew.clone();
    this.pageHeight = pageHeight;

    Matrix m = doCalc();/*from w w w  .  jav  a2s .c  o  m*/
    this.x = (double) m.getXPosition();
    this.y = (double) m.getYPosition();
    float imageXScale = m.getXScale();
    float imageYScale = m.getYScale();
    this.width = (double) imageXScale;
    this.height = (double) imageYScale;
}