-
Notifications
You must be signed in to change notification settings - Fork 0
/
SVGDataCreator.h
37 lines (27 loc) · 892 Bytes
/
SVGDataCreator.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
#ifndef _SVG_DATA_CREATOR_
#define _SVG_DATA_CREATOR_
#include <Shape.h>
#include <Point.h>
#include <String.h>
class BSVGDataCreator : public BShapeIterator {
public:
BSVGDataCreator(BString &target);
virtual ~BSVGDataCreator();
virtual status_t IterateMoveTo(BPoint *point);
virtual status_t IterateLineTo(int32 lineCount, BPoint *linePts);
virtual status_t IterateBezierTo(int32 bezierCount, BPoint *bezierPts);
virtual status_t IterateClose();
private:
friend class BSVGPolyDataCreator;
BString &fTarget;
BPoint *fLast;
};
class BSVGPolyDataCreator : public BSVGDataCreator {
public:
BSVGPolyDataCreator(BString &target);
virtual ~BSVGPolyDataCreator();
virtual status_t IterateMoveTo(BPoint *point); // used once
virtual status_t IterateLineTo(int32 lineCount, BPoint *linePts);
virtual status_t IterateClose(); // not needed
};
#endif