Package org.pdfclown.objects

Examples of org.pdfclown.objects.Rectangle


  {
    super(context);

    PdfDictionary header = getBaseDataObject().getHeader();
    header.put(PdfName.Subtype,PdfName.Form);
    header.put(PdfName.BBox,new Rectangle(0,0,0,0).getBaseDataObject());

    // No resources collection?
    /* NOTE: Resources collection is mandatory. */
    if(resources == null)
    {resources = new Resources(context);}
View Full Code Here


        new PdfInteger(flags)
        );
      // FontBBox.
      fontDescriptor.put(
        PdfName.FontBBox,
        new Rectangle(
          new Point2D.Double(metrics.xMin * metrics.unitNorm, metrics.yMin * metrics.unitNorm),
          new Point2D.Double(metrics.xMax * metrics.unitNorm, metrics.yMax * metrics.unitNorm)
          ).getBaseDataObject()
        );
      // ItalicAngle.
View Full Code Here

  {
    PdfArray mediaBox = getMediaBox();
    if(mediaBox == null)
    {
      // Create default media box!
      mediaBox = new Rectangle(0,0,0,0).getBaseDataObject();
      // Assign the media box to the document!
      ((PdfDictionary)getBaseDataObject().resolve(PdfName.Pages)).put(PdfName.MediaBox,mediaBox);
    }
    mediaBox.set(2,new PdfReal(value.getWidth()));
    mediaBox.set(3,new PdfReal(value.getHeight()));
View Full Code Here

          PdfName.Resources
        },
        new PdfDirectObject[]
        {
          PdfName.Page,
          new Rectangle(0,0,size.getWidth(),size.getHeight()).getBaseDataObject(),
          context.getFile().register(
            new PdfStream()
            ),
          resources.getBaseObject()
        }
View Full Code Here

    @see #getBox()
  */
  public void setBox(
    Rectangle2D value
    )
  {getBaseDataObject().put(PdfName.MediaBox, new Rectangle(value).getBaseDataObject());}
View Full Code Here

  // <IContentContext>
  @Override
  public Rectangle2D getBox(
    )
  {return new Rectangle(getInheritableAttribute(PdfName.MediaBox)).toRectangle2D();}
View Full Code Here

TOP

Related Classes of org.pdfclown.objects.Rectangle

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.