-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFillPathGeometry.h
More file actions
34 lines (26 loc) · 870 Bytes
/
FillPathGeometry.h
File metadata and controls
34 lines (26 loc) · 870 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
#pragma once
#include "Geometry.h"
#include "Path.h"
namespace dawn
{
class FillPathGeometry : public Geometry
{
public:
FillPathGeometry(Path *path, vec4f uv) : m_path(path), m_uv(uv) { }
CONSTANTS::GeometryType type() const { return CONSTANTS::FillPathGeometry; }
Path *path() const { return m_path; }
void path(Path *path) { setChanged(m_path != path); m_path = path; }
vec4f uv() const { return m_uv; }
void uv(vec4f uv) { setChanged(uv != m_uv); m_uv = uv; }
virtual bool isChanged(etag_t *etag, bool recursive) {
bool changed = Geometry::isChanged(etag, recursive);
if (recursive) {
changed |= m_path->isChanged(etag, recursive);
}
return changed;
}
protected:
Path *m_path;
vec4f m_uv;
};
}