org.icepdf.core.pobjects.graphics.commands
Interface DrawCmd

All Known Implementing Classes:
AbstractDrawCmd, AlphaDrawCmd, ClipDrawCmd, ColorDrawCmd, DrawDrawCmd, FillDrawCmd, FormDrawCmd, GlyphOutlineDrawCmd, GraphicsStateCmd, ImageDrawCmd, NoClipDrawCmd, OCGEndDrawCmd, OCGStartDrawCmd, PaintDrawCmd, ShapeDrawCmd, ShapesDrawCmd, StrokeDrawCmd, TextSpriteDrawCmd, TextTransformDrawCmd, TilingPatternDrawCmd, TransformDrawCmd

public interface DrawCmd

Common command pattern for painting PDF draw commands to a Java2D graphics context. Any object that is Shapes shapes array list must implement this interface.

Implementing methods should execute as quickly as possible to avoid slowing down render times.

Since:
5.0

Method Summary
 java.awt.Shape paintOperand(java.awt.Graphics2D g, Page parentPage, java.awt.Shape currentShape, java.awt.Shape clip, java.awt.geom.AffineTransform base, OptionalContentState optionalContentState, boolean paintAlpha, PaintTimer paintTimer)
          Called by the Shapes class to paint all DrawCmd implementations.
 

Method Detail

paintOperand

java.awt.Shape paintOperand(java.awt.Graphics2D g,
                            Page parentPage,
                            java.awt.Shape currentShape,
                            java.awt.Shape clip,
                            java.awt.geom.AffineTransform base,
                            OptionalContentState optionalContentState,
                            boolean paintAlpha,
                            PaintTimer paintTimer)
Called by the Shapes class to paint all DrawCmd implementations.

Parameters:
g - graphics context to paint this paint command to.
parentPage - parentPage reference used to notify page painters.
currentShape - current shape to draw.
clip - clip of parent which is the generally the page size.
base - base transform of the page.
optionalContentState - state of optional content visibility.
paintAlpha - enable/disable the alpha painting.
paintTimer - painTimer keeps track when a repaint should occur.
Returns:
resulting shape if currentShape has been altered, otherwise returns the currentShape. Current Shape is generally altered clip shape.