Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //File: PolyLine.cpp
- //Implementation of PolyLine class
- //Holds constructor and implementation of methods.
- #include "PolyLine.h"
- //Constructor
- //Set variables to initial values.
- PolyLine::PolyLine()
- {
- numPoints = 0;
- r = 0.0;
- g = 0.0;
- b = 0.0;
- polygon = false;
- }
- //InsertPoint
- //Insert a point into the current line.
- void PolyLine::insertPoint(int x, int y)
- {
- points[numPoints].x = x;
- points[numPoints].y = y;
- numPoints++;
- }
Add Comment
Please, Sign In to add comment