WIL説明書(C++)  3.0.0
FvPattern.h
[詳解]
1 // $Revision: 1.8 $
2 /*
3  @file FvPattern.h
4  @brief CFvPattern class interface
5  @author FAST Corporation
6 */
7 
8 #ifndef _FVPATTERN_H_INCLUDED_
9 #define _FVPATTERN_H_INCLUDED_
10 
11 #include "FvImage.h"
12 #include "FvPoint.h"
13 #include "FvRectangle.h"
14 
15 #pragma pack(push,_FVCL_PACKING)
16 
17 namespace FVCL_ErrorCode
18 {
19  namespace CFvPattern
20  {
21  const INT _BASE = 13100;
22  const INT INVALID_REGIST_RECT = _BASE + 62;
23  const INT INVALID_CENTER_MARK = _BASE + 63;
24  };
25 }
26 
27 namespace FVCL
28 {
29 
30 namespace Pattern
31 {
32  namespace MaskBit
33  {
34  const INT MASK = 0x01;
35  const INT ESSENTIAL = 0x02;
36  }
37  namespace MaskIndex
38  {
39  const INT MASK = 0x00;
40  const INT ESSENTIAL = 0x01;
41  }
42 }
43 
44 namespace Data
45 {
47 {
48 private:
49  void _Constructor();
50 
51 public:
52  static void MakePatternRevision( int value );
53  static int MakePatternRevision();
54 
55 public:
56  CFvPattern();
57  CFvPattern( UINT horz, UINT vert, UINT type=FVCL::ImageType::UC8, UINT ch=1, UINT alloc_option = (UINT)-1 );
58  CFvPattern( const FVCL::ImageSize& image_size, UINT alloc_option = (UINT)-1 );
59  CFvPattern( LPCTSTR szFileName );
60  CFvPattern( const FVCL::Data::CFvImage& image, const FVCL::Data::CFvRectangle& rect, const FVCL::Data::CFvPoint& center_mark );
61  virtual ~CFvPattern();
62 
63  enum { DataID = 101 };
64 
65  virtual INT GetDataID() const;
66  virtual bool GetPointer( INT id, void** val ) const;
67 
68  virtual bool Load( LPCTSTR szFileName );
69  virtual bool Load( LPCTSTR szFileName, INT pixelmode );
70  virtual bool Save( LPCTSTR szFileName );
71 
72  virtual void Free();
73 
74  // allocate -------
75  virtual bool SetSize( UINT horz, UINT vert, UINT type, UINT ch, UINT alloc_option = (UINT)-1 );
76  virtual bool SetSize( const FVCL::ImageSize& image_size, UINT alloc_option = (UINT)-1 );
77 
78  // pattern object member
79  virtual bool MakePattern( const FVCL::Data::CFvImage& image, const FVCL::Data::CFvRectangle& rect, const FVCL::Data::CFvPoint& center_mark );
80 
81  bool SetRegistRect( const FVCL::Data::CFvRectangle& rect );
82  bool GetRegistRect( CFvRectangle* rect ) const;
83  const FVCL::Data::CFvRectangle& GetRegistRect() const;
84  FVCL::Data::CFvRectangle& GetRegistRect();
85 
86  bool SetCenterMark( const FVCL::Data::CFvPoint& center_mark );
87  bool GetCenterMark( CFvPoint* center_mark ) const;
88  const FVCL::Data::CFvPoint& GetCenterMark() const;
89  FVCL::Data::CFvPoint& GetCenterMark();
90 
91  bool SetOption( INT option );
92  INT GetOption() const;
93 
94  bool GetAttachedMask( CFvImage* image ) const;
95 
96  bool MaskCopyFrom( const FVCL::Data::CFvImage& image );
97  bool MaskCopyFrom( const FVCL::Data::CFvImage& image, INT maskbit );
98 
99  bool MaskCopyTo( CFvImage* image ) const;
100  bool MaskCopyTo( CFvImage* image, INT maskbit ) const;
101 
102  void* GetMaskAdrs( UINT x=0, UINT y=0 ) const;
103 
104  bool SetMaskPixelUC8(UINT x, UINT y, UCHAR value);
105  UCHAR GetMaskPixelUC8(UINT x, UINT y) const;
106 
107  bool SetMaskPixelI32(UINT x, UINT y, INT value);
108  INT GetMaskPixelI32(UINT x, UINT y) const;
109 
110  bool SetMaskPixelI64(UINT x, UINT y, INT64 value);
111  INT64 GetMaskPixelI64(UINT x, UINT y) const;
112 
113  UINT GetMaskMemSize() const;
114  ULONG_PTR GetMaskMemSize64() const;
115  UINT GetMaskHorzByte() const;
116  UINT GetMaskImageType() const;
117 
118  virtual CFvPattern& operator = ( const CFvPattern& src );
119  virtual bool operator == ( const CFvPattern& src ) const;
120  virtual bool operator != ( const CFvPattern& src ) const;
121 
122 protected:
123  virtual INT fnImportFIE( FHANDLE hImage, bool is_ref );
124  virtual INT fnAllocate( UINT horz, UINT vert, UINT type, UINT ch, UINT option=0 );
125  virtual INT fnAttach( void** adrs, UINT horz, UINT vert, UINT type, UINT ch, void** handles );
126  virtual bool MaskAllocate( UINT horz, UINT vert, UINT type );
127  virtual bool MaskFree();
128 
133 };
134 
135 } // Data
136 
137 } // FVCL
138 
139 #pragma pack(pop)
140 
141 #endif // _FVPATTERN_H_INCLUDED_
#define FVCL_API
DLLエクスポートマクロ
Definition: FvMacros.h:61
FVCL::Data::CFvRectangle m_RegistRect
登録座標
Definition: FvPattern.h:129
画像オブジェクトのインターフェース
const INT INVALID_CENTER_MARK
基準点が無効です。
Definition: FvPattern.h:23
unsigned char UCHAR
整数型(8ビット)[符号なし]
Definition: FvDefs.h:33
点構造クラス
Definition: FvPoint.h:38
const INT INVALID_REGIST_RECT
登録範囲が無効です。
Definition: FvPattern.h:22
LPCSTR LPCTSTR
汎用文字列型(const付き)
Definition: FvDefs.h:57
画像サイズ情報クラス
Definition: ImageSize.h:21
FVCLのネームスペース
Definition: EVCbasicDeclare.txt:9
const INT Pattern
メモリビットマップで定義されるパタンブラシ
Definition: FvGDIDefs.h:198
パタンオブジェクト
Definition: FvPattern.h:46
int INT
整数型(32ビット)
Definition: FvDefs.h:36
const INT _BASE
クラス固有のエラーコードのオフセット値
Definition: FvPattern.h:21
矩形構造クラス
Definition: FvRectangle.h:37
FVCL::Data::CFvImage m_MaskImage
パタンマスク
Definition: FvPattern.h:132
int64_t INT64
整数型(64ビット)
Definition: FvDefs.h:41
点構造クラスのインターフェース
const INT Free
フリー形状
Definition: FvConversionDefs.h:25
矩形構造クラスのインターフェース
const UINT UC8
1画素8bit (符号無し)
Definition: FvImage.h:35
unsigned int UINT
整数型(32ビット)[符号なし]
Definition: FvDefs.h:37
const INT MASK
マスク部分
Definition: FvPattern.h:39
void * FHANDLE
FIEオブジェクトハンドル
Definition: FvDefs.h:63
INT m_Option
オプション
Definition: FvPattern.h:131
画像オブジェクト
Definition: FvImage.h:64
FVCL::Data::CFvPoint m_CenterMark
パタン基準点
Definition: FvPattern.h:130
const INT ESSENTIAL
不可欠部分
Definition: FvPattern.h:40
エラーコードネームスペース

Documentation copyright © 2007 FAST Corporation. [B-001864]
Generated on 2023年11月02日(木) 10時12分53秒 for WIL説明書(C++) by doxygen 1.8.11