Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef T_BLUREDBRUSH
Toshihiro Shimizu 890ddd
#define T_BLUREDBRUSH
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "traster.h"
Toshihiro Shimizu 890ddd
#include "trastercm.h"
Toshihiro Shimizu 890ddd
#include "tcurves.h"
Toshihiro Shimizu 890ddd
#include <qpainter></qpainter>
Toshihiro Shimizu 890ddd
#include <qimage></qimage>
shun-iwasawa 975eb1
#include <qset></qset>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=======================================================
Toshihiro Shimizu 890ddd
//
Shinya Kitaoka 120a6e
// BluredBrush
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=======================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class BluredBrush {
Shinya Kitaoka 120a6e
  TRaster32P m_ras;
Shinya Kitaoka 120a6e
  QImage m_rasImage;
Shinya Kitaoka 120a6e
  int m_size;
Shinya Kitaoka 120a6e
  QRadialGradient m_gradient;
Shinya Kitaoka 120a6e
  TThickPoint m_lastPoint;
Shinya Kitaoka 120a6e
  double m_oldOpacity;
luz paz b49bc5
  bool m_enableDynamicOpacity;
Toshihiro Shimizu 890ddd
shun-iwasawa 975eb1
  QSet<int> m_aboveStyleIds;</int>
shun-iwasawa 975eb1
Shinya Kitaoka 120a6e
  double getNextPadPosition(const TThickQuadratic &q, double t) const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  BluredBrush(const TRaster32P &ras, int size, const QRadialGradient &gradient,
luz paz b49bc5
              bool doDynamicOpacity);
Shinya Kitaoka 120a6e
  ~BluredBrush();
Shinya Kitaoka 120a6e
f278a5
  void addPoint(const TThickPoint &p, double opacity, bool keepDistance = false);
Shinya Kitaoka 120a6e
  void addArc(const TThickPoint &pa, const TThickPoint &pb,
Shinya Kitaoka 120a6e
              const TThickPoint &pc, double opacityA, double opacityC);
Shinya Kitaoka 120a6e
  TRect getBoundFromPoints(const std::vector<tthickpoint> &points) const;</tthickpoint>
Shinya Kitaoka 120a6e
  // colormapped
Shinya Kitaoka 120a6e
  void updateDrawing(const TRasterCM32P rasCM, const TRasterCM32P rasBackupCM,
manongjohn 422d0a
                     const TRect &bbox, int styleId, int drawOrderMode,
manongjohn 422d0a
                     bool lockAlpha) const;
Shinya Kitaoka 120a6e
  void eraseDrawing(const TRasterCM32P rasCM, const TRasterCM32P rasBackupCM,
Shinya Kitaoka 120a6e
                    const TRect &bbox, bool selective, int selectedStyleId,
Shinya Kitaoka 120a6e
                    const std::wstring &mode) const;
Shinya Kitaoka 120a6e
shun-iwasawa 975eb1
  void setAboveStyleIds(QSet<int> &ids) { m_aboveStyleIds = ids; }</int>
shun-iwasawa 975eb1
Shinya Kitaoka 120a6e
  // fullcolor
Shinya Kitaoka 120a6e
  void updateDrawing(const TRasterP ras, const TRasterP rasBackup,
Shinya Kitaoka 120a6e
                     const TPixel32 &color, const TRect &bbox,
Shinya Kitaoka 120a6e
                     double opacity) const;
Shinya Kitaoka 120a6e
  void eraseDrawing(const TRasterP ras, const TRasterP rasBackup,
Shinya Kitaoka 120a6e
                    const TRect &bbox, double opacity) const;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // T_BLUREDBRUSH