📄 rsimagestarview.h
字号:
// RSImageStarView.h : interface of the CRSImageStarView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_RSIMAGESTARVIEW_H__B0518B35_C36D_45FA_A806_45B32472D484__INCLUDED_)
#define AFX_RSIMAGESTARVIEW_H__B0518B35_C36D_45FA_A806_45B32472D484__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define ERASE 601
#define PEN 602
#define SELECT 603
#define CURVE 604
#define SPRAY 605
#define PAINT 606
#define LINE 607
#define PICKER 608
#define MAG 609
#define RECT 610
#define ROUND 611
#define OVAL 612
#define MOVE 613
#define ImageOut 614
#define ImageBrowse 615
#define ImageIn 616
#define Text 617
#define POLYLINE ID_EDIT_VPOLYLINE
#define TransColor RGB(255,255,255)
#include "RsDll.h"
class CRSImageStarView : public CScrollView
{
protected: // create from serialization only
CRSImageStarView();
DECLARE_DYNCREATE(CRSImageStarView)
// Attributes
public:
CRSImageStarDoc* GetDocument();
public:
CRSImageStarDoc *m_pDoc;
public:
//画符号的操作
BYTE m_symbol;
RsDll dll;
CDrawSymbol symbol;
CString FileNamePot;
CString FileNameLine;
CString FileNameArea;
// m_ClientRect记录当前窗口大小,m_InVRect记录需要更新的窗口大小
CRect m_ClientRect,m_InVRect;
CRect m_DrawRect,m_DibRect;
UINT m_DrawType;
UINT m_ToolOption; //工具栏控制标识,标识按下的工具栏键
BOOL flagLB,m_MoveRgn; //鼠标左键控制标识
BOOL m_hDibEmpty;
CPoint startpoint,temppoint,endpoint,pos,startLpPoint;
CSize m_fSize; //标识文件长宽的CSize结构
float m_fScale; //控制图象显示比例
BOOL m_PreView,m_InValidateRect;//预览控制标识
LOGFONT logfont;
CString strfont,strfont1;
COLORREF m_TextColor;
BOOL m_TextCurve; //画注记路径标志
BOOL m_PolyLine,m_Poly;
CPoint m_FirstPoint,m_TempPoint;
int num[200];
int time,flagtime;
int m_nPenStyle; //笔的类型
int m_nPenWidth; //笔的宽度
COLORREF m_crPenColor; //记录前景色
COLORREF m_crFillColor; //记录背景色
BOOL m_bDrawFreeline; //画线标志
BOOL m_bErasing; //檫出标志
BOOL m_bDrawingRubber; //画橡皮线标志
BOOL m_bDrawRect;
CBitmap bitmap;
HCURSOR m_Pen;
HCURSOR m_Erase;
HCURSOR m_Picker;
HCURSOR m_Cross;
HCURSOR m_Text;
HCURSOR m_Paint;
public:
void DrawSelectionRect(CDC* pDC);
void ShowPenColor();
void ShowFillColor();
void ClientToDib(CPoint& point);
void ClientToDib(CRect& rect);
void DibToClient(CPoint& point);
void DibToClient(CRect& rect);
void AddPoint(CPoint);
void DisPlayText(CPoint ,float ,int );
BOOL CreateRgn();
BOOL CreateRgn1(struct Layer *);
void RgnOffset(CPoint);
void InitalDraw();
void FillRgn();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CRSImageStarView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CRSImageStarView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CRSImageStarView)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnEditCopy();
afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
afx_msg void OnEditPaste();
afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnImageHue();
afx_msg void OnImageSegment();
afx_msg void OnImageStretch();
afx_msg void OnImageArithmetic();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnZoomIn(CPoint,BOOL flag=false);
afx_msg void OnZoomOut(CPoint,BOOL flag=false);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnEditCut();
afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI);
afx_msg void OnLayerMergevisunit();
afx_msg void OnUpdateLayerMergevisunit(CCmdUI* pCmdUI);
afx_msg void OnLayerMergedownunit();
afx_msg void OnUpdateLayerMergedownunit(CCmdUI* pCmdUI);
afx_msg void OnEditPoly();
afx_msg void OnEditVpolyline();
afx_msg void OnImageBitmap();
afx_msg void OnUpdateImageBitmap(CCmdUI* pCmdUI);
afx_msg void OnImageGray();
afx_msg void OnUpdateImageGray(CCmdUI* pCmdUI);
afx_msg void OnImageIndex();
afx_msg void OnUpdateImageIndex(CCmdUI* pCmdUI);
afx_msg void OnImageRgb();
afx_msg void OnUpdateImageRgb(CCmdUI* pCmdUI);
afx_msg void OnEditPosition();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg void OnPalette(UINT nID);
afx_msg void OnUpdatePalette(CCmdUI* pCmdUI);
afx_msg void OnFillcolor1();
afx_msg void OnPencolor1();
afx_msg void OnFillcolor();
afx_msg void OnPencolor();
afx_msg void OnLayerColor();
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in RSImageStarView.cpp
inline CRSImageStarDoc* CRSImageStarView::GetDocument()
{ return (CRSImageStarDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_RSIMAGESTARVIEW_H__B0518B35_C36D_45FA_A806_45B32472D484__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -