* VertexSource virtualizes the AGG "VertexSource" interface * Transformer is an interface for building pipelines of VertexSource objects, each taking the output of the previous object and transforming it in some way * StrokeTransformer is currently the only implementation and converts a path into an outline stroke * PathSource implements the VertexSource interface on top of a VectorPath which it converts into an agg::path_storage and into an agg::conv_curve<agg::path_storage> to get smooth bezier curves * added VertexSource() to Shape class, which returns the last object of the transformation pipeline, it uses a PathSource for the root object * changed IconRenderer to use the new polymorphic VertexSource pipeline git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17896 a95241bf-73f2-0310-859d-f6bbb57e9c96
50 lines
959 B
C++
50 lines
959 B
C++
#ifndef SHAPE_H
|
|
#define SHAPE_H
|
|
|
|
#include <List.h>
|
|
#include <Rect.h>
|
|
|
|
#include "Observable.h"
|
|
#include "PathContainer.h"
|
|
#include "PathSource.h"
|
|
#include "Referenceable.h"
|
|
|
|
class Style;
|
|
|
|
class Shape : public Observable,
|
|
public Referenceable,
|
|
public PathContainerListener {
|
|
public:
|
|
Shape(::Style* style);
|
|
virtual ~Shape();
|
|
|
|
// PathContainerListener interface
|
|
virtual void PathAdded(VectorPath* path);
|
|
virtual void PathRemoved(VectorPath* path);
|
|
|
|
// Shape
|
|
status_t InitCheck() const;
|
|
|
|
inline PathContainer* Paths() const
|
|
{ return fPaths; }
|
|
|
|
void SetStyle(::Style* style);
|
|
inline ::Style* Style() const
|
|
{ return fStyle; }
|
|
|
|
BRect Bounds() const;
|
|
|
|
::VertexSource& VertexSource();
|
|
bool AppendTransformer(
|
|
Transformer* transformer);
|
|
|
|
private:
|
|
PathContainer* fPaths;
|
|
::Style* fStyle;
|
|
|
|
PathSource fPathSource;
|
|
BList fTransformers;
|
|
};
|
|
|
|
#endif // SHAPE_H
|