@Override public void setImageSize(float docWidth, float docHeight) { super.setImageSize(docWidth, docHeight); }
/** * Sets document size according to the hints. * Global variables width and height are modified. * * @param docWidth Width of the document. * @param docHeight Height of the document. */ protected void setImageSize(float docWidth, float docHeight) { // Check hint to know if scaling is really needed Boolean scaleToPage = (Boolean)hints.get(KEY_SCALE_TO_PAGE); if(scaleToPage != null && !scaleToPage.booleanValue()) { float w = docWidth; float h = docHeight; if (hints.containsKey(KEY_AOI)) { Rectangle2D aoi = (Rectangle2D)hints.get(KEY_AOI); w = (float)aoi.getWidth(); h = (float)aoi.getHeight(); } super.setImageSize(w, h); } }
/** * Sets document size according to the hints. * Global variables width and height are modified. * * @param docWidth Width of the document. * @param docHeight Height of the document. */ protected void setImageSize(float docWidth, float docHeight) { // Check hint to know if scaling is really needed Boolean scaleToPage = (Boolean)hints.get(KEY_SCALE_TO_PAGE); if(scaleToPage != null && !scaleToPage) { float w = docWidth; float h = docHeight; if (hints.containsKey(KEY_AOI)) { Rectangle2D aoi = (Rectangle2D)hints.get(KEY_AOI); w = (float)aoi.getWidth(); h = (float)aoi.getHeight(); } super.setImageSize(w, h); } }
float docHeight = (float)ctx.getDocumentSize().getHeight(); setImageSize(docWidth, docHeight);
float docHeight = (float)ctx.getDocumentSize().getHeight(); setImageSize(docWidth, docHeight);