net.petterroea.starterkit
Class FontShader
java.lang.Object
net.petterroea.starterkit.FontShader
public class FontShader
- extends java.lang.Object
THIS IS NOT ACTUALLY A SHADER!!!
It is a piece of code that you use for manipulating the font, like adding fancy sine waves^^
To use it, create a instance of this, and override the doPixel method.
- Author:
- petterroea
|
Method Summary |
int |
doPixel(int x,
int y,
int src,
int screenx,
int screeny)
Override this to edit pixels |
java.awt.image.BufferedImage |
render(java.awt.image.BufferedImage src,
int screenx,
int screeny)
You should not pay attention to this. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FontShader
public FontShader()
render
public java.awt.image.BufferedImage render(java.awt.image.BufferedImage src,
int screenx,
int screeny)
- You should not pay attention to this. It is used by the Font class to modify a letter. Can be used for all BufferedImages, tho ;)(hint, hint)
- Parameters:
src - The source imagescreenx - X coordinate on screen that the image is going to be drawnscreeny - Y coordinate on screen that the image is going to be drawn
- Returns:
- A modified, edited, manimpulated image
doPixel
public int doPixel(int x,
int y,
int src,
int screenx,
int screeny)
- Override this to edit pixels
- Parameters:
x - The x coordinate in the imagey - The y coordinate in the imagesrc - The rgb color value. (HINT: Use Color(src) to and Color.getRed() and so on to get the different colors, and then Color.setRed() and so on and Color.getRGB() to get the returning intscreenx - X coordinate on the screen that the IMAGE is drawn. Use screenx + x to get the absolute positionscreeny - Y coordinate on the screen that the IMAGE is drawn. Use screeny + y to get the absolute position.
- Returns:
- The rgb color to put back into the image.