public class X11GraphicsConfig extends GraphicsConfiguration
GraphicsEnvironment,
GraphicsDevice| Modifier and Type | Field and Description |
|---|---|
(package private) long |
aData |
protected int |
bitsPerPixel |
(package private) int |
colormap |
(package private) ColorModel |
colorModel |
(package private) int |
depth |
(package private) boolean |
doubleBuffer |
protected X11GraphicsDevice |
screen |
RenderLoops |
solidloops |
protected SurfaceType |
surfaceType |
protected int |
visual |
| Modifier | Constructor and Description |
|---|---|
protected |
X11GraphicsConfig(X11GraphicsDevice device,
int visualnum,
int depth,
int colormap,
boolean doubleBuffer) |
| Modifier and Type | Method and Description |
|---|---|
Image |
createAcceleratedImage(Component target,
int width,
int height)
Creates a new hidden-acceleration image of the given width and height
that is associated with the target Component.
|
long |
createBackBuffer(X11ComponentPeer peer,
int numBuffers,
BufferCapabilities caps)
Attempts to create an XDBE-based backbuffer for the given peer.
|
VolatileImage |
createBackBufferImage(Component target,
long backBuffer)
Creates a VolatileImage that essentially wraps the target Component's
backbuffer, using the provided backbuffer handle.
|
BufferedImage |
createCompatibleImage(int width,
int height)
Returns a BufferedImage with channel layout and color model
compatible with this graphics configuration.
|
SurfaceData |
createSurfaceData(X11ComponentPeer peer)
Creates a new SurfaceData that will be associated with the given
X11ComponentPeer.
|
void |
destroyBackBuffer(long backBuffer)
Destroys the backbuffer object represented by the given handle value.
|
void |
flip(X11ComponentPeer peer,
Component target,
VolatileImage xBackBuffer,
int x1,
int y1,
int x2,
int y2,
BufferCapabilities.FlipContents flipAction)
Performs the native XDBE flip operation for the given target Component.
|
long |
getAData() |
int |
getBitsPerPixel()
Returns a number of bits allocated per pixel
(might be different from depth)
|
Rectangle |
getBounds()
Returns the bounds of the
GraphicsConfiguration
in the device coordinates. |
BufferCapabilities |
getBufferCapabilities()
Returns the buffering capabilities of this
GraphicsConfiguration. |
int |
getColormap()
Returns the colormap associated with this configuration.
|
ColorModel |
getColorModel()
Returns the color model associated with this configuration.
|
ColorModel |
getColorModel(int transparency)
Returns the color model associated with this configuration that
supports the specified transparency.
|
static X11GraphicsConfig |
getConfig(X11GraphicsDevice device,
int visualnum,
int depth,
int colormap,
boolean doubleBuffer) |
static X11GraphicsConfig |
getConfig(X11GraphicsDevice device,
int visualnum,
int depth,
int colormap,
int type) |
AffineTransform |
getDefaultTransform()
Returns the default Transform for this configuration.
|
int |
getDepth()
Returns the depth associated with this configuration.
|
GraphicsDevice |
getDevice()
Return the graphics device associated with this configuration.
|
ImageCapabilities |
getImageCapabilities()
Returns the image capabilities of this
GraphicsConfiguration. |
AffineTransform |
getNormalizingTransform()
Returns a Transform that can be composed with the default Transform
of a Graphics2D so that 72 units in user space will equal 1 inch
in device space.
|
RenderLoops |
getSolidLoops(SurfaceType stype)
Return the RenderLoops this type of destination uses for
solid fills and strokes.
|
SurfaceType |
getSurfaceType() |
int |
getVisual()
Returns the visual id associated with this configuration.
|
boolean |
isDoubleBuffered() |
Rectangle |
pGetBounds(int screenNum) |
String |
toString()
Returns a string representation of the object.
|
createCompatibleImage, createCompatibleVolatileImage, createCompatibleVolatileImage, createCompatibleVolatileImage, createCompatibleVolatileImageprotected X11GraphicsDevice screen
protected int visual
int depth
int colormap
ColorModel colorModel
long aData
boolean doubleBuffer
protected int bitsPerPixel
protected SurfaceType surfaceType
public RenderLoops solidloops
protected X11GraphicsConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, boolean doubleBuffer)
public static X11GraphicsConfig getConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, boolean doubleBuffer)
public static X11GraphicsConfig getConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, int type)
public GraphicsDevice getDevice()
getDevice in class GraphicsConfigurationGraphicsDevice object that is
associated with this GraphicsConfiguration.public int getVisual()
public int getDepth()
public int getColormap()
public int getBitsPerPixel()
public SurfaceType getSurfaceType()
public RenderLoops getSolidLoops(SurfaceType stype)
public BufferedImage createCompatibleImage(int width, int height)
createCompatibleImage in class GraphicsConfigurationwidth - the width of the returned BufferedImageheight - the height of the returned BufferedImageBufferedImage whose data layout and color
model is compatible with this GraphicsConfiguration.public ColorModel getColorModel()
getColorModel in class GraphicsConfigurationColorModel object that is associated with
this GraphicsConfiguration.public ColorModel getColorModel(int transparency)
getColorModel in class GraphicsConfigurationtransparency - the specified transparency modeColorModel object that is associated with
this GraphicsConfiguration and supports the
specified transparency or null if the transparency is not a valid
value.Transparency.OPAQUE,
Transparency.BITMASK,
Transparency.TRANSLUCENTpublic AffineTransform getDefaultTransform()
getDefaultTransform in class GraphicsConfigurationAffineTransform for this
GraphicsConfiguration.public AffineTransform getNormalizingTransform()
GraphicsConfiguration gc = g.getGraphicsConfiguration();
g.setTransform(gc.getDefaultTransform());
g.transform(gc.getNormalizingTransform());
Note that sometimes this Transform will be identity (e.g. for
printers or metafile output) and that this Transform is only
as accurate as the information supplied by the underlying system.
For image buffers, this Transform will be the Identity transform,
since there is no valid distance measurement.getNormalizingTransform in class GraphicsConfigurationAffineTransform to concatenate to the
default AffineTransform so that 72 units in user
space is mapped to 1 inch in device space.public long getAData()
public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public Rectangle getBounds()
GraphicsConfigurationGraphicsConfiguration
in the device coordinates. In a multi-screen environment
with a virtual device, the bounds can have negative X
or Y origins.getBounds in class GraphicsConfigurationGraphicsConfiguration.public Rectangle pGetBounds(int screenNum)
public BufferCapabilities getBufferCapabilities()
GraphicsConfigurationGraphicsConfiguration.getBufferCapabilities in class GraphicsConfigurationpublic ImageCapabilities getImageCapabilities()
GraphicsConfigurationGraphicsConfiguration.getImageCapabilities in class GraphicsConfigurationpublic boolean isDoubleBuffered()
public SurfaceData createSurfaceData(X11ComponentPeer peer)
public Image createAcceleratedImage(Component target, int width, int height)
public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException
AWTExceptionpublic void destroyBackBuffer(long backBuffer)
public VolatileImage createBackBufferImage(Component target, long backBuffer)
public void flip(X11ComponentPeer peer, Component target, VolatileImage xBackBuffer, int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction)