|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TDERIVEDREGIONSTYLES_H
|
|
Toshihiro Shimizu |
890ddd |
#define TDERIVEDREGIONSTYLES_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// TnzCore includes
|
|
Toshihiro Shimizu |
890ddd |
#include "tvectorimage.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tregionoutline.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tsimplecolorstyles.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef COLORFX_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//======================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// Forward declarations
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TRandom;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//======================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class MovingModifier final : public TOutlineStyle::RegionOutlineModifier {
|
|
Shinya Kitaoka |
120a6e |
TPointD m_move;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
MovingModifier(const TPointD &point) : m_move(point) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TOutlineStyle::RegionOutlineModifier *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TPointD getMovePoint() const { return m_move; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void modify(TRegionOutline &outline) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
void loadData(TInputStreamInterface &is) { is >> m_move.x >> m_move.y; }
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void saveData(TOutputStreamInterface &os) const {
|
|
Shinya Kitaoka |
120a6e |
os << m_move.x << m_move.y;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class MovingSolidColor final : public TSolidColorStyle {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
MovingSolidColor(const TPixel32 &color, const TPointD &move);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1125; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("MovingSolidColor", "Offset");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "MovingSolidColor"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI ShadowStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPointD m_shadowDirection;
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_shadowColor;
|
|
Shinya Kitaoka |
120a6e |
double m_density;
|
|
Shinya Kitaoka |
120a6e |
double m_len;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ShadowStyle(const TPixel32 &bgColor, const TPixel32 &shadowColor,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &shadowDirection = TPointD(-1, -1),
|
|
Shinya Kitaoka |
120a6e |
double len = 30.0, double density = 0.4);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void makeIcon(const TDimension &d) override;
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// TPixel32 getMainColor() const {return m_shadowColor; }
|
|
Shinya Kitaoka |
120a6e |
// void setMainColor(const TPixel32 &color){ m_shadowColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1127; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("ShadowStyle", "Hatched Shading");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "ShadowStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void drawPolyline(const TColorFunction *cf, std::vector<t3dpointd> &polyline,</t3dpointd>
|
|
Shinya Kitaoka |
120a6e |
TPointD shadowDirection) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI ShadowStyle2 final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPointD m_shadowDirection;
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_shadowColor;
|
|
Shinya Kitaoka |
120a6e |
double m_shadowLength;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ShadowStyle2(const TPixel32 &bgColor, const TPixel32 &shadowColor,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &shadowDirection = TPointD(-1, -1),
|
|
Shinya Kitaoka |
120a6e |
double shadowLength = 70.0);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// TPixel32 getMainColor() const {return m_shadowColor; }
|
|
Shinya Kitaoka |
120a6e |
// void setMainColor(const TPixel32 &color){ m_shadowColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1135; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("ShadowStyle2", "Plain Shadow");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "ShadowStyle2"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void drawPolyline(const TColorFunction *cf,
|
|
Shinya Kitaoka |
120a6e |
const std::vector<t3dpointd> &polyline,</t3dpointd>
|
|
Shinya Kitaoka |
120a6e |
TPointD shadowDirection) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class RubberModifier final : public TOutlineStyle::RegionOutlineModifier {
|
|
Shinya Kitaoka |
120a6e |
double m_deform;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
RubberModifier(double deform) : m_deform(deform) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void loadData(TInputStreamInterface &is) { is >> m_deform; }
|
|
Shinya Kitaoka |
120a6e |
void saveData(TOutputStreamInterface &os) const { os << m_deform; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
double getDeform() { return m_deform; }
|
|
Shinya Kitaoka |
120a6e |
void setDeform(const double deform) { m_deform = deform; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void modify(TRegionOutline &outline) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TOutlineStyle::RegionOutlineModifier *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TRubberFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
typedef std::vector<tquadratic> QuadraticVector;</tquadratic>
|
|
Shinya Kitaoka |
120a6e |
typedef std::vector<tquadratic *=""> QuadraticPVector;</tquadratic>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TRubberFillStyle(const TPixel32 &color, double deform);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void makeIcon(const TDimension &d) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1128; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TRubberFillStyle", "Blob");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "RubberFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void transformPolylines();
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TPointShadowFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPointD m_shadowDirection;
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_shadowColor;
|
|
Shinya Kitaoka |
120a6e |
double m_shadowSize;
|
|
Shinya Kitaoka |
120a6e |
double m_density;
|
|
Shinya Kitaoka |
120a6e |
double m_pointSize;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TPointShadowFillStyle(const TPixel32 &bgColor, const TPixel32 &shadowColor,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &shadowDirection = TPointD(-1, -1),
|
|
Shinya Kitaoka |
120a6e |
double density = 0.1, double shadowSize = 30.0,
|
|
Shinya Kitaoka |
120a6e |
double pointSize = 5.0);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_shadowColor; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_shadowColor=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1129; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TPointShadowFillStyle",
|
|
Shinya Kitaoka |
120a6e |
"Sponge Shading");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "PointShadowFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
double triangleArea(const TPointD &a, const TPointD &b,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &c) const;
|
|
Shinya Kitaoka |
120a6e |
void shadowOnEdge_parallel(const TPointD &p0, const TPointD &p1,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &p2, TRandom &rnd) const;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void deleteSameVerts(TRegionOutline::Boundary::iterator &rit,
|
|
Shinya Kitaoka |
120a6e |
std::vector<t3dpointd> &pv) const;</t3dpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TDottedFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor;
|
|
Shinya Kitaoka |
120a6e |
double m_dotSize;
|
|
Shinya Kitaoka |
120a6e |
double m_dotDist;
|
|
Shinya Kitaoka |
120a6e |
bool m_isShifted;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TDottedFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Shinya Kitaoka |
120a6e |
const double dotSize, const double dotDist,
|
|
Shinya Kitaoka |
120a6e |
const bool isShifted);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TDottedFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1130; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TDottedFillStyle", "Polka Dots");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "DottedFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
int nbClip(const double LDotDist, const bool LIsShifted,
|
|
Shinya Kitaoka |
120a6e |
const TRectD &bbox) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TCheckedFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor;
|
|
Shinya Kitaoka |
120a6e |
double m_HDist, m_HAngle;
|
|
Shinya Kitaoka |
120a6e |
double m_VDist, m_VAngle, m_Thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TCheckedFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Shinya Kitaoka |
120a6e |
const double HDist, const double HAngle, const double VDist,
|
|
Shinya Kitaoka |
120a6e |
const double VAngle, const double Thickness);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TCheckedFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1131; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TCheckedFillStyle", "Square");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "CheckedFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void getHThickline(const TPointD &lc, const double lx, TPointD &p0,
|
|
Shinya Kitaoka |
120a6e |
TPointD &p1, TPointD &p2, TPointD &p3) const;
|
|
Shinya Kitaoka |
120a6e |
void getVThickline(const TPointD &lc, const double ly, TPointD &p0,
|
|
Shinya Kitaoka |
120a6e |
TPointD &p1, TPointD &p2, TPointD &p3) const;
|
|
Shinya Kitaoka |
120a6e |
int nbClip(const TRectD &bbox) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class ArtisticModifier final : public TOutlineStyle::RegionOutlineModifier {
|
|
Shinya Kitaoka |
120a6e |
TPointD m_move;
|
|
Shinya Kitaoka |
120a6e |
double m_period;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ArtisticModifier(const TPointD &point, double period)
|
|
Shinya Kitaoka |
120a6e |
: m_move(point), m_period(period) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TOutlineStyle::RegionOutlineModifier *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void loadData(TInputStreamInterface &is) {
|
|
Shinya Kitaoka |
120a6e |
is >> m_move.x >> m_move.y >> m_period;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void saveData(TOutputStreamInterface &os) const {
|
|
Shinya Kitaoka |
120a6e |
os << m_move.x << m_move.y << m_period;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TPointD getMovePoint() const { return m_move; }
|
|
Shinya Kitaoka |
120a6e |
double getPeriod() const { return m_period; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void modify(TRegionOutline &outline) const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class ArtisticSolidColor final : public TSolidColorStyle {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ArtisticSolidColor(const TPixel32 &color, const TPointD &move, double period);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1132; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("ArtisticSolidColor", "Irregular");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "ArtisticSolidColor"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TChalkFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_color0;
|
|
Shinya Kitaoka |
120a6e |
double m_density, m_size;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TChalkFillStyle(const TPixel32 &color0, const TPixel32 &color1,
|
|
Shinya Kitaoka |
120a6e |
const double density, const double size);
|
|
Shinya Kitaoka |
120a6e |
TChalkFillStyle(const TPixel32 &color0, const TPixel32 &color1);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_color0; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_color0=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TChalkFillStyle", "Chalk");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "ChalkFillStyle"; }
|
|
justburner |
981d46 |
|
|
Shinya Kitaoka |
473e70 |
void loadData(int oldId, TInputStreamInterface &) override;
|
|
Shinya Kitaoka |
38fd86 |
void getObsoleteTagIds(std::vector<int> &ids) const override {</int>
|
|
Shinya Kitaoka |
38fd86 |
ids.push_back(1133);
|
|
Shinya Kitaoka |
38fd86 |
}
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1143; };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TChessFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor;
|
|
Shinya Kitaoka |
120a6e |
double m_HDist, m_VDist, m_Angle;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TChessFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Shinya Kitaoka |
120a6e |
const double HDist, const double VDist, const double Angle);
|
|
Shinya Kitaoka |
120a6e |
TChessFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1136; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TChessFillStyle", "Chessboard");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "ChessFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void makeGrid(TRectD &bbox, TRotation &rotM, std::vector<tpointd> &grid,</tpointd>
|
|
Shinya Kitaoka |
120a6e |
int &nbClip) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TStripeFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor;
|
|
Shinya Kitaoka |
120a6e |
double m_Dist, m_Angle, m_Thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TStripeFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Shinya Kitaoka |
120a6e |
const double Dist, const double Angle,
|
|
Shinya Kitaoka |
120a6e |
const double Thickness);
|
|
Shinya Kitaoka |
120a6e |
TStripeFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1137; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TStripeFillStyle", "Banded");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "StripeFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void makeIcon(const TDimension &d) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void getThickline(const TPointD &lc, const double ly, TPointD &p0,
|
|
Shinya Kitaoka |
120a6e |
TPointD &p1, TPointD &p2, TPointD &p3) const;
|
|
Shinya Kitaoka |
120a6e |
int nbClip(const TRectD &bbox) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TLinGradFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor;
|
|
Shinya Kitaoka |
120a6e |
double m_Angle;
|
|
Shinya Kitaoka |
120a6e |
double m_XPos, m_YPos, m_Size;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TLinGradFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Shinya Kitaoka |
120a6e |
const double Angle, const double XPos, const double YPos,
|
|
Shinya Kitaoka |
120a6e |
const double Size);
|
|
Shinya Kitaoka |
120a6e |
TLinGradFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1138; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TLinGradFillStyle", "Linear Gradient");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "LinGradFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void getRects(const TRectD &bbox, std::vector<tpointd> &r0,</tpointd>
|
|
Shinya Kitaoka |
120a6e |
std::vector<tpointd> &r1, std::vector<tpointd> &r2) const;</tpointd></tpointd>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void getRect(const TRectD &bbox, std::vector<tpointd> &r) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TRadGradFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor;
|
|
Shinya Kitaoka |
120a6e |
double m_Radius;
|
|
Shinya Kitaoka |
120a6e |
double m_XPos, m_YPos;
|
|
Shinya Kitaoka |
120a6e |
double m_Smooth;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TRadGradFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Shinya Kitaoka |
120a6e |
const double XPos, const double YPos, const double Radius,
|
|
Shinya Kitaoka |
120a6e |
const double Smooth);
|
|
Shinya Kitaoka |
120a6e |
TRadGradFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// TPixel32 getMainColor() const {return m_pointColor; }
|
|
Shinya Kitaoka |
120a6e |
// void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1139; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TRadGradFillStyle", "Radial Gradient");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "RadGradFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TCircleStripeFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor;
|
|
Shinya Kitaoka |
120a6e |
double m_XPos, m_YPos;
|
|
Shinya Kitaoka |
120a6e |
double m_Dist, m_Thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TCircleStripeFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Shinya Kitaoka |
120a6e |
const double XPos, const double YPos,
|
|
Shinya Kitaoka |
120a6e |
const double Dist, const double Thickness);
|
|
Shinya Kitaoka |
120a6e |
TCircleStripeFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1140; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TCircleStripeFillStyle", "Concentric");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override {
|
|
justburner |
981d46 |
return "CircleStripeFillStyle";
|
|
justburner |
981d46 |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void getCircleStripeQuads(const TPointD ¢er, const double r1,
|
|
Shinya Kitaoka |
120a6e |
const double r2, std::vector<tpointd> &pv) const;</tpointd>
|
|
Shinya Kitaoka |
120a6e |
void drawCircleStripe(const TPointD ¢er, const double r1, const double r2,
|
|
Shinya Kitaoka |
120a6e |
const TPixel32 &col) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TMosaicFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor[4];
|
|
Shinya Kitaoka |
120a6e |
double m_size;
|
|
Shinya Kitaoka |
120a6e |
double m_deform;
|
|
Shinya Kitaoka |
120a6e |
double m_minThickness;
|
|
Shinya Kitaoka |
120a6e |
double m_maxThickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TMosaicFillStyle(const TPixel32 &bgColor, const TPixel32 pointColor[4],
|
|
Shinya Kitaoka |
120a6e |
const double size, const double deform,
|
|
Shinya Kitaoka |
120a6e |
const double minThickness, const double maxThickness);
|
|
Shinya Kitaoka |
120a6e |
TMosaicFillStyle(const TPixel32 bgColor);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
/*
|
|
Shinya Kitaoka |
120a6e |
TPixel32 getMainColor() const {return m_pointColor[0]; }
|
|
Shinya Kitaoka |
120a6e |
void setMainColor(const TPixel32 &color){ m_pointColor[0]=color; }
|
|
Shinya Kitaoka |
120a6e |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 5; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1141; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TMosaicFillStyle", "Stained Glass");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "MosaicFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void preaprePos(const TRectD &box, std::vector<tpointd> &v, int &lX, int &lY,</tpointd>
|
|
Shinya Kitaoka |
120a6e |
TRandom &rand) const;
|
|
Shinya Kitaoka |
120a6e |
bool getQuad(const int ix, const int iy, const int lX, const int lY,
|
|
Shinya Kitaoka |
120a6e |
std::vector<tpointd> &v, TPointD *pquad, TRandom &rand) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TPatchFillStyle final : public TSolidColorStyle {
|
|
Shinya Kitaoka |
120a6e |
TPixel32 m_pointColor[6];
|
|
Shinya Kitaoka |
120a6e |
double m_size;
|
|
Shinya Kitaoka |
120a6e |
double m_deform;
|
|
Shinya Kitaoka |
120a6e |
double m_thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TPatchFillStyle(const TPixel32 &bgColor, const TPixel32 pointColor[6],
|
|
Shinya Kitaoka |
120a6e |
const double size, const double deform,
|
|
Shinya Kitaoka |
120a6e |
const double thickness);
|
|
Shinya Kitaoka |
120a6e |
TPatchFillStyle(const TPixel32 &bgColor);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
TColorStyle *clone() const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getColorParamCount() const override { return 7; }
|
|
Shinya Kitaoka |
473e70 |
TPixel32 getColorParamValue(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setColorParamValue(int index, const TPixel32 &color) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isRegionStyle() const override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool isStrokeStyle() const override { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getParamCount() const override;
|
|
Shinya Kitaoka |
473e70 |
TColorStyle::ParamType getParamType(int index) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
QString getParamNames(int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void getParamRange(int index, double &min, double &max) const override;
|
|
Shinya Kitaoka |
473e70 |
double getParamValue(TColorStyle::double_tag, int index) const override;
|
|
Shinya Kitaoka |
473e70 |
void setParamValue(int index, double value) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void drawRegion(const TColorFunction *cf, const bool antiAliasing,
|
|
Shinya Kitaoka |
473e70 |
TRegionOutline &boundary) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int getTagId() const override { return 1142; };
|
|
Shinya Kitaoka |
473e70 |
QString getDescription() const override {
|
|
Shinya Kitaoka |
120a6e |
return QCoreApplication::translate("TPatchFillStyle", "Beehive");
|
|
Shinya Kitaoka |
120a6e |
}
|
|
justburner |
981d46 |
std::string getBrushIdName() const override { return "PatchFillStyle"; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void preaprePos(const TRectD &box, std::vector<tpointd> &v, int &lX, int &lY,</tpointd>
|
|
Shinya Kitaoka |
120a6e |
TRandom &rand) const;
|
|
Shinya Kitaoka |
120a6e |
bool getQuadLine(const TPointD &a, const TPointD &b, const double thickn,
|
|
Shinya Kitaoka |
120a6e |
TPointD *quad) const;
|
|
Shinya Kitaoka |
120a6e |
void drawGLQuad(const TPointD *quad) const;
|
|
Shinya Kitaoka |
120a6e |
int nbClip(const int lX, const int lY, const std::vector<tpointd> &v) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void loadData(TInputStreamInterface &is) override;
|
|
Shinya Kitaoka |
473e70 |
void saveData(TOutputStreamInterface &os) const override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
#endif // TDERIVEDREGIONSTYLES_H
|