Documente Academic
Documente Profesional
Documente Cultură
graphics
collage model
create image by adding objects to a canvas
GObject
GLabel
GRect
GOval
GLine
GPoint
GDimension
GCompound
GLabel
GRect
GRectangle
GMath
GObject
GOval
GLine
GPoint
GCompound
GArc
GImage
GPolygon
GLabel
GFillable
GResizable
GScalable
GContainer
G3DRect
GRectangle
GMath
GObject
GRect
GOval
Interfaces:
GRoundRect
GDimension
GLine
GArc
GImage
GPolygon
Interfaces:
GRoundRect
G3DRect
GFillable
GResizable
GScalable
GContainer
GCanvas
add(object)
add(object, x, y)
remove(object)
removeAll()
getElementAt(x, y)
getWidth()
getHeight()
setBackground(c)
GCompound
GLabel
GObject
GRect
GRoundRect
GOval
GLine
GArc
GImage
GPolygon
G3DRect
getX()
getY()
getWidth()
getHeight()
contains(x, y)
setColor(c)
getColor()
setVisible( flag)
isVisible()
sendToFront()
sendToBack()
sendForward()
sendBackward()
Sets the fill state for the object (false =outlined, true =filled)
Returns the fill state for the object
Sets the color used to fill the interior of the object to c
Returns the fill color
HelloProgram
hello, world
origin
height
ascent
baseline
descent
of oval.
Conceptually, steps necessary to define an arc are:
Specify the coordinates and size of the bounding rectangle
Specify start angle (angle at which the arc begins)
Specify sweep angle (how far the arc extends)
GArc Geometry
Assume:
Filled Arcs
GArc class implements GFillable interface
Resizing GImages
public void run() {
GImage image = new GImage("StanfordSeal.gif");
image.scale(1.5, 0.5);
add(image, 0, 0);
}
line segments.
GCompound
GObject
diamond
GLabel
GRect
GRoundRect
GOval
GLine
GArc
GImage
GPolygon
hexagon
G3DRect
DrawDiamond
skip simulation