Package noaa.coastwatch.render
Class GraphicsServices
java.lang.Object
noaa.coastwatch.render.GraphicsServices
The graphics services class defines various static methods relating
to the java.awt.Graphics2D class.
- Since:
- 3.1.1
- Author:
- Peter Hollemans
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Draws a rectangle using a series of lines.static boolean
Determines if the graphics device is raster-based as opposed to vector-based.static boolean
Determines if the graphics device supports colors with an alpha component.static boolean
Determines if the graphics device supports a binary mask with a transparent color.
-
Method Details
-
supportsAlpha
Determines if the graphics device supports colors with an alpha component. -
isRasterDevice
Determines if the graphics device is raster-based as opposed to vector-based. -
supportsBinaryWithTransparency
Determines if the graphics device supports a binary mask with a transparent color. If so, BufferedImage objects may be created with a BufferedImage.TYPE_BYTE_BINARY type and 2 color model in which one of the colors is transparent. The resulting mask image may be drawn over top of existing graphics content and the existing graphics will show through where the mask is set to be transparent. This does not work with all Java implementations, in which case a BufferedImage.TYPE_BYTE_INDEXED type must be used which requires more space in memory. -
drawRect
Draws a rectangle using a series of lines.- Parameters:
g
- the graphics device to draw to.rect
- the rectangle to draw.
-