Package org.jpedal.examples.handlers
Class ExampleColorHandler
java.lang.Object
org.jpedal.examples.handlers.ExampleColorHandler
- All Implemented Interfaces:
org.jpedal.external.ColorHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocessImage
(BufferedImage image, int pageNumber, boolean isPrinting) allow user to alter colour (ie to convert to bw)void
setPaint
(Graphics2D g2, org.jpedal.color.PdfPaint col, int pageNumber, boolean isPrinting) allow user to alter colour (ie to convert to bw)
-
Constructor Details
-
ExampleColorHandler
public ExampleColorHandler()
-
-
Method Details
-
setPaint
public void setPaint(Graphics2D g2, org.jpedal.color.PdfPaint col, int pageNumber, boolean isPrinting) allow user to alter colour (ie to convert to bw)- Specified by:
setPaint
in interfaceorg.jpedal.external.ColorHandler
- Parameters:
g2
- The graphics object the paint is being applied tocol
- The paint being applied to the graphics objectpageNumber
- The page that is currently being drawnisPrinting
- Whether the PDF is being used for printing
-
processImage
allow user to alter colour (ie to convert to bw)- Specified by:
processImage
in interfaceorg.jpedal.external.ColorHandler
- Parameters:
image
- The image to processpageNumber
- The page the image is fromisPrinting
- Whether the PDF is being used for printing- Returns:
- A new modified image, or null to not override
-