-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSVGStop.h
39 lines (28 loc) · 918 Bytes
/
SVGStop.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
#ifndef _SVG_STOP_H_
#define _SVG_STOP_H_
#include <Archivable.h>
#include <GraphicsDefs.h>
#include <Message.h>
#include "SVGElement.h"
class BSVGStop : public BSVGElement {
public:
BSVGStop();
BSVGStop(BSVGStop *stop);
BSVGStop(rgb_color color, float offset, float opacity = 1.0);
BSVGStop(uchar r, uchar g, uchar b, float offset, float opacity = 1.0);
// offset is a value from 0 to 1; it represents
// a percentage of the gradient's vector
virtual ~BSVGStop();
BSVGStop(BMessage *data);
static BArchivable *Instantiate(BMessage *data);
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual element_t Type() { return B_SVG_STOP; };
virtual void HandleAttribute(attribute_s *attr);
virtual void RecreateData();
void SetOffset(float offset);
float Offset() const;
bool IsOpaque() const;
private:
float fOffset;
};
#endif // STOP_H_