|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.havi.ui.HScreenConfiguration
org.havi.ui.HGraphicsConfiguration
The HGraphicsConfiguration
class describes the characteristics
(settings) of an HGraphicsDevice
.
There can be many HGraphicsConfiguration
objects
associated with a single HGraphicsDevice
.
Parameter | Description | Default value | Set method | Get method |
---|---|---|---|---|
None. |
Description | Default value | Set method | Get method |
---|---|---|---|
None. |
HGraphicsDevice
Constructor Summary | |
protected |
HGraphicsConfiguration()
It is not intended that applications should directly construct HGraphicsConfiguration objects.
|
Method Summary | |
void |
dispose(java.awt.Color c)
This method is used by an application when a color returned from those versions of the method getPunchThroughToBackgroundColor with a Color as a parameter is no longer required. |
java.awt.Font[] |
getAllFonts()
List the fonts that are always available on the device, but does not list fonts that may be (temporarily) available for download from other sources. |
java.awt.Image |
getCompatibleImage(java.awt.Image input,
HImageHints ih)
Generate a java.awt.Image which may be a modified copy of the image passed as input . |
HScreenRectangle |
getComponentHScreenRectangle(java.awt.Component component)
Returns the on-screen location of a given visible java.awt.Component as an HScreenRectangle
for this HGraphicsDevice . |
HGraphicsConfigTemplate |
getConfigTemplate()
Returns an HGraphicsConfigTemplate object that describes and uniquely
identifies this HGraphicsConfiguration .
|
HGraphicsDevice |
getDevice()
Returns the HGraphicsDevice
associated with this HGraphicsConfiguration . |
java.awt.Rectangle |
getPixelCoordinatesHScreenRectangle(HScreenRectangle sr,
java.awt.Container cont)
Returns a java.awt.Rectangle which contains the graphics (AWT) pixel area for an HScreenRectangle
relative to the supplied java.awt.Container. |
java.awt.Color |
getPunchThroughToBackgroundColor(java.awt.Color color,
int percentage)
This method returns a Color that may be used in standard graphics drawing operations, which has the effect of "punching though" all Components that are behind the Component in which the drawing operation is performed. |
java.awt.Color |
getPunchThroughToBackgroundColor(java.awt.Color color,
int percentage,
HVideoDevice v)
This method returns a Color that may be used in standard graphics drawing operations, which has the effect of modifying the existing color of a pixel to make it partially (or wholly) transparent to the background. |
java.awt.Color |
getPunchThroughToBackgroundColor(int percentage)
This method returns a Color that may be used in standard graphics drawing operations, which has the effect of modifying the existing color of a pixel to make it partially (or wholly) transparent to the background. |
java.awt.Color |
getPunchThroughToBackgroundColor(int percentage,
HVideoDevice hvd)
This method returns a Color that may be used in standard graphics drawing operations, which has the effect of "punching though" the HGraphicsDevice in which the
drawing operation is performed. |
Methods inherited from class org.havi.ui.HScreenConfiguration |
convertTo, getFlickerFilter, getInterlaced, getOffset, getPixelAspectRatio, getPixelResolution, getScreenArea |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected HGraphicsConfiguration()
HGraphicsConfiguration
objects.
Creates an HGraphicsConfiguration
object.
See the class description for
details of constructor parameters and default values.
Method Detail |
public HGraphicsDevice getDevice()
HGraphicsDevice
associated with this HGraphicsConfiguration
.
HGraphicsDevice
object that is associated with this HGraphicsConfiguration
,public HGraphicsConfigTemplate getConfigTemplate()
HGraphicsConfigTemplate
object that describes and uniquely
identifies this HGraphicsConfiguration
.
Hence, the following sequence should return the original HGraphicsConfiguration
.
HGraphicsDevice.getBestMatch(HGraphicsConfiguration.getConfigTemplate())
Features that are implemented in the HGraphicsConfiguration
will
return HScreenConfigTemplate.REQUIRED
priority. Features that are not implemented in the HGraphicsConfiguration
will return HScreenConfigTemplate.REQUIRED_NOT
priority. Preferences that are not filled in by
the platform will return HScreenConfigTemplate.DONT_CARE
priority.
HGraphicsConfigTemplate
object which both describes and
uniquely identifies this HGraphicsConfiguration
.public HScreenRectangle getComponentHScreenRectangle(java.awt.Component component)
HScreenRectangle
for this HGraphicsDevice
.
component
- the java.awt.Component whose on-screen area is
to be determined.
HScreenRectangle
for this HGraphicsDevice
, or null if the
component is not currently added to the HScene
(or one of its "child"
containers).HScreenRectangle
public java.awt.Rectangle getPixelCoordinatesHScreenRectangle(HScreenRectangle sr, java.awt.Container cont)
HScreenRectangle
relative to the supplied java.awt.Container.
sr
- the screen location expressed as an HScreenRectangle
.cont
- the java.awt.Container in whose coordinate system
the screen location should be expressed.
HScreenRectangle
relative to the supplied
java.awt.Container. The returned x, y, width, height values in
the java.awt.Rectangle should be such that a
HScreenRectangle
, subject to
clipping by its parent container, cont.
Note that the HScreenRectangle
(HScreenPoint
) coordinates are in
floats - conversion to pixel
coordinate systems necessarily implies a potential loss of
precision - however, such conversion should be to the
"nearest" integer pixel coordinate.
public java.awt.Image getCompatibleImage(java.awt.Image input, HImageHints ih)
input
. Such a copy is
modified as necessary such that it is compatible with the
current HGraphicsConfiguration
.
For example this may involve dithering
the image to a restricted color palette. In the case where no
modification is required a reference to the original image
input
will be returned instead of a separate new
java.awt.Image.
Note: Unmodified Images, or Images modified for other HGraphicsConfiguration
should still be able to be rendered within this HGraphicsConfiguration
, but
may not be as efficient (rapid) in terms of rendering, and may
not be presented optimally. For example, an 8 bit per RGB
pixel image loaded onto a configuration with a 4 bit per RGB
pixel framebuffer may have its pixel values truncated, if
this Image is then displayed on an alternate configuration with
16 bits per RGB pixel then it will obviously not be
displayed optimally.
The HImageHints
provide a
mechanism to indicate how any conversion to a constrained
graphics environment might best be performed, by describing the
general image contents.
It is implementation (and algorithmically) dependent whether this method operates on partial, or complete Image pixel data.
input
- the java.awt.Image to be modifiedih
- an HImageHints
object
that indicates the expected type of the input Image, so that
its presentation can be optimally adjusted.
HGraphicsDevice
associated with
this HGraphicsConfiguration
.
Note that on some HGraphicsConfiguration
a
reference to the original Image may be returned, this is
especially true for systems with high-end graphics
capabilities.public java.awt.Font[] getAllFonts()
public java.awt.Color getPunchThroughToBackgroundColor(int percentage)
The existing RGB values of the pixel are unchanged as far as possible, within the limits of the platform. Platforms with restricted color spaces may make approximations as required to obtain the best possible match.
The precise contents of the background are as defined by the
platform including any HBackgroundDevice
, etc.
percentage
- the new blending value for each pixel drawn
with this color with respect to what is outside this HGraphicsConfiguration
. The
specified value will be clamped to the range 0 to 100.
public java.awt.Color getPunchThroughToBackgroundColor(int percentage, HVideoDevice hvd)
HGraphicsDevice
in which the
drawing operation is performed. The specified HVideoDevice
is revealed through the
drawn "hole". The value specified replaces the
blending value (with respect to this HVideoDevice
) of each pixel drawn
with this color. The existing RGB values of the pixel are
unchanged as far as possible within the limits of the platform.
Platforms with restricted color spaces may make approximations
as required to obtain the best match possible.
percentage
- the new alpha value for each pixel drawn with
this color with respect to the the HVideoDevice
specified. The specified
value will be clamped to the range 0 to 100.hvd
- the HVideoDevice
to
reveal.
public java.awt.Color getPunchThroughToBackgroundColor(java.awt.Color color, int percentage)
HGraphicsConfiguration
is revealed through the drawn
"hole" blended with the graphics color specified as
the first parameter to this method. Platforms with restricted
color spaces may make approximations as required to obtain the
best match possible.
color
- the graphics color to blendpercentage
- the blending value for this color with
respect to what is outside this HGraphicsConfiguration
. The
specified value will be clamped to the range 0 to 100.
public java.awt.Color getPunchThroughToBackgroundColor(java.awt.Color color, int percentage, HVideoDevice v)
The existing RGB values of the pixel are unchanged as far as possible, within the limits of the platform. Platforms with restricted color spaces may make approximations as required to obtain the best possible match.
The precise contents of the background are as defined by the
platform including any HBackgroundDevice
, etc.
color
- the graphics color to blendpercentage
- the alpha value for this color with respect
to what is outside this HGraphicsConfiguration
. The
specified value will be clamped to the range 0 to 100.v
-
public void dispose(java.awt.Color c)
c
- the Color which is no longer required.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |