next up previous contents index
Next: TextArea Up: Base class structures Previous: Square

Star

class Star extends Rectangle {
      dj int n;
      dj int centerX,centerY; 
      dj int x0,y0; 
      dj int angle0; 
      dj int smallDiameter; 
      dj int largeDiameter; 
      dj boolean fill;
}
  The attribute n specifies the number of points in the star. The centerX and centerY are the xy-coordinates of the center. The x0 and y0 are the xy-coordinates and angle0 is the angle of one of the angles. The smallDiameter and largeDiameter are diameters of the inner and outer circles, respectively. The attributes are provided to facilitate the description of stars. As the attributes are closely related to each other, determining one or two of the attributes will determine all other attributes.



Neng-Fa Zhou
1999-02-16