|
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 |
|
|
Toshihiro Shimizu |
890ddd |
class MovingModifier : public TOutlineStyle::RegionOutlineModifier
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPointD m_move;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
MovingModifier(const TPointD &point)
|
|
Toshihiro Shimizu |
890ddd |
: m_move(point) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TOutlineStyle::RegionOutlineModifier *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TPointD getMovePoint() const { return m_move; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void modify(TRegionOutline &outline) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
is >> m_move.x >> m_move.y;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
os << m_move.x << m_move.y;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class MovingSolidColor : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
MovingSolidColor(const TPixel32 &color, const TPointD &move);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1125; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("MovingSolidColor", "Offset"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI ShadowStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPointD m_shadowDirection;
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_shadowColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_density;
|
|
Toshihiro Shimizu |
890ddd |
double m_len;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
ShadowStyle(
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 &bgColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 &shadowColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPointD &shadowDirection = TPointD(-1, -1),
|
|
Toshihiro Shimizu |
890ddd |
double len = 30.0,
|
|
Toshihiro Shimizu |
890ddd |
double density = 0.4);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void makeIcon(const TDimension &d);
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//TPixel32 getMainColor() const {return m_shadowColor; }
|
|
Toshihiro Shimizu |
890ddd |
//void setMainColor(const TPixel32 &color){ m_shadowColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1127; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("ShadowStyle", "Hatched Shading"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//it is too slow and if the region is too complex, some flash readers (IExplorer) crash.
|
|
Toshihiro Shimizu |
890ddd |
// So it's better drawing it as a normal solid color
|
|
Toshihiro Shimizu |
890ddd |
//void drawRegion( TFlash& flash, const TRegion* r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
3bfa54 |
void drawPolyline(const TColorFunction *cf, std::vector<t3dpointd> &polyline, TPointD shadowDirection) const;</t3dpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI ShadowStyle2 : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPointD m_shadowDirection;
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_shadowColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_shadowLength;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
ShadowStyle2(
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 &bgColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 &shadowColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPointD &shadowDirection = TPointD(-1, -1),
|
|
Toshihiro Shimizu |
890ddd |
double shadowLength = 70.0);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//TPixel32 getMainColor() const {return m_shadowColor; }
|
|
Toshihiro Shimizu |
890ddd |
//void setMainColor(const TPixel32 &color){ m_shadowColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1135; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("ShadowStyle2", "Plain Shadow"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
3bfa54 |
void drawPolyline(const TColorFunction *cf, const std::vector<t3dpointd> &polyline, TPointD shadowDirection) const;</t3dpointd>
|
|
Shinya Kitaoka |
3bfa54 |
int drawPolyline(TFlash &flash, std::vector<t3dpointd> &polyline,</t3dpointd>
|
|
Toshihiro Shimizu |
890ddd |
TPointD shadowDirection, const bool isDraw = true) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class RubberModifier : public TOutlineStyle::RegionOutlineModifier
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
double m_deform;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
RubberModifier(double deform)
|
|
Toshihiro Shimizu |
890ddd |
: m_deform(deform) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
is >> m_deform;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
os << m_deform;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
double getDeform() { return m_deform; }
|
|
Toshihiro Shimizu |
890ddd |
void setDeform(const double deform) { m_deform = deform; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void modify(TRegionOutline &outline) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TOutlineStyle::RegionOutlineModifier *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TRubberFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Shinya Kitaoka |
3bfa54 |
typedef std::vector<tquadratic> QuadraticVector;</tquadratic>
|
|
Shinya Kitaoka |
3bfa54 |
typedef std::vector<tquadratic *=""> QuadraticPVector;</tquadratic>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TRubberFillStyle(const TPixel32 &color, double deform);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void makeIcon(const TDimension &d);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1128; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TRubberFillStyle", "Blob"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
void transformPolylines();
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TPointShadowFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPointD m_shadowDirection;
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_shadowColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_shadowSize;
|
|
Toshihiro Shimizu |
890ddd |
double m_density;
|
|
Toshihiro Shimizu |
890ddd |
double m_pointSize;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TPointShadowFillStyle(const TPixel32 &bgColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 &shadowColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPointD &shadowDirection = TPointD(-1, -1),
|
|
Toshihiro Shimizu |
890ddd |
double density = 0.1,
|
|
Toshihiro Shimizu |
890ddd |
double shadowSize = 30.0,
|
|
Toshihiro Shimizu |
890ddd |
double pointSize = 5.0);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_shadowColor; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_shadowColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1129; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TPointShadowFillStyle", "Sponge Shading"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
double triangleArea(const TPointD &a, const TPointD &b, const TPointD &c) const;
|
|
Toshihiro Shimizu |
890ddd |
void shadowOnEdge_parallel(const TPointD &p0, const TPointD &p1,
|
|
Toshihiro Shimizu |
890ddd |
const TPointD &p2, TRandom &rnd) const;
|
|
Toshihiro Shimizu |
890ddd |
int shadowOnEdge_parallel(TFlash &flash,
|
|
Toshihiro Shimizu |
890ddd |
const TPointD &p0, const TPointD &p1,
|
|
Toshihiro Shimizu |
890ddd |
const TPointD &p2, TRandom &rnd,
|
|
Toshihiro Shimizu |
890ddd |
const double radius,
|
|
Toshihiro Shimizu |
890ddd |
const bool isDraw) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void deleteSameVerts(TRegionOutline::Boundary::iterator &rit,
|
|
Shinya Kitaoka |
3bfa54 |
std::vector<t3dpointd> &pv) const;</t3dpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TDottedFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_dotSize;
|
|
Toshihiro Shimizu |
890ddd |
double m_dotDist;
|
|
Toshihiro Shimizu |
890ddd |
bool m_isShifted;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TDottedFillStyle(const TPixel32 &bgColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 &pointColor,
|
|
Toshihiro Shimizu |
890ddd |
const double dotSize,
|
|
Toshihiro Shimizu |
890ddd |
const double dotDist,
|
|
Toshihiro Shimizu |
890ddd |
const bool isShifted);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TDottedFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1130; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TDottedFillStyle", "Polka Dots"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
int nbClip(const double LDotDist, const bool LIsShifted,
|
|
Toshihiro Shimizu |
890ddd |
const TRectD &bbox) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TCheckedFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_HDist, m_HAngle;
|
|
Toshihiro Shimizu |
890ddd |
double m_VDist, m_VAngle, m_Thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TCheckedFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Toshihiro Shimizu |
890ddd |
const double HDist, const double HAngle,
|
|
Toshihiro Shimizu |
890ddd |
const double VDist, const double VAngle, const double Thickness);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TCheckedFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1131; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TCheckedFillStyle", "Square"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
void getHThickline(const TPointD &lc, const double lx,
|
|
Toshihiro Shimizu |
890ddd |
TPointD &p0, TPointD &p1,
|
|
Toshihiro Shimizu |
890ddd |
TPointD &p2, TPointD &p3) const;
|
|
Toshihiro Shimizu |
890ddd |
void getVThickline(const TPointD &lc, const double ly,
|
|
Toshihiro Shimizu |
890ddd |
TPointD &p0, TPointD &p1,
|
|
Toshihiro Shimizu |
890ddd |
TPointD &p2, TPointD &p3) const;
|
|
Toshihiro Shimizu |
890ddd |
int nbClip(const TRectD &bbox) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class ArtisticModifier : public TOutlineStyle::RegionOutlineModifier
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPointD m_move;
|
|
Toshihiro Shimizu |
890ddd |
double m_period;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
ArtisticModifier(const TPointD &point, double period)
|
|
Toshihiro Shimizu |
890ddd |
: m_move(point), m_period(period) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TOutlineStyle::RegionOutlineModifier *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
is >> m_move.x >> m_move.y >> m_period;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
os << m_move.x << m_move.y << m_period;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TPointD getMovePoint() const { return m_move; }
|
|
Toshihiro Shimizu |
890ddd |
double getPeriod() const { return m_period; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void modify(TRegionOutline &outline) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class ArtisticSolidColor : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
ArtisticSolidColor(const TPixel32 &color, const TPointD &move, double period);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1132; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("ArtisticSolidColor", "Irregular"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TChalkFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_color0;
|
|
Toshihiro Shimizu |
890ddd |
double m_density, m_size;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TChalkFillStyle(const TPixel32 &color0, const TPixel32 &color1,
|
|
Toshihiro Shimizu |
890ddd |
const double density, const double size);
|
|
Toshihiro Shimizu |
890ddd |
TChalkFillStyle(const TPixel32 &color0, const TPixel32 &color1);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_color0; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_color0=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TChalkFillStyle", "Chalk"); }
|
|
Toshihiro Shimizu |
890ddd |
void loadData(int oldId, TInputStreamInterface &);
|
|
Shinya Kitaoka |
3bfa54 |
void getObsoleteTagIds(std::vector<int> &ids) const { ids.push_back(1133); }</int>
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1143; };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TChessFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_HDist, m_VDist, m_Angle;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TChessFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Toshihiro Shimizu |
890ddd |
const double HDist, const double VDist, const double Angle);
|
|
Toshihiro Shimizu |
890ddd |
TChessFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1136; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TChessFillStyle", "Chessboard"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
void makeGrid(TRectD &bbox, TRotation &rotM,
|
|
Shinya Kitaoka |
3bfa54 |
std::vector<tpointd> &grid, int &nbClip) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TStripeFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_Dist, m_Angle, m_Thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TStripeFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Toshihiro Shimizu |
890ddd |
const double Dist, const double Angle, const double Thickness);
|
|
Toshihiro Shimizu |
890ddd |
TStripeFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1137; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TStripeFillStyle", "Banded"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void makeIcon(const TDimension &d);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
void getThickline(const TPointD &lc, const double ly,
|
|
Toshihiro Shimizu |
890ddd |
TPointD &p0, TPointD &p1,
|
|
Toshihiro Shimizu |
890ddd |
TPointD &p2, TPointD &p3) const;
|
|
Toshihiro Shimizu |
890ddd |
int nbClip(const TRectD &bbox) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TLinGradFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_Angle;
|
|
Toshihiro Shimizu |
890ddd |
double m_XPos, m_YPos, m_Size;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TLinGradFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Toshihiro Shimizu |
890ddd |
const double Angle, const double XPos, const double YPos,
|
|
Toshihiro Shimizu |
890ddd |
const double Size);
|
|
Toshihiro Shimizu |
890ddd |
TLinGradFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1138; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TLinGradFillStyle", "Linear Gradient"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
3bfa54 |
void getRects(const TRectD &bbox, std::vector<tpointd> &r0,</tpointd>
|
|
Shinya Kitaoka |
3bfa54 |
std::vector<tpointd> &r1, std::vector<tpointd> &r2) const;</tpointd></tpointd>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
3bfa54 |
void getRect(const TRectD &bbox, std::vector<tpointd> &r) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TRadGradFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_Radius;
|
|
Toshihiro Shimizu |
890ddd |
double m_XPos, m_YPos;
|
|
Toshihiro Shimizu |
890ddd |
double m_Smooth;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TRadGradFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Toshihiro Shimizu |
890ddd |
const double XPos, const double YPos,
|
|
Toshihiro Shimizu |
890ddd |
const double Radius, const double Smooth);
|
|
Toshihiro Shimizu |
890ddd |
TRadGradFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// TPixel32 getMainColor() const {return m_pointColor; }
|
|
Toshihiro Shimizu |
890ddd |
// void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1139; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TRadGradFillStyle", "Radial Gradient"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TCircleStripeFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor;
|
|
Toshihiro Shimizu |
890ddd |
double m_XPos, m_YPos;
|
|
Toshihiro Shimizu |
890ddd |
double m_Dist, m_Thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TCircleStripeFillStyle(const TPixel32 &bgColor, const TPixel32 &pointColor,
|
|
Toshihiro Shimizu |
890ddd |
const double XPos, const double YPos,
|
|
Toshihiro Shimizu |
890ddd |
const double Dist, const double Thickness);
|
|
Toshihiro Shimizu |
890ddd |
TCircleStripeFillStyle(const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_pointColor; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_pointColor=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 2; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1140; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TCircleStripeFillStyle", "Concentric"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
void getCircleStripeQuads(const TPointD ¢er,
|
|
Toshihiro Shimizu |
890ddd |
const double r1, const double r2,
|
|
Shinya Kitaoka |
3bfa54 |
std::vector<tpointd> &pv) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
void drawCircleStripe(const TPointD ¢er,
|
|
Toshihiro Shimizu |
890ddd |
const double r1, const double r2,
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 &col) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TMosaicFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor[4];
|
|
Toshihiro Shimizu |
890ddd |
double m_size;
|
|
Toshihiro Shimizu |
890ddd |
double m_deform;
|
|
Toshihiro Shimizu |
890ddd |
double m_minThickness;
|
|
Toshihiro Shimizu |
890ddd |
double m_maxThickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TMosaicFillStyle(const TPixel32 &bgColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 pointColor[4],
|
|
Toshihiro Shimizu |
890ddd |
const double size,
|
|
Toshihiro Shimizu |
890ddd |
const double deform,
|
|
Toshihiro Shimizu |
890ddd |
const double minThickness,
|
|
Toshihiro Shimizu |
890ddd |
const double maxThickness);
|
|
Toshihiro Shimizu |
890ddd |
TMosaicFillStyle(const TPixel32 bgColor);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getMainColor() const {return m_pointColor[0]; }
|
|
Toshihiro Shimizu |
890ddd |
void setMainColor(const TPixel32 &color){ m_pointColor[0]=color; }
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 5; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1141; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TMosaicFillStyle", "Stained Glass"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
3bfa54 |
void preaprePos(const TRectD &box, std::vector<tpointd> &v,</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
int &lX, int &lY, TRandom &rand) const;
|
|
Toshihiro Shimizu |
890ddd |
bool getQuad(const int ix, const int iy,
|
|
Toshihiro Shimizu |
890ddd |
const int lX, const int lY,
|
|
Shinya Kitaoka |
3bfa54 |
std::vector<tpointd> &v, TPointD *pquad, TRandom &rand) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//============================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TPatchFillStyle : public TSolidColorStyle
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 m_pointColor[6];
|
|
Toshihiro Shimizu |
890ddd |
double m_size;
|
|
Toshihiro Shimizu |
890ddd |
double m_deform;
|
|
Toshihiro Shimizu |
890ddd |
double m_thickness;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TPatchFillStyle(const TPixel32 &bgColor,
|
|
Toshihiro Shimizu |
890ddd |
const TPixel32 pointColor[6],
|
|
Toshihiro Shimizu |
890ddd |
const double size,
|
|
Toshihiro Shimizu |
890ddd |
const double deform,
|
|
Toshihiro Shimizu |
890ddd |
const double thickness);
|
|
Toshihiro Shimizu |
890ddd |
TPatchFillStyle(const TPixel32 &bgColor);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getColorParamCount() const { return 7; }
|
|
Toshihiro Shimizu |
890ddd |
TPixel32 getColorParamValue(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setColorParamValue(int index, const TPixel32 &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool isRegionStyle() const { return true; }
|
|
Toshihiro Shimizu |
890ddd |
bool isStrokeStyle() const { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getParamCount() const;
|
|
Toshihiro Shimizu |
890ddd |
TColorStyle::ParamType getParamType(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
QString getParamNames(int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void getParamRange(int index, double &min, double &max) const;
|
|
Toshihiro Shimizu |
890ddd |
double getParamValue(TColorStyle::double_tag, int index) const;
|
|
Toshihiro Shimizu |
890ddd |
void setParamValue(int index, double value);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(const TColorFunction *cf, const bool antiAliasing, TRegionOutline &boundary) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawRegion(TFlash &flash, const TRegion *r) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int getTagId() const { return 1142; };
|
|
Toshihiro Shimizu |
890ddd |
QString getDescription() const { return QCoreApplication::translate("TPatchFillStyle", "Beehive"); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
3bfa54 |
void preaprePos(const TRectD &box, std::vector<tpointd> &v,</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
int &lX, int &lY, TRandom &rand) const;
|
|
Toshihiro Shimizu |
890ddd |
bool getQuadLine(const TPointD &a, const TPointD &b,
|
|
Toshihiro Shimizu |
890ddd |
const double thickn, TPointD *quad) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawGLQuad(const TPointD *quad) const;
|
|
Shinya Kitaoka |
3bfa54 |
int nbClip(const int lX, const int lY, const std::vector<tpointd> &v) const;</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
void drawFlashQuad(TFlash &flash, const TPointD *quad) const;
|
|
Toshihiro Shimizu |
890ddd |
void drawFlashTriangle(TFlash &flash, const TPointD &p1,
|
|
Toshihiro Shimizu |
890ddd |
const TPointD &p2, const TPointD &p3) const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Toshihiro Shimizu |
890ddd |
void loadData(TInputStreamInterface &is);
|
|
Toshihiro Shimizu |
890ddd |
void saveData(TOutputStreamInterface &os) const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif // TDERIVEDREGIONSTYLES_H
|