-
Notifications
You must be signed in to change notification settings - Fork 0
/
SketchElement.h
40 lines (35 loc) · 983 Bytes
/
SketchElement.h
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
#pragma once
#include "afx.h"
#include "Vec2f.h"
class SketcherEngine;
class SketchElement :
public CObject
{
public:
SketchElement(void);
~SketchElement(void);
public:
void SetColor(COLORREF color) { m_color=color; }
void SetMarkAngle(float angle) { m_fMarkAngle=angle; }
void SetMarkLength(int len) { m_iMarkLength=len; }
void SetMarkThickness(int t) { m_iMarkThickness = t; }
void SetMarkShape(int iShape) { m_iMarkShape=iShape; }
void SetDrawConstraint(int iCanvasWidth, int iCanvasHeight);
void SetDirectedDraw(bool bDirected) { m_bDirectedDraw=bDirected; }
void SetOrientation(const Vec2f& orientation) { m_orientation=orientation; }
public:
virtual void Draw(SketcherEngine* pSketcher, CDC* pDC)=0;
protected:
COLORREF m_color;
float m_fMarkAngle;
int m_iMarkThickness;
int m_iMarkShape;
int m_iMarkLength;
int m_iCanvasWidth;
int m_iCanvasHeight;
bool m_bDirectedDraw;
Vec2f m_orientation;
CPoint m_pos;
public:
void SetPosition(int x, int y);
};