|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.widgets.base.widget.WidgetBackground
public class WidgetBackground
This class encapsulates a Widget
's effective background.
This can be a simple color or a scaled image.
Constructor Summary | |
---|---|
WidgetBackground(Widget widget,
BackgroundProperty property)
|
Method Summary | |
---|---|
java.awt.Color |
getColor()
Gets the Color from this WidgetBackground . |
int |
getHeight()
|
TextureImage2D |
getMergedTexture()
Gets the merged background, composed of the backgrounds of this (possibly assembled) Widget and the parts of this Widget. |
float |
getScaleX()
Gets the factor, by which the background image has been scaled to fit the area. |
float |
getScaleY()
Gets the factor, by which the background image has been scaled to fit the area. |
TextureImage2D |
getTexture()
Gets the TextureImage2D from this BackgroundProperty . |
BackgroundProperty.BackgroundType |
getType()
Gets the current type of this background. |
int |
getWidth()
|
boolean |
valueEquals(java.awt.Color color)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WidgetBackground(Widget widget, BackgroundProperty property)
Method Detail |
---|
public final BackgroundProperty.BackgroundType getType()
public final java.awt.Color getColor()
Color
from this WidgetBackground
.
The result is only valid, if the BackgroundProperty.BackgroundType
(getType()
) is BackgroundProperty.BackgroundType.COLOR
.
Color
from this WidgetBackground
.public final int getWidth()
public final int getHeight()
public final TextureImage2D getTexture()
TextureImage2D
from this BackgroundProperty
.
The result is only valid, if the BackgroundProperty.BackgroundType
(getType()
) is BackgroundProperty.BackgroundType.IMAGE
.
TextureImage2D
from this BackgroundProperty
.public final TextureImage2D getMergedTexture()
Widget
and the parts of this Widget.
If this Widget
is not an AbstractAssembledWidget
and has a background color (no image)
and doesn't override the Widget.drawBackground(net.ctdp.rfdynhud.gamedata.LiveGameData, boolean, TextureImage2D, int, int, int, int, boolean)
method,
this method returns null
.
null
.public final float getScaleX()
public final float getScaleY()
public final boolean valueEquals(java.awt.Color color)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |