2016-05-17 03:04:11 +12:00
|
|
|
#pragma once
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
#ifndef TSTROKEPROP_H
|
|
|
|
#define TSTROKEPROP_H
|
|
|
|
|
|
|
|
#include "tstrokeoutline.h"
|
|
|
|
#include "tstroke.h"
|
|
|
|
#include "tsimplecolorstyles.h"
|
|
|
|
#undef DVAPI
|
|
|
|
#undef DVVAR
|
|
|
|
|
|
|
|
#ifdef TVRENDER_EXPORTS
|
|
|
|
#define DVAPI DV_EXPORT_API
|
|
|
|
#define DVVAR DV_EXPORT_VAR
|
|
|
|
#else
|
|
|
|
#define DVAPI DV_IMPORT_API
|
|
|
|
#define DVVAR DV_IMPORT_VAR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//=============================================================================
|
2016-06-15 18:43:10 +12:00
|
|
|
// forward declarations
|
2016-03-19 06:57:51 +13:00
|
|
|
class TVectorRenderData;
|
2016-06-15 18:43:10 +12:00
|
|
|
// class TStroke;
|
2016-03-19 06:57:51 +13:00
|
|
|
class TColorStyle;
|
|
|
|
class TSimpleStrokeStyle;
|
|
|
|
class TRasterImagePatternStrokeStyle;
|
|
|
|
class TVectorImagePatternStrokeStyle;
|
|
|
|
class TCenterLineStrokeStyle;
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
|
2016-06-29 18:17:12 +12:00
|
|
|
class DVAPI TSimpleStrokeProp final : public TStrokeProp {
|
2016-03-19 06:57:51 +13:00
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
TSimpleStrokeStyle *m_colorStyle;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
TSimpleStrokeProp(const TStroke *stroke, TSimpleStrokeStyle *style);
|
|
|
|
~TSimpleStrokeProp();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
const TColorStyle *getColorStyle() const override;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
TStrokeProp *clone(const TStroke *stroke) const override;
|
|
|
|
void draw(const TVectorRenderData &rd) override;
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
|
2016-06-29 18:17:12 +12:00
|
|
|
class DVAPI TRasterImagePatternStrokeProp final : public TStrokeProp {
|
2016-03-19 06:57:51 +13:00
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
TRasterImagePatternStrokeStyle *m_colorStyle;
|
|
|
|
std::vector<TAffine> m_transformations;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
TRasterImagePatternStrokeProp(const TStroke *stroke,
|
|
|
|
TRasterImagePatternStrokeStyle *style);
|
|
|
|
~TRasterImagePatternStrokeProp();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
const TColorStyle *getColorStyle() const override;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
TStrokeProp *clone(const TStroke *stroke) const override;
|
|
|
|
void draw(const TVectorRenderData &rd) override;
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
|
2016-06-29 18:17:12 +12:00
|
|
|
class DVAPI TVectorImagePatternStrokeProp final : public TStrokeProp {
|
2016-03-19 06:57:51 +13:00
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
TVectorImagePatternStrokeStyle *m_colorStyle;
|
|
|
|
std::vector<TAffine> m_transformations;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
TVectorImagePatternStrokeProp(const TStroke *stroke,
|
|
|
|
TVectorImagePatternStrokeStyle *style);
|
|
|
|
~TVectorImagePatternStrokeProp();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
const TColorStyle *getColorStyle() const override;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
TStrokeProp *clone(const TStroke *stroke) const override;
|
|
|
|
void draw(const TVectorRenderData &rd) override;
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
|
2016-06-29 18:17:12 +12:00
|
|
|
class DVAPI OutlineStrokeProp final : public TStrokeProp {
|
2016-03-19 06:57:51 +13:00
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
TOutlineStyleP m_colorStyle;
|
|
|
|
TStrokeOutline m_outline;
|
|
|
|
double m_outlinePixelSize;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
OutlineStrokeProp(const TStroke *stroke, TOutlineStyleP style);
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
const TColorStyle *getColorStyle() const override;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
TStrokeProp *clone(const TStroke *stroke) const override;
|
|
|
|
void draw(const TVectorRenderData &rd) override;
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
#endif
|