Package Name: java.awt.graphics

Return to: Package List


with java.lang; use java.lang;
with java.awt.FontMetrics; use java.awt.FontMetrics;
with java.awt.Font; use java.awt.Font;
with java.lang.String; use java.lang.String;
with java.awt.Polygon; use java.awt.Polygon;
with java.awt.Color; use java.awt.Color;
with java.awt.Rectangle; use java.awt.Rectangle;
-- with java.awt.image.ImageObserver; use java.awt.image.ImageObserver;
-- with java.awt.Image; use java.awt.Image;
    -- All drawImage ops moved to java.awt.Image

package java.awt.Graphics is
    type Graphics_Obj is abstract new Object with null record;

    type Graphics_Ptr is access all Graphics_Obj'Class;

    function create(Obj : access Graphics_Obj) return Graphics_Ptr;
    function create(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer)

      return Graphics_Ptr;
    procedure translate(Obj : access Graphics_Obj;
        x : Integer;

        y : Integer);

    function getColor(Obj : access Graphics_Obj) return Color_Ptr;
    procedure setColor(Obj : access Graphics_Obj;

        c : Color_Ptr);

    procedure setPaintMode(Obj : access Graphics_Obj);
    procedure setXORMode(Obj : access Graphics_Obj;

        c1 : Color_Ptr);

    function getFont(Obj : access Graphics_Obj) return Font_Ptr;
    procedure setFont(Obj : access Graphics_Obj;

        font : Font_Ptr);

    function getFontMetrics(Obj : access Graphics_Obj) return FontMetrics_Ptr;
    function getFontMetrics(Obj : access Graphics_Obj;
        f : Font_Ptr)

      return FontMetrics_Ptr;

    function getClipRect(Obj : access Graphics_Obj) return Rectangle_Ptr;
    procedure clipRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;

        height : Integer);
    procedure copyArea(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer;
        dx : Integer;

        dy : Integer);
    procedure drawLine(Obj : access Graphics_Obj;
        x1 : Integer;
        y1 : Integer;
        x2 : Integer;

        y2 : Integer);
    procedure fillRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;

        height : Integer);
    procedure drawRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;

        height : Integer);
    procedure clearRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;

        height : Integer);
    procedure drawRoundRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer;
        arcWidth : Integer;

        arcHeight : Integer);
    procedure fillRoundRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer;
        arcWidth : Integer;

        arcHeight : Integer);
    procedure draw3DRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer;

        raised : Boolean);
    procedure fill3DRect(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer;

        raised : Boolean);
    procedure drawOval(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;

        height : Integer);
    procedure fillOval(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;

        height : Integer);
    procedure drawArc(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer;
        startAngle : Integer;

        arcAngle : Integer);
    procedure fillArc(Obj : access Graphics_Obj;
        x : Integer;
        y : Integer;
        width : Integer;
        height : Integer;
        startAngle : Integer;

        arcAngle : Integer);
    procedure drawPolygon(Obj : access Graphics_Obj;
        xPoints : Polygon.Coord_Array;
        yPoints : Polygon.Coord_Array;

        nPoints : Integer);
    procedure drawPolygon(Obj : access Graphics_Obj;

        p : Polygon_Ptr);
    procedure fillPolygon(Obj : access Graphics_Obj;
        xPoints : Polygon.Coord_Array;
        yPoints : Polygon.Coord_Array;

        nPoints : Integer);
    procedure fillPolygon(Obj : access Graphics_Obj;

        p : Polygon_Ptr);
    procedure drawString(Obj : access Graphics_Obj;
        str : String_Ptr;
        x : Integer;

        y : Integer);
    procedure drawChars(Obj : access Graphics_Obj;
        data : Wide_String;
        offset : Integer;
        length : Integer;
        x : Integer;

        y : Integer);
    procedure drawBytes(Obj : access Graphics_Obj;
        data : String;
        offset : Integer;
        length : Integer;
        x : Integer;

        y : Integer);

    procedure dispose(Obj : access Graphics_Obj);

    procedure finalize(Obj : access Graphics_Obj);

    function toString(Obj : access Graphics_Obj) return String_Ptr;
    pragma Import(Java, setFont);
    pragma Import(Java, translate);
    pragma Import(Java, clipRect);
    pragma Import(Java, create);
    pragma Import(Java, getFont);
    pragma Import(Java, getFontMetrics);
    pragma Import(Java, fillRoundRect);
    pragma Import(Java, drawOval);
    pragma Import(Java, drawPolygon);
    pragma Import(Java, setXORMode);
    pragma Import(Java, clearRect);
    pragma Import(Java, setPaintMode);
    pragma Import(Java, draw3DRect);
    pragma Import(Java, fillPolygon);
    pragma Import(Java, drawArc);
    pragma Import(Java, fillRect);
    pragma Import(Java, fill3DRect);
    pragma Import(Java, drawBytes);
    pragma Import(Java, getClipRect);
    pragma Import(Java, drawLine);
    pragma Import(Java, fillArc);
    pragma Import(Java, drawRoundRect);
    pragma Import(Java, drawChars);
    pragma Import(Java, setColor);
    pragma Import(Java, drawString);
    pragma Import(Java, fillOval);
    pragma Import(Java, dispose);
    pragma Import(Java, toString);
    pragma Import(Java, copyArea);
    pragma Import(Java, getColor);
    pragma Import(Java, finalize);


    pragma Import(Java, drawRect);
end java.awt.Graphics;