Can anyone help me with this? I have no idea how to use charAt to do this or what the best way to do this is.
int size = 10; GreenfootImage a = new GreenfootImage("Tes",size,Color.RED,new Color(0,0,0,0)); GreenfootImage b = new GreenfootImage("t",size,Color.BLUE,new Color(0,0,0,0)); GreenfootImage fusion = new GreenfootImage(a.getWidth()+b.getWidth(),size); fusion.drawImage(a, 0,0); fusion.drawImage(b,fusion.getWidth()-b.getWidth(),0);
int size = 10; GreenfootImage a = new GreenfootImage("Tes", size, Color.red, null); GreenfootImage b = new GreenfootImage("Test", size, Color.blue, null); b.drawImage(a, 0, 0);
int size = 24; String text = "Kartoffelbrot"; Color textColor = Color.blue; Color lastColor = Color.red; Color transparent = new Color(0, 0, 0, 0); GreenfootImage image = new GreenfootImage(text, size, lastColor, transparent); String incomplete = text.substring(0, text.length()-1); GreenfootImage partial = new GreenfootImage(incomplete, size, textColor, transparent); image.drawImage(partial, 0, 0);