Hi all.
I was trying use fillTriangle method in simply code for Nokia 3510i.
import javax.microedition.lcdui.*;
import com.nokia.mid.ui.*;
public class gcanvas extends FullCanvas
{
private gmidlet midlet;
private int width,height;
public gcanvas(gmidlet midlet)
{
this.midlet=midlet;
width=getWidth();
height=getHeight();
}
public void paint(Graphics g)
{
g.setColor(32,32,32);
g.fillRect(0,0,width,height);
DirectGraphics dg = DirectUtils.getDirectGraphics(g);
dg.fillTriangle(0,0,20,50,80,50,0xffffff);
}
public void keyPressed(int keyCode)
{
if(keyCode<0)
midlet.exit();
}
}
But don’t work. There is only black screen.
Have I some error’s there ?

Reply With Quote

