GRAPHIC FUNCTIONS


setColor (Color); setFont(Font); drawLine (x1,y1,x2,y2); drawString (String,x,y); drawRect (x,y,width,height); fillRect (x,y,width,height); drawRoundRect (x,y,width,height,cornerwidth,cornerheight);

        drawRoundRect (50,50,100,200,10,10);

fillRoundRect (x,y,width,height,cornerwidth,cornerheight);

        fillRoundRect (50,50,100,200,10,10);

draw3DRect (x,y,width,height,braise);

        draw3DRect (50,50,100,200,TRUE);    // raised rectangle
        draw3DRect (50,50,100,200,FALSE);  // indented rectangle

drawOval (x,y,width,height);

fillOval (x,y,width,height); drawArc (x,y,width,height,startAngle,arcAngle); fillArc (x,y,width,height,startAngle,arcAngle);

Drawing and Filling a Polygon

1.  Create a new polygon object.

        Polygon p = new Polygon();

2.  Add points to the polygon, repeating the first point to close the polygon.  For example, the following code creates a triangle.

        p.addPoint (100,100);
        p.addPoint (150,200);
        p.addPoint (50,200);
        p.addPoint (100,100);

3.  Draw or fill the polygon.

        g.drawPolygon (p);
        g.fillPolygon (p);


RETURN.

Modified 10-12-98. RSL