sub_arctic.output
Class gradient_text_renderer

java.lang.Object
  |
  +--sub_arctic.output.simple_text_renderer
        |
        +--sub_arctic.output.gradient_text_renderer
Direct Known Subclasses:
linear_gradient_text, radial_gradient_text

public class gradient_text_renderer
extends simple_text_renderer

Object for drawing of text with a gradient pattern.


Field Summary
protected  gradient _draw_gradient
          Gradient to draw text in
 
Fields inherited from class sub_arctic.output.simple_text_renderer
_draw_color, _draw_font, _metrics
 
Constructor Summary
gradient_text_renderer(java.awt.Font in_font, gradient in_grad)
          Construct a renderer given a Font and a gradient.
 
Method Summary
 gradient draw_gradient()
          Gradient to draw text in.
 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.
 void set_draw_gradient(gradient grad)
          Set the gradient to draw text in.
 
Methods inherited from class sub_arctic.output.simple_text_renderer
baseline, draw_color, draw_font, h, leading, set_draw_color, set_draw_font, w
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_draw_gradient

protected gradient _draw_gradient
Gradient to draw text in
Constructor Detail

gradient_text_renderer

public gradient_text_renderer(java.awt.Font in_font,
                              gradient in_grad)
Construct a renderer given a Font and a gradient.
Parameters:
Font - in_font font that this renderer uses.
gradient - in_grad gradient that the actual text is drawn with.
Method Detail

draw_gradient

public gradient draw_gradient()
Gradient to draw text in.
Returns:
gradient the current drawing gradient

set_draw_gradient

public void set_draw_gradient(gradient grad)
Set the gradient to draw text in.
Parameters:
gradient - grad the new gradient for drawing

draw_text

public 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.
Parameters:
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.
Overrides:
draw_text in class simple_text_renderer