/** * This will set start and end coordinates of the line (or leader line if LL entry is set). * * @param line array of 4 floats [x1, y1, x2, y2] line start and end points in default user space. */ public final void setLine(float[] line) { COSArray newLine = new COSArray(); newLine.setFloatArray(line); annot.setItem(COSName.L, newLine); }
/** * This will set the coordinates of the vertices. * * @param vertices array of floats [x1, y1, x2, y2, ...] vertex coordinates in default user space. */ public final void setVertices(float[] vertices) { COSArray newVertices = new COSArray(); newVertices.setFloatArray(vertices); annot.setItem(COSName.VERTICES, newVertices); }
/** * This will set the coordinates of the the vertices. * * @param vertices array of floats [x1, y1, x2, y2, ...] vertex coordinates in default user space. */ public void setVertices(float[] vertices) { COSArray newVertices = new COSArray(); newVertices.setFloatArray(vertices); annot.setItem(COSName.VERTICES, newVertices); }
/** * Set the coordinates of individual words or group of words. * * The quadliterals shall encompasses a word or group of contiguous words in the text underlying the annotation. The * coordinates for each quadrilateral shall be given in the order x1 y1 x2 y2 x3 y3 x4 y4. * * @param coords an array of 8 n numbers specifying the coordinates of n quadrilaterals. */ public void setCoords(float[] coords) { COSArray newQuadPoints = new COSArray(); newQuadPoints.setFloatArray(coords); annot.setItem(COSName.QUADPOINTS, newQuadPoints); }
/** * This will set the coordinates of the callout line. * * @param callout An array of four or six numbers specifying a callout line attached to the free * text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and * ending coordinates of the line in default user space, Four numbers [ x1 y1 x2 y2 ] represent * the starting and ending coordinates of the line. */ public final void setCallout(float[] callout) { COSArray newCallout = new COSArray(); newCallout.setFloatArray(callout); annot.setItem(COSName.CL, newCallout); }
/** * Returns the color component values as a COS array * @return the color component values as a COS array */ public COSArray toCOSArray() { COSArray array = new COSArray(); array.setFloatArray(components); if (patternName != null) { array.add(patternName); } return array; }
/** * This will set the set of quadpoints which encompass the areas of this annotation which will activate. * * @param quadPoints an array representing the set of area covered. */ public void setQuadPoints(float[] quadPoints) { COSArray newQuadPoints = new COSArray(); newQuadPoints.setFloatArray(quadPoints); getCOSObject().setItem(COSName.QUADPOINTS, newQuadPoints); }
/** * This will set the set of quadpoints which encompass the areas of this annotation. * * @param quadPoints an array representing the set of area covered */ public final void setQuadPoints(float[] quadPoints) { COSArray newQuadPoints = new COSArray(); newQuadPoints.setFloatArray(quadPoints); getCOSObject().setItem(COSName.QUADPOINTS, newQuadPoints); }
/** * This will set start and end coordinates of the line (or leader line if LL entry is set). * * @param l array of 4 floats [x1, y1, x2, y2] line start and end points in default user space. */ public void setLine(float[] l) { COSArray newL = new COSArray(); newL.setFloatArray(l); getCOSObject().setItem(COSName.L, newL); }
/** * This will set the origin of the coordinate system. * * @param coordSystemOrigin the origin */ public void setCoordSystemOrigin(float[] coordSystemOrigin) { COSArray array = new COSArray(); array.setFloatArray(coordSystemOrigin); this.getCOSObject().setItem("O", array); }
/** * This will set the numbers that shall represent the alternating horizontal and vertical * coordinates. * * @param points an array with the numbers that shall represent the alternating horizontal and * vertical coordinates. */ public void setVertices(float[] points) { COSArray ar = new COSArray(); ar.setFloatArray(points); getCOSObject().setItem(COSName.VERTICES, ar); }
/** * This will set the numbers that shall represent the alternating horizontal and vertical * coordinates. * * @param points an array with the numbers that shall represent the alternating horizontal and * vertical coordinates. */ public void setVertices(float[] points) { COSArray ar = new COSArray(); ar.setFloatArray(points); getCOSObject().setItem(COSName.VERTICES, ar); }
/** * This will set interior color of the drawn area. * * @param color The interior color of the circle. */ public final void setInteriorColor(Color color) { COSArray array = null; if (color != null) { float[] colors = color.getRGBColorComponents(null); array = new COSArray(); array.setFloatArray(colors); } annot.setItem(COSName.IC, array); }
/** * This will set the coordinates of the callout line. * * @param callout An array of four or six numbers specifying a callout line attached to the free * text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and * ending coordinates of the line in default user space, four numbers [ x1 y1 x2 y2 ] represent * the starting and ending coordinates of the line. */ public final void setCallout(float[] callout) { COSArray newCallout = new COSArray(); newCallout.setFloatArray(callout); getCOSObject().setItem(COSName.CL, newCallout); }
/** * This will set interior color of the line endings defined in the LE entry. * * @param color The interior color of the line endings. */ public void setInteriorColor(Color color) { COSArray array = null; if (color != null) { float[] colors = color.getRGBColorComponents(null); array = new COSArray(); array.setFloatArray(colors); } annot.setItem(COSName.IC, array); }
/** * Set the annotation color. * * @param c The annotation color. */ public final void setColor(Color c) { COSArray color = null; if (c != null) { float[] colors = c.getRGBColorComponents(null); color = new COSArray(); color.setFloatArray(colors); } annot.setItem(COSName.C, color); }
/** * This will set interior color of the drawn area. * * @param color The interior color of the drawn area. */ public final void setInteriorColor(Color color) { COSArray array = null; if (color != null) { float[] colors = color.getRGBColorComponents(null); array = new COSArray(); array.setFloatArray(colors); } annot.setItem(COSName.IC, array); }
/** * This will set interior color of the drawn area. * * @param color The interior color of the circle. */ public final void setInteriorColor(Color color) { COSArray array = null; if (color != null) { float[] colors = color.getRGBColorComponents(null); array = new COSArray(); array.setFloatArray(colors); } annot.setItem(COSName.IC, array); }
/** * This will set interior color of the line endings defined in the LE entry. * * @param color The interior color of the line endings. */ public final void setInteriorColor(Color color) { COSArray array = null; if (color != null) { float[] colors = color.getRGBColorComponents(null); array = new COSArray(); array.setFloatArray(colors); } annot.setItem(COSName.IC, array); }
/** * Set the paths making up the freehand "scribble". * * The ink annotation is made up of one ore more disjoint paths. Each array entry is an array representing a stroked * path, being a series of alternating horizontal and vertical coordinates in default user space. * * @param inklist the List of arrays representing the paths. */ public final void setInkList(List<float[]> inklist) { COSArray newInklist = new COSArray(); for (float[] array : inklist) { COSArray newArray = new COSArray(); newArray.setFloatArray(array); newInklist.add(newArray); } annot.setItem(COSName.INKLIST, newInklist); }