* 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
32 lines
664 B
C++
32 lines
664 B
C++
/*
|
|
* Copyright 2006, Haiku.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Stephan Aßmus <[email protected]>
|
|
*/
|
|
|
|
#ifndef STROKE_TRANSFORMER_H
|
|
#define STROKE_TRANSFORMER_H
|
|
|
|
#include "agg_conv_stroke.h"
|
|
|
|
#include "Transformer.h"
|
|
|
|
typedef agg::conv_stroke<VertexSource> Stroke;
|
|
|
|
class StrokeTransformer : public Transformer,
|
|
public Stroke {
|
|
public:
|
|
StrokeTransformer(
|
|
VertexSource& source);
|
|
virtual ~StrokeTransformer();
|
|
|
|
virtual void rewind(unsigned path_id);
|
|
virtual unsigned vertex(double* x, double* y);
|
|
|
|
virtual void SetSource(VertexSource& source);
|
|
};
|
|
|
|
#endif // STROKE_TRANSFORMER_H
|