public interface GraphicsUtils
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
copyBufferedImage(java.awt.image.BufferedImage img)
Produces a copy of a buffered image with the same graphic content (pixel color)
|
java.awt.image.BufferedImage |
createBufferedImage(int w,
int h,
int type)
Create a buffered Image of the given size and type.
|
PrintAttributes |
createPrintAttributes()
Creates an object that implements the PrintAttributes interface with default/trivial values.
|
java.awt.Font |
deriveFont(java.awt.Font srcfont,
float newheight)
Returns an istance of Font which is the same as the one provided except for the size.
|
int |
getScreenDPI()
Returns device screen DPI (dots per inch)
|
void |
setRenderingHintsForDrawing(java.awt.Graphics2D g)
Sets the rendering hints to the Graphics2D object in a way that is suitable for drawing.
|
void |
setRenderingHintsForPrinting(java.awt.Graphics2D g)
Sets the rendering hints to the Graphics2D object in a way that is suitable for printing.
|
void |
translate(java.awt.Graphics2D g,
double x,
double y)
Adds a translation operation to the Graphics2D object's transformation matrix.
|
java.awt.image.BufferedImage createBufferedImage(int w,
int h,
int type)
w - width in pixels of the requested imageh - height in pixels of the requested imagetype - image type (refers to bands, etc. see Imagejava.awt.image.BufferedImage copyBufferedImage(java.awt.image.BufferedImage img)
img - image to be copiedjava.awt.Font deriveFont(java.awt.Font srcfont,
float newheight)
srcfont - provided font to be used as modelnewheight - height in pixels of the new fonrint getScreenDPI()
void translate(java.awt.Graphics2D g,
double x,
double y)
g - Object whose transformation matrix has to be modifiedx - horizontal offset of the translationy - vertical offset of the translationPrintAttributes createPrintAttributes()
void setRenderingHintsForDrawing(java.awt.Graphics2D g)
g - the Graphics2D object whose rendering hints have to be set for drawingvoid setRenderingHintsForPrinting(java.awt.Graphics2D g)
g - the Graphics2D object whose rendering hints have to be set for printing