JunkBox_Win_Lib 1.5.3
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CDxGraphDoc Class Reference

#include <DxGraphDoc.h>

Inheritance diagram for CDxGraphDoc:
Collaboration diagram for CDxGraphDoc:

Public Member Functions

BOOL MakeViewData ()
 
BOOL ReadDataFile (LPCTSTR fname)
 
virtual void Serialize (CArchive &ar)
 
virtual ~CDxGraphDoc ()
 
virtual void AssertValid () const
 
virtual void Dump (CDumpContext &dc) const
 
- Public Member Functions inherited from CExDocument
CExViewGetView ()
 
virtual BOOL WriteDataFile (LPCTSTR)
 
virtual BOOL OnNewDocument ()
 
virtual BOOL OnOpenDocument (LPCTSTR lpszPathName)
 
virtual ~CExDocument ()
 

Protected Member Functions

 CDxGraphDoc ()
 
- Protected Member Functions inherited from CExDocument
 CExDocument ()
 

Additional Inherited Members

- Public Attributes inherited from CExDocument
CmnHead infHead
 
ExMSGraph< sWordmsGraph
 
ExCmnHead cmnHead
 
CExViewpView
 
CExFramepFrame
 
CAppCallBackpApp
 
voidanyData
 
CString Title
 
CString preTitle
 
CString pstTitle
 
int vMax
 
int vMin
 
int cMax
 
int cMin
 
int base
 
int colorMode
 
int startNo
 
int endNo
 
BOOL multiSliceData
 
BOOL hasReadData
 
BOOL hasViewData
 
BOOL ctrlCntrst
 
BOOL notFreeMSGraph
 
BOOL notFreeCmnHead
 

Detailed Description

Definition at line 39 of file DxGraphDoc.h.

Constructor & Destructor Documentation

◆ CDxGraphDoc()

CDxGraphDoc ( )
protected

Definition at line 25 of file DxGraphDoc.cpp.

26{
27}

◆ ~CDxGraphDoc()

~CDxGraphDoc ( )
virtual

Definition at line 31 of file DxGraphDoc.cpp.

32{
33}

Member Function Documentation

◆ AssertValid()

void AssertValid ( ) const
virtual

Reimplemented from CExDocument.

Definition at line 48 of file DxGraphDoc.cpp.

49{
51}
virtual void AssertValid() const

References CExDocument::AssertValid().

Here is the call graph for this function:

◆ Dump()

void Dump ( CDumpContext & dc) const
virtual

Reimplemented from CExDocument.

Definition at line 54 of file DxGraphDoc.cpp.

55{
57}
virtual void Dump(CDumpContext &dc) const

References CExDocument::cMin, and CExDocument::Dump().

Here is the call graph for this function:

◆ MakeViewData()

BOOL MakeViewData ( )
virtual

Reimplemented from CExDocument.

Definition at line 108 of file DxGraphDoc.cpp.

109{
110// int kind = cmnHead.kind;
111// int chk = kind & 0x00ff;
112
113 if (!msGraph.isNull()) {
115
116 int mode = 0;
117 if (msGraph.color==GRAPH_COLOR_MONO || msGraph.color==GRAPH_COLOR_MONO16 || // 表示は 8bit
121 // 8bit/pixcel
123 }
124 if (ctrlCntrst || msGraph.color==GRAPH_COLOR_MONO16) {
126 }
127
128 //
130
131 //
132 cMax = vMax = msGraph.max;
133 cMin = vMin = msGraph.min;
135 // 16bit/pixcel
136 //vMax = cMax = UWORDMAX;
137 //vMin = cMin = 0;
138 }
139 else if (!ctrlCntrst && cMin>=0 && cMax<=VIEW_8_MAX) {
140 vMax = cMax = VIEW_8_MAX;
141 vMin = cMin = 0;
142 }
143 }
144
145 else { // DirectX9 サポートデータ(DirectX9に任せる)
148 if (FAILED(hr)) {
149 freeNull(cmnHead.grptr);
150 cmnHead.kind = HEADER_NONE;
151 return FALSE;
152 }
153 cmnHead.xsize = imgInfo.Width;
154 cmnHead.ysize = imgInfo.Height;
155 cmnHead.zsize = 1;
156 cmnHead.depth = imgInfo.Format;
157 cmnHead.bsize = sizeof(D3DXIMAGE_INFO);
158 cmnHead.buf = (uByte*)malloc(cmnHead.bsize);
159 if (cmnHead.buf==NULL) {
161 return FALSE;
162 }
163 bcopy((char*)&imgInfo, (char*)cmnHead.buf, cmnHead.bsize);
164 }
165 return TRUE;
166}
#define VIEW_8_MAX
Definition ExView.h:39
ExCmnHead cmnHead
Definition ExDocument.h:53
ExMSGraph< sWord > msGraph
Definition ExDocument.h:52

References CExDocument::cMax, CExDocument::cMin, CExDocument::cmnHead, CExDocument::ctrlCntrst, CExDocument::msGraph, VIEW_8_MAX, CExDocument::vMax, and CExDocument::vMin.

◆ ReadDataFile()

BOOL ReadDataFile ( LPCTSTR str)
virtual

機能: 画像データを読み込む. 引数: ファイル名 戻値: TRUE: 成功,FALSE: 失敗 説明: 読み込んだグラフィックデータ(msGraphメンバ)と ヘッダ情報(cmnHeadメンバ) cmnHead.kind: HEADER_ERR → データ読み込み失敗. その他 → CmnHead hd にデータが入る. UN_KNOWN → ヘッダが解析できないのでファイルイメージのまま hd->grptrに格納される. hd->kind, hd->lsize, hd->gptrのみ有効.MSGraph<sWord>.gp はNULL. その他 → MSGraph<sWord>.gp にデータが入る. cmnHead にはヘッダ情報のみが入り,cmnHead->buf, cmnHead->gptr はNULL. CT_DATA, RAS_DATA, CT_3DX など.

Reimplemented from CExDocument.

Definition at line 96 of file DxGraphDoc.cpp.

97{
98 char* fname = ts2mbs(str);
100 ::free(fname);
102
103 if (cmnHead.kind==HEADER_NONE) return FALSE;
104 return TRUE;
105}
char * ts2mbs(LPCTSTR str)
Definition WinTools.h:57

References CExDocument::cMin, CExDocument::cmnHead, CExDocument::infHead, CExDocument::msGraph, and jbxwl::ts2mbs().

Here is the call graph for this function:

◆ Serialize()

void Serialize ( CArchive & ar)
virtual

Reimplemented from CExDocument.

Definition at line 65 of file DxGraphDoc.cpp.

66{
67 if (ar.IsStoring())
68 {
69 // TODO: この位置に保存用のコードを追加してください
70 }
71 else
72 {
73 // TODO: この位置に読み込み用のコードを追加してください
74 }
75}

References CExDocument::cMin.


The documentation for this class was generated from the following files: