/** * This will set the lower left y coordinate. * * @param value The lower left y. */ public void setLowerLeftY(float value) { rectArray.set(1, new COSFloat( value ) ); }
/** * This will set the upper right x coordinate. * * @param value The upper right x . */ public void setUpperRightX(float value) { rectArray.set(2, new COSFloat( value ) ); }
/** * Sets the g value of the tristimulus. * @param g the g value for the tristimulus */ public void setG(float g) { values.set(1, new COSFloat(g)); }
/** * Sets the x value of the tristimulus. * @param x the x value for the tristimulus */ public void setX(float x) { values.set(0, new COSFloat(x)); }
/** * Sets the y value of the tristimulus. * @param y the y value for the tristimulus */ public void setY(float y) { values.set(1, new COSFloat(y)); }
/** * Set the gamma value. * * @param value The new gamma value. */ public void setGamma(float value) { dictionary.setItem(COSName.GAMMA, new COSFloat(value)); } }
/** * This will set the maximum value for the range. * * @param max The new maximum for the range. */ public void setMax( float max ) { rangeArray.set( startingIndex*2+1, new COSFloat( max ) ); }
/** * This will set the size of the font. * * @param size The new size of the font. */ public void setFontSize( float size ) { fontSetting.set( 1, new COSFloat( size ) ); } }
/** * Sets the r value of the tristimulus. * @param r the r value for the tristimulus */ public void setR(float r) { values.set(0, new COSFloat(r)); }
/** * Sets the b value of the tristimulus. * @param b he b value for the tristimulus */ public void setB(float b) { values.set(2, new COSFloat(b)); } }
/** * Sets the z value of the tristimulus. * @param z the z value for the tristimulus */ public void setZ(float z) { values.set(2, new COSFloat(z)); } }
/** * This is a convenience method that will convert the value to a COSFloat object. * * @param key The key to the object, * @param value The int value for the name. */ public void setFloat(COSName key, float value) { COSFloat fltVal = new COSFloat(value); setItem(key, fltVal); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { //move to start of next text line List<COSBase> args = new ArrayList<>(); args.add(new COSFloat(0f)); // this must be -leading instead of just leading as written in the // specification (p.369) the acrobat reader seems to implement it the same way args.add(new COSFloat(-1 * context.getGraphicsState().getTextState().getLeading())); // use Td instead of repeating code context.processOperator("Td", args); }
/** * Constructor from COS object. * @param array the array containing the XYZ values */ public PDTristimulus(float[] array) { values = new COSArray(); for(int i=0; i<array.length && i<3; i++) { values.add(new COSFloat(array[i])); } }
/** * @param duration The duration of the transition effect, in seconds. */ public void setDuration(float duration) { getCOSObject().setItem(COSName.D, new COSFloat(duration)); }
/** * @param scale The starting or ending scale at which the changes shall be drawn. Only for * {@link PDTransitionStyle#Fly}. */ public void setFlyScale(float scale) { getCOSObject().setItem(COSName.SS, new COSFloat(scale)); }
/** * Convenient method to set a transition and the display duration * * @param transition The new transition to set on this page. * @param duration The maximum length of time, in seconds, that the page shall be displayed during presentations * before the viewer application shall automatically advance to the next page. */ public void setTransition(PDTransition transition, float duration) { page.setItem(COSName.TRANS, transition); page.setItem(COSName.DUR, new COSFloat(duration)); }
/** * Creates a blank font setting, font will be null, size will be 1. */ public PDFontSetting() { fontSetting = new COSArray(); fontSetting.add( null ); fontSetting.add( new COSFloat( 1 ) ); }