|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.output.simple_text_renderer | +--sub_arctic.output.shadowed_text_renderer
Object for simple drawing of text in a given font and color with shadowed highlighting. The text is drawn in three parts: a hilight 1 pixel above the final text location, a shadow 1 pixel below the final text location, and finally the actual text itself. This is done in 3 colors: hilight_color, shadow_color, and draw_color respectively. For raised text values of white, black and gray, whereas inset text might be done with black, white, and gray.
Field Summary | |
protected java.awt.Color |
_hilight_color
Color for the hilight above the actual text |
protected java.awt.Color |
_shadow_color
Color for the shadow below the actual text |
Fields inherited from class sub_arctic.output.simple_text_renderer |
_draw_color,
_draw_font,
_metrics |
Constructor Summary | |
shadowed_text_renderer(java.awt.Font in_font,
java.awt.Color in_color,
java.awt.Color hi_color,
java.awt.Color shad_color)
Construct a renderer given a Font and 3 colors to draw the hilight, shadow, and text in. |
Method Summary | |
int |
baseline()
The baseline location associated with this renderer. |
void |
draw_text(drawable on_surface,
int at_x,
int at_y,
java.lang.String txt)
Render text onto the given drawable object at the given location. |
int |
h(java.lang.String txt)
Height that the image of a given string drawn would take up. |
java.awt.Color |
hilight_color()
Color for the higlight above the actual text |
int |
leading()
The amount of spacing to be placed between lines of text rendered with this renderer. |
void |
set_hilight_color(java.awt.Color clr)
Set the color the highlight above the actual text gets drawn in. |
void |
set_shadow_color(java.awt.Color clr)
Set the color the shadow below the actual text gets drawn in. |
java.awt.Color |
shadow_color()
Color for the shadow below the actual text |
int |
w(java.lang.String txt)
Width that the image of a given string drawn would take up. |
Methods inherited from class sub_arctic.output.simple_text_renderer |
draw_color,
draw_font,
set_draw_color,
set_draw_font |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.awt.Color _hilight_color
protected java.awt.Color _shadow_color
Constructor Detail |
public shadowed_text_renderer(java.awt.Font in_font, java.awt.Color in_color, java.awt.Color hi_color, java.awt.Color shad_color)
Font
- in_font font that this renderer uses.Color
- in_color color that the actual text is drawn in.Color
- hi_color color that the hilight above the text is drawn in.Color
- shad_color color that the shadow below the text is drawn in.Method Detail |
public java.awt.Color hilight_color()
public void set_hilight_color(java.awt.Color clr)
Color
- clr the new color to draw the highlight with.public java.awt.Color shadow_color()
public void set_shadow_color(java.awt.Color clr)
Color
- clr the new color to draw the shadow with.public void draw_text(drawable on_surface, int at_x, int at_y, java.lang.String txt)
drawable
- on_surface the drawing surface where we draw the result.int
- at_x x coordinate to draw at.int
- at_y y coordinate to draw at.String
- txt the text to draw.public int w(java.lang.String txt)
String
- txt the string that will be drawn.public int h(java.lang.String txt)
String
- txt the string that will be drawn.public int baseline()
public int leading()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |