-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlineDrawer.h
More file actions
41 lines (31 loc) · 792 Bytes
/
lineDrawer.h
File metadata and controls
41 lines (31 loc) · 792 Bytes
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
40
41
/*
Copyright (c) 2013 Auston Sterling
See license.txt for copying permission.
-----LineDrawer Class Declaration-----
Auston Sterling
austonst@gmail.com
Contains the declaration of the LineDrawer class, which draws (currently) Bresenham
lines on an assigned SDL_Surface*.
*/
#ifndef _linedrawer_h_
#define _linedrawer_h_
#include "vec2f.h"
#include <SDL/SDL.h>
class LineDrawer
{
public:
//Constructors
LineDrawer();
LineDrawer(SDL_Surface* insurf);
//Mutators
void setSurface(SDL_Surface* insurf) {surf_ = insurf;}
//General use functions
void line(Vec2f p1, Vec2f p2, SDL_Color c);
void line(Vec2f p1, Vec2f p2, SDL_Color c1, SDL_Color c2);
private:
//The SDL_Surface to draw to
SDL_Surface* surf_;
//Any other settings?
//...
};
#endif