Guest User

Untitled

a guest
Jan 4th, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. //File: PolyLine.cpp
  2. //Implementation of PolyLine class
  3. //Holds constructor and implementation of methods.
  4. #include "PolyLine.h"
  5.  
  6. //Constructor
  7. //Set variables to initial values.
  8. PolyLine::PolyLine()
  9. {
  10.     numPoints = 0;
  11.     r = 0.0;
  12.     g = 0.0;
  13.     b = 0.0;
  14.     polygon = false;
  15. }
  16.  
  17. //InsertPoint
  18. //Insert a point into the current line.
  19. void PolyLine::insertPoint(int x, int y)
  20. {
  21.     points[numPoints].x = x;
  22.     points[numPoints].y = y;
  23.     numPoints++;
  24. }
Add Comment
Please, Sign In to add comment