Class DrawShape

java.lang.Object
org.apache.poi.sl.draw.DrawShape
All Implemented Interfaces:
Drawable
Direct Known Subclasses:
DrawBackground, DrawGraphicalFrame, DrawGroupShape, DrawSimpleShape, DrawTableShape

public class DrawShape extends Object implements Drawable
  • Field Details

    • shape

      protected final Shape<?,?> shape
  • Constructor Details

    • DrawShape

      public DrawShape(Shape<?,?> shape)
  • Method Details

    • applyTransform

      public void applyTransform(Graphics2D graphics)
      Apply 2-D transforms before drawing this shape. This includes rotation and flipping.
      Specified by:
      applyTransform in interface Drawable
      Parameters:
      graphics - the graphics whos transform matrix will be modified
    • draw

      public void draw(Graphics2D graphics)
      Description copied from interface: Drawable
      Draw this shape into the supplied canvas
      Specified by:
      draw in interface Drawable
      Parameters:
      graphics - the graphics to draw into
    • drawContent

      public void drawContent(Graphics2D graphics)
      Description copied from interface: Drawable
      draw any content within this shape (image, text, etc.).
      Specified by:
      drawContent in interface Drawable
      Parameters:
      graphics - the graphics to draw into
    • getAnchor

      public static Rectangle2D getAnchor(Graphics2D graphics, PlaceableShape<?,?> shape)
    • getAnchor

      public static Rectangle2D getAnchor(Graphics2D graphics, Rectangle2D anchor)
    • getShape

      protected Shape<?,?> getShape()
    • getStroke

      protected static BasicStroke getStroke(StrokeStyle strokeStyle)