PolyShape


[ Index | Source | Summary | Member Functions ]
 

Quick Index


Class Summary

class PolyShape
{
public:
PolyShape(int x, int y);
void Up (int amount);
void Down (int amount);
void Left (int amount);
void Right(int amount);
void Mark();
void Draw(Canvas& canvas);
~PolyShape();
}; // PolyShape

Back to the top of PolyShape

  


PolyShape(int x, int y);

Initialize the first node (vertex) and "current" point of the PolyShape with the specified x and y coordinates.
        PolyShape(int x, int y);
Back to the top of PolyShape


void Up (int amount);

Move the "current" point toward the top edge of the display area by the specified amount. Distances are measured in pixels.
        void Up   (int amount);
Back to the top of PolyShape


void Down (int amount);

Move the "current" point toward the botton edge of the display area by the specified amount. Distances are measured in pixels.
        void Down (int amount);
Back to the top of PolyShape


void Left (int amount);

Move the "current" point toward the left edge of the display area by the specified amount. Distances are measured in pixels.
        void Left (int amount);
Back to the top of PolyShape


void Right(int amount);

Move the "current" point toward the right edge of the display area by the specified amount. Distances are measured in pixels.
        void Right(int amount);
Back to the top of PolyShape


void Mark();

Add the "current" point as the next node (vertex) of closed polygon.
        void Mark();
Back to the top of PolyShape


void Draw(Canvas& canvas);

Draw the closed polygon described by the nodes of the PolyShape. The PolyShape is drawn by drawing line segments connecting successive pairs of nodes (vertices) defined in the PolyShape. The PolyShape drawing is closed by drawing a line from the last node (vertex) to the first node (vertex). The drawing is done in the specified Canvas.
        void Draw(Canvas& canvas);
Back to the top of PolyShape


~PolyShape();

Reclaim the resources associated with the PolyShape when the PolyShape object is destructed. The resources include the list of nodex (vertices) and their supporting data structure components.
        ~PolyShape();
Back to the top of PolyShape


Member Functions

public:
void Up (int amount);
void Down (int amount);
void Left (int amount);
void Right(int amount);
void Mark();
void Draw(Canvas& canvas);
Back to the top of PolyShape

 



Generated from source by the Cocoon utilities on Thu Apr 02 12:40:35 1998 .

 

Report problems to jkotula@unimax.com