Package org.pdfclown.objects

Examples of org.pdfclown.objects.PdfArray


      // 1. L* component.
      ranges.add(
        new Interval<Float>(0f, 100f)
        );

      PdfArray rangesObject = (PdfArray)getDictionary().get(PdfName.Range);
      if(rangesObject == null)
      {
        // 2. a* component.
        ranges.add(
          new Interval<Float>(-100f, 100f)
          );
        // 3. b* component.
        ranges.add(
          new Interval<Float>(-100f, 100f)
          );
      }
      else
      {
        // 2/3. a*/b* components.
        Iterator<PdfDirectObject> rangesObjectIterator = rangesObject.iterator();
        while(rangesObjectIterator.hasNext())
        {
          ranges.add(
            new Interval<Float>(
              ((PdfNumber<?>)rangesObjectIterator.next()).getNumberValue(),
View Full Code Here


    List<? extends PdfDirectObject> components
    )
  {
    super(
      null,//TODO:colorspace?
      new PdfArray(components)
      );
  }
View Full Code Here

      page
      );

    getBaseDataObject().put(
      PdfName.L,
      new PdfArray(new PdfDirectObject[]{new PdfReal(0),new PdfReal(0),new PdfReal(0),new PdfReal(0)})
      );
    setStartPoint(startPoint);
    setEndPoint(endPoint);
  }
View Full Code Here

    )
  {
    /*
      NOTE: 'L' entry MUST be defined.
    */
    PdfArray coordinatesObject = (PdfArray)getBaseDataObject().get(PdfName.L);

    return new Point2D.Double(
      ((PdfNumber<?>)coordinatesObject.get(2)).getNumberValue(),
      ((PdfNumber<?>)coordinatesObject.get(3)).getNumberValue()
      );
  }
View Full Code Here

    )
  {
    /*
      NOTE: 'LE' entry may be undefined.
    */
    PdfArray endstylesObject = (PdfArray)getBaseDataObject().get(PdfName.LE);
    if(endstylesObject == null)
      return DefaultLineEndStyle;

    return LineEndStyleEnum.get((PdfName)endstylesObject.get(1));
  }
View Full Code Here

    )
  {
    /*
      NOTE: 'IC' entry may be undefined.
    */
    PdfArray fillColorObject = (PdfArray)getBaseDataObject().get(PdfName.IC);
    if(fillColorObject == null)
      return null;
//TODO:use baseObject constructor!!!
    return new DeviceRGBColor(
      ((PdfNumber<?>)fillColorObject.get(0)).getNumberValue(),
      ((PdfNumber<?>)fillColorObject.get(1)).getNumberValue(),
      ((PdfNumber<?>)fillColorObject.get(2)).getNumberValue()
      );
  }
View Full Code Here

    )
  {
    /*
      NOTE: 'L' entry MUST be defined.
    */
    PdfArray coordinatesObject = (PdfArray)getBaseDataObject().get(PdfName.L);

    return new Point2D.Double(
      ((PdfNumber<?>)coordinatesObject.get(0)).getNumberValue(),
      ((PdfNumber<?>)coordinatesObject.get(1)).getNumberValue()
      );
  }
View Full Code Here

    )
  {
    /*
      NOTE: 'LE' entry may be undefined.
    */
    PdfArray endstylesObject = (PdfArray)getBaseDataObject().get(PdfName.LE);
    if(endstylesObject == null)
      return DefaultLineEndStyle;

    return LineEndStyleEnum.get((PdfName)endstylesObject.get(0));
  }
View Full Code Here

  */
  public void setEndPoint(
    Point2D value
    )
  {
    PdfArray coordinatesObject = (PdfArray)getBaseDataObject().get(PdfName.L);
    coordinatesObject.set(2,new PdfReal(value.getX()));
    coordinatesObject.set(3,new PdfReal(getPage().getBox().getHeight()-value.getY()));
  }
View Full Code Here

  */
  public void setStartPoint(
    Point2D value
    )
  {
    PdfArray coordinatesObject = (PdfArray)getBaseDataObject().get(PdfName.L);
    coordinatesObject.set(0,new PdfReal(value.getX()));
    coordinatesObject.set(1,new PdfReal(getPage().getBox().getHeight()-value.getY()));
  }
View Full Code Here

TOP

Related Classes of org.pdfclown.objects.PdfArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.