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.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_draw_gradient
protected gradient _draw_gradient
- Gradient to draw text in
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.
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