| #pragma once |
| |
| #ifndef STYLE_PICKER_H |
| #define STYLE_PICKER_H |
| |
| |
| #include "tcommon.h" |
| #include "tpalette.h" |
| |
| class TStroke; |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TNZTOOLS_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| class DVAPI StylePicker { |
| TImageP m_image; |
| TPaletteP m_palette; |
| |
| public: |
| StylePicker() {} |
| |
| |
| StylePicker(const TImageP &image); |
| |
| |
| StylePicker(const TImageP &image, const TPaletteP &palette); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| int pickStyleId(const TPointD &point, double radius2 = 1, int mode = 2) const; |
| |
| |
| int pickTone(const TPointD &pos); |
| |
| |
| |
| TPixel32 pickColor(const TPointD &point, double radius2 = 1) const; |
| |
| |
| TPixel32 pickColor(const TRectD &area) const; |
| |
| |
| |
| TPixel32 pickColor(TStroke *stroke) const; |
| |
| |
| |
| |
| TPoint getRasterPoint(const TPointD &p) const; |
| }; |
| |
| #endif |