Package com.sun.pdfview
Class PDFPaint
- java.lang.Object
-
- com.sun.pdfview.PDFPaint
-
- Direct Known Subclasses:
PatternType1.TilingPatternPaint
public class PDFPaint extends java.lang.Object
PDFPaint is some kind of shader that knows how to fill a path. At the moment, only a solid color is implemented, but gradients and textures should be possible, too.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Paint
mainPaint
-
Constructor Summary
Constructors Modifier Constructor Description protected
PDFPaint(java.awt.Paint p)
create a new PDFPaint based on a solid color
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2D
fill(PDFRenderer state, java.awt.Graphics2D g, java.awt.geom.GeneralPath s)
fill a path with the paint, and record the dirty area.static PDFPaint
getColorPaint(java.awt.Color c)
get the PDFPaint representing a solid colorjava.awt.Paint
getPaint()
get the primary color associated with this PDFPaint.static PDFPaint
getPaint(java.awt.Paint p)
get the PDFPaint representing a generic paint
-
-
-
Method Detail
-
getColorPaint
public static PDFPaint getColorPaint(java.awt.Color c)
get the PDFPaint representing a solid color
-
getPaint
public static PDFPaint getPaint(java.awt.Paint p)
get the PDFPaint representing a generic paint
-
fill
public java.awt.geom.Rectangle2D fill(PDFRenderer state, java.awt.Graphics2D g, java.awt.geom.GeneralPath s)
fill a path with the paint, and record the dirty area.- Parameters:
state
- the current graphics stateg
- the graphics into which to draws
- the path to fill
-
getPaint
public java.awt.Paint getPaint()
get the primary color associated with this PDFPaint.
-
-