summaryrefslogtreecommitdiff
path: root/ofxHelios/src/colourPolyline.h
blob: 93cefee100e4c97db0309c90c7c788fc0ef79673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "ofPolyline.h"
#include "ofMain.h"

class colourPolyline: public ofPolyline {
	public:

		colourPolyline(){}

		colourPolyline(const ofPolyline line,const ofColor colour){
			for (auto& point:line){
				addVertex(point, colour);
			}
		}

		void clear(){
			ofPolyline::clear();
			pointColours.clear();
		}

		void addVertex( float x, float y);

		void addVertex( const ofPoint& p );

		void addVertex( float x, float y, int r, int g, int b);

		void addVertex( const ofPoint& p , int r, int g, int b);

		void addVertex( const ofPoint& p , const ofColor& c);

		void draw();

		ofColor getColourAt(int i);

	private:

		vector <ofColor> pointColours;

};