Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TSIMPLECOLORSTYLES_H
Toshihiro Shimizu 890ddd
#define TSIMPLECOLORSTYLES_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzCore includes
Toshihiro Shimizu 890ddd
#include "tcolorstyles.h"
Toshihiro Shimizu 890ddd
#include "tlevel.h"
Toshihiro Shimizu 890ddd
#include "traster.h"
Toshihiro Shimizu 890ddd
#include "tstrokeoutline.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// Qt includes
Toshihiro Shimizu 890ddd
#include <qcoreapplication></qcoreapplication>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef TVRENDER_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 TStrokeProp;
Toshihiro Shimizu 890ddd
class TRegionProp;
Toshihiro Shimizu 890ddd
class TRegionOutline;
Toshihiro Shimizu 890ddd
class TTessellator;
Toshihiro Shimizu 890ddd
class TColorFunction;
Toshihiro Shimizu 890ddd
class TVectorImage;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
//    TSimpleStrokeStyle  declaration
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
luz paz 6454c4
  Base class for stroke color styles.
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI TSimpleStrokeStyle : public TColorStyle {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 473e70
  bool isRegionStyle() const override { return false; }
Shinya Kitaoka 473e70
  bool isStrokeStyle() const override { return true; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TStrokeProp *makeStrokeProp(const TStroke *stroke) override;
Shinya Kitaoka 473e70
Shinya Kitaoka 473e70
  TRegionProp *makeRegionProp(const TRegion *) override {
Shinya Kitaoka 120a6e
    assert(false);
Shinya Kitaoka 120a6e
    return 0;
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void drawStroke(const TColorFunction *cf,
Shinya Kitaoka 120a6e
                          const TStroke *stroke) const = 0;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
//    TOutlineStyle  declaration
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI TOutlineStyle : public TColorStyle {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  class StrokeOutlineModifier {
Shinya Kitaoka 120a6e
  public:
Shinya Kitaoka 120a6e
    StrokeOutlineModifier() {}
Shinya Kitaoka 120a6e
    virtual ~StrokeOutlineModifier() {}
Shinya Kitaoka 120a6e
    virtual StrokeOutlineModifier *clone() const = 0;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
    virtual void modify(TStrokeOutline &outline) const = 0;
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  class RegionOutlineModifier {
Shinya Kitaoka 120a6e
  public:
Shinya Kitaoka 120a6e
    RegionOutlineModifier() {}
Shinya Kitaoka 120a6e
    virtual ~RegionOutlineModifier() {}
Shinya Kitaoka 120a6e
    virtual RegionOutlineModifier *clone() const = 0;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
    virtual void modify(TRegionOutline &outline) const = 0;
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  //  StrokeOutlineModifier *m_strokeOutlineModifier;
Shinya Kitaoka 120a6e
  RegionOutlineModifier *m_regionOutlineModifier;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TOutlineStyle();
Shinya Kitaoka 120a6e
  TOutlineStyle(const TOutlineStyle &);
Shinya Kitaoka 120a6e
  virtual ~TOutlineStyle();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  // StrokeOutlineModifier* getStrokeOutlineModifier() const { return
Shinya Kitaoka 120a6e
  // m_strokeOutlineModifier; }
Shinya Kitaoka 120a6e
  // void setStrokeOutlineModifier(StrokeOutlineModifier *modifier);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  RegionOutlineModifier *getRegionOutlineModifier() const {
Shinya Kitaoka 120a6e
    return m_regionOutlineModifier;
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
  void setRegionOutlineModifier(RegionOutlineModifier *modifier);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  bool isRegionStyle() const override { return true; }
Shinya Kitaoka 473e70
  bool isStrokeStyle() const override { return true; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void computeOutline(const TStroke *stroke, TStrokeOutline &outline,
Shinya Kitaoka 120a6e
                              TOutlineUtil::OutlineParameter param) const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TStrokeProp *makeStrokeProp(const TStroke *stroke) override;
Shinya Kitaoka 473e70
  TRegionProp *makeRegionProp(const TRegion *region) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  // virtual void drawRegion( const TVectorRenderData &rd, TRegionOutline
Shinya Kitaoka 120a6e
  // &outline ) const =0 ;
Shinya Kitaoka 120a6e
  virtual void drawRegion(const TColorFunction *cf, const bool antiAliasing,
Shinya Kitaoka 120a6e
                          TRegionOutline &outline) const = 0;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void drawStroke(const TColorFunction *cf, TStrokeOutline *outline,
Shinya Kitaoka 120a6e
                          const TStroke *stroke) const = 0;
shun-iwasawa 288b97
  // draw aliased stroke. currently reimplemented by TSolidColorStyle only
shun-iwasawa 288b97
  virtual void drawAliasedStroke(const TColorFunction *cf,
shun-iwasawa 288b97
                                 TStrokeOutline *outline,
shun-iwasawa 288b97
                                 const TStroke *stroke) const {
shun-iwasawa 288b97
    drawStroke(cf, outline, stroke);
shun-iwasawa 288b97
  };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  // Not assignable
Shinya Kitaoka 120a6e
  TOutlineStyle &operator=(const TOutlineStyle &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef TSmartPointerT<toutlinestyle> TOutlineStyleP;</toutlinestyle>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
//    TSolidColorStyle  declaration
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI TSolidColorStyle : public TOutlineStyle {
Shinya Kitaoka 120a6e
  TPixel32 m_color;
Shinya Kitaoka 120a6e
  TTessellator *m_tessellator;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 473e70
  void makeIcon(const TDimension &d) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void loadData(TInputStreamInterface &) override;
Shinya Kitaoka 473e70
  void saveData(TOutputStreamInterface &) const override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TSolidColorStyle(const TPixel32 &color = TPixel32::Black);
Shinya Kitaoka 120a6e
  TSolidColorStyle(const TSolidColorStyle &);
Shinya Kitaoka 120a6e
  ~TSolidColorStyle();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TColorStyle *clone() const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  QString getDescription() const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  bool hasMainColor() const override { return true; }
Shinya Kitaoka 473e70
  TPixel32 getMainColor() const override { return m_color; }
Shinya Kitaoka 473e70
  void setMainColor(const TPixel32 &color) override { m_color = color; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void drawRegion(const TColorFunction *cf, const bool antiAliasing,
Shinya Kitaoka 473e70
                  TRegionOutline &outline) const override;
Toshihiro Shimizu 890ddd
shun-iwasawa 288b97
  void doDrawStroke(const TColorFunction *cf, TStrokeOutline *outline,
shun-iwasawa 288b97
                    const TStroke *s, bool antialias) const;
shun-iwasawa 288b97
Shinya Kitaoka 120a6e
  void drawStroke(const TColorFunction *cf, TStrokeOutline *outline,
shun-iwasawa 288b97
                  const TStroke *s) const override {
shun-iwasawa 288b97
    doDrawStroke(cf, outline, s, true);
shun-iwasawa 288b97
  }
shun-iwasawa 288b97
  void drawAliasedStroke(const TColorFunction *cf, TStrokeOutline *outline,
shun-iwasawa 288b97
                         const TStroke *s) const override {
shun-iwasawa 288b97
    doDrawStroke(cf, outline, s, false);
shun-iwasawa 288b97
  }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  int getTagId() const override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  // Not assignable
Shinya Kitaoka 120a6e
  TSolidColorStyle &operator=(const TSolidColorStyle &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
//    TCenterLineStrokeStyle  declaration
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
  Constant thickness stroke style.
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI TCenterLineStrokeStyle final : public TSimpleStrokeStyle {
Shinya Kitaoka 120a6e
  TPixel32 m_color;
Shinya Kitaoka 120a6e
  USHORT m_stipple;
Shinya Kitaoka 120a6e
  double m_width;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TCenterLineStrokeStyle(const TPixel32 &color = TPixel32(0, 0, 0, 255),
Shinya Kitaoka 120a6e
                         USHORT stipple = 0x0, double width = 1.0);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TColorStyle *clone() const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  QString getDescription() const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TPixel32 getColor() const { return m_color; }
Shinya Kitaoka 120a6e
  USHORT getStipple() const { return m_stipple; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void drawStroke(const TColorFunction *cf,
Shinya Kitaoka 38fd86
                  const TStroke *stroke) const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  bool hasMainColor() const override { return true; }
Shinya Kitaoka 473e70
  TPixel32 getMainColor() const override { return m_color; }
Shinya Kitaoka 473e70
  void setMainColor(const TPixel32 &color) override { m_color = color; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  int getParamCount() const override;
Toshihiro Shimizu 890ddd
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;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 473e70
  void loadData(TInputStreamInterface &) override;
Shinya Kitaoka 473e70
  void saveData(TOutputStreamInterface &) const override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  // Not assignable
Shinya Kitaoka 120a6e
  TCenterLineStrokeStyle &operator=(const TCenterLineStrokeStyle &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
//    TRasterImagePatternStrokeStyle  declaration
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI TRasterImagePatternStrokeStyle final : public TColorStyle {
Shinya Kitaoka 120a6e
  static TFilePath m_rootDir;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TLevelP m_level;
Shinya Kitaoka 120a6e
  std::string m_name;
Shinya Kitaoka 120a6e
  double m_space, m_rotation;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TRasterImagePatternStrokeStyle();
Shinya Kitaoka 120a6e
  TRasterImagePatternStrokeStyle(const std::string &patternName);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  bool isRegionStyle() const override { return false; }
Shinya Kitaoka 473e70
  bool isStrokeStyle() const override { return true; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int getLevelFrameCount() { return m_level->getFrameCount(); }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void computeTransformations(std::vector<taffine> &positions,</taffine>
Shinya Kitaoka 120a6e
                              const TStroke *stroke) const;
Shinya Kitaoka 120a6e
  void drawStroke(const TVectorRenderData &rd,
Shinya Kitaoka 120a6e
                  const std::vector<taffine> &positions,</taffine>
Shinya Kitaoka 120a6e
                  const TStroke *stroke) const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void invalidate(){};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TColorStyle *clone() const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  QString getDescription() const override {
Shinya Kitaoka 38fd86
    return "TRasterImagePatternStrokeStyle";
Shinya Kitaoka 38fd86
  }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  bool hasMainColor() const override { return false; }
Shinya Kitaoka 473e70
  TPixel32 getMainColor() const override { return TPixel32::Black; }
Shinya Kitaoka 473e70
  void setMainColor(const TPixel32 &) override {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TStrokeProp *makeStrokeProp(const TStroke *stroke) override;
Shinya Kitaoka 473e70
  TRegionProp *makeRegionProp(const TRegion *) override {
Shinya Kitaoka 120a6e
    assert(false);
Shinya Kitaoka 120a6e
    return 0;
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  int getTagId() const override { return 2000; };
Shinya Kitaoka 473e70
  void getObsoleteTagIds(std::vector<int> &ids) const override;</int>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void loadLevel(const std::string &patternName);
Shinya Kitaoka 120a6e
  static TFilePath getRootDir();
Shinya Kitaoka 120a6e
  static void setRootDir(const TFilePath &path) {
Shinya Kitaoka 120a6e
    m_rootDir = path + "custom styles";
Shinya Kitaoka 120a6e
  }
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
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 473e70
  void makeIcon(const TDimension &d) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void loadData(TInputStreamInterface &) override;
Shinya Kitaoka 473e70
  void loadData(int oldId, TInputStreamInterface &) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void saveData(TOutputStreamInterface &) const override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  // Not assignable
Shinya Kitaoka 120a6e
  TRasterImagePatternStrokeStyle &operator=(
Shinya Kitaoka 120a6e
      const TRasterImagePatternStrokeStyle &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
//    TVectorImagePatternStrokeStyle  declaration
Toshihiro Shimizu 890ddd
//**********************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI TVectorImagePatternStrokeStyle final : public TColorStyle {
Shinya Kitaoka 120a6e
  static TFilePath m_rootDir;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TLevelP m_level;
Shinya Kitaoka 120a6e
  std::string m_name;
Shinya Kitaoka 120a6e
  double m_space, m_rotation;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TVectorImagePatternStrokeStyle();
Shinya Kitaoka 120a6e
  TVectorImagePatternStrokeStyle(const std::string &patternName);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  bool isRegionStyle() const override { return false; }
Shinya Kitaoka 473e70
  bool isStrokeStyle() const override { return true; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int getLevelFrameCount() { return m_level->getFrameCount(); }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void computeTransformations(std::vector<taffine> &positions,</taffine>
Shinya Kitaoka 120a6e
                              const TStroke *stroke) const;
Shinya Kitaoka 120a6e
  void drawStroke(const TVectorRenderData &rd,
Shinya Kitaoka 120a6e
                  const std::vector<taffine> &positions,</taffine>
Shinya Kitaoka 120a6e
                  const TStroke *stroke) const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void invalidate(){};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TColorStyle *clone() const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  QString getDescription() const override {
Shinya Kitaoka 38fd86
    return "TVectorImagePatternStrokeStyle";
Shinya Kitaoka 38fd86
  }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  bool hasMainColor() const override { return false; }
Shinya Kitaoka 473e70
  TPixel32 getMainColor() const override { return TPixel32::Black; }
Shinya Kitaoka 473e70
  void setMainColor(const TPixel32 &) override {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  TStrokeProp *makeStrokeProp(const TStroke *stroke) override;
Shinya Kitaoka 473e70
  TRegionProp *makeRegionProp(const TRegion *) override {
Shinya Kitaoka 120a6e
    assert(false);
Shinya Kitaoka 120a6e
    return 0;
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  int getTagId() const override { return 2800; };
Shinya Kitaoka 473e70
  void getObsoleteTagIds(std::vector<int> &ids) const override;</int>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void loadLevel(const std::string &patternName);
Shinya Kitaoka 120a6e
  static TFilePath getRootDir();
Shinya Kitaoka 120a6e
  static void setRootDir(const TFilePath &path) {
Shinya Kitaoka 120a6e
    m_rootDir = path + "custom styles";
Shinya Kitaoka 120a6e
  }
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
  static void clearGlDisplayLists();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 473e70
  void makeIcon(const TDimension &d) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void loadData(TInputStreamInterface &) override;
Shinya Kitaoka 473e70
  void loadData(int oldId, TInputStreamInterface &) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void saveData(TOutputStreamInterface &) const override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  // Not assignable
Shinya Kitaoka 120a6e
  TVectorImagePatternStrokeStyle &operator=(
Shinya Kitaoka 120a6e
      const TVectorImagePatternStrokeStyle &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // TSIMPLECOLORSTYLES_H