Search in sources :

Example 6 with AWTColor

use of com.tom_roush.harmony.awt.AWTColor in project PdfBox-Android by TomRoush.

the class FDFAnnotationPolygon method getInteriorColor.

/**
 * This will get interior color of the drawn area.
 *
 * @return object representing the color.
 */
public AWTColor getInteriorColor() {
    AWTColor retval = null;
    COSArray array = (COSArray) annot.getDictionaryObject(COSName.IC);
    if (array != null) {
        float[] rgb = array.toFloatArray();
        if (rgb.length >= 3) {
            retval = new AWTColor(rgb[0], rgb[1], rgb[2]);
        }
    }
    return retval;
}
Also used : AWTColor(com.tom_roush.harmony.awt.AWTColor) COSArray(com.tom_roush.pdfbox.cos.COSArray)

Example 7 with AWTColor

use of com.tom_roush.harmony.awt.AWTColor in project PdfBox-Android by TomRoush.

the class FDFAnnotationCircle method getInteriorColor.

/**
 * This will retrieve the interior color of the drawn area.
 *
 * @return object representing the color.
 */
public AWTColor getInteriorColor() {
    AWTColor retval = null;
    COSArray array = (COSArray) annot.getDictionaryObject(COSName.IC);
    if (array != null) {
        float[] rgb = array.toFloatArray();
        if (rgb.length >= 3) {
            retval = new AWTColor(rgb[0], rgb[1], rgb[2]);
        }
    }
    return retval;
}
Also used : AWTColor(com.tom_roush.harmony.awt.AWTColor) COSArray(com.tom_roush.pdfbox.cos.COSArray)

Aggregations

AWTColor (com.tom_roush.harmony.awt.AWTColor)7 COSArray (com.tom_roush.pdfbox.cos.COSArray)6