亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cround.cpp

?? 完整的基本圖形繪制系統 .rar
?? CPP
字號:
#include "stdafx.h"
#include"CRound.h"
#include"EastDrawView.h"
IMPLEMENT_SERIAL(CRound,CUnit,1)
void CRound::DrawStatic(CDC*pDC)
{
  CPen m_pen;
  CBrush m_brush;
  int oldDrawingMode=pDC->SetROP2(m_DrawingMode);
  m_pen.CreatePen(m_PenStyle,m_PenWidth,m_PenColor);
  CPen* pen=(CPen*)pDC->SelectObject(&m_pen);
  LOGBRUSH brushlog;
  brushlog.lbColor=m_BrushColor;
  brushlog.lbHatch=m_BrushHatch;
  brushlog.lbStyle=m_BrushStyle;

  m_brush.CreateBrushIndirect(&brushlog);
  
  CBrush*brush=(CBrush*)pDC->SelectObject(&m_brush);
  SetBrushOrg(pDC,&m_brush);
 int OldBkMode=pDC->SetBkMode(m_BkMode);
 COLORREF OldColor=pDC->SetBkColor(m_BackgroundColor);

// CPoint lpoint=m_SecondPoint.x-m_FirstPoint.x>m_SecondPoint.y-m_FirstPoint.y?CPoint(m_SecondPoint.x,m_FirstPoint.y+m_SecondPoint.x-m_FirstPoint.x):CPoint(m_FirstPoint.x+m_SecondPoint.y-m_FirstPoint.y,m_SecondPoint.y);
 //m_SecondPoint=lpoint;
 pDC->Ellipse(CRect(m_FirstPoint,m_SecondPoint)); 
 pDC->SelectObject(brush);
 pDC->SelectObject(pen);
 pDC->SetBkMode(OldBkMode);
 pDC->SetBkColor(OldColor);
 pDC->SetROP2(oldDrawingMode);
}

CRound::CRound()
{
  Initial();
 
  m_BrushStyle=BS_HOLLOW;
  m_BrushHatch=HS_CROSS;

}





int CRound::ComputRadious(CPoint centerPoint, CPoint movingPoint)
{

m_Radious=int(sqrt((centerPoint.x-movingPoint.x)*(centerPoint.x-movingPoint.x)+(centerPoint.y-movingPoint.y)*(centerPoint.y-movingPoint.y)));
CPoint cpoint;
cpoint=centerPoint;
cpoint.Offset(-m_Radious,-m_Radious);
this->m_FirstPoint=cpoint;
cpoint=centerPoint;
cpoint.Offset(m_Radious,m_Radious);
this->m_SecondPoint=cpoint;
return 0;

}

BOOL CRound::IsInRgn(CPoint point)
{
 CPoint FirstPoint;
 CPoint SecondPoint;
 FirstPoint.x=m_FirstPoint.x<m_SecondPoint.x?m_FirstPoint.x:m_SecondPoint.x;
 FirstPoint.y=m_FirstPoint.y<m_SecondPoint.y?m_FirstPoint.y:m_SecondPoint.y;
 SecondPoint.x=m_FirstPoint.x>m_SecondPoint.x?m_FirstPoint.x:m_SecondPoint.x;
 SecondPoint.y=m_FirstPoint.y>m_SecondPoint.y?m_FirstPoint.y:m_SecondPoint.y;
 m_FirstPoint=FirstPoint;
 m_SecondPoint=SecondPoint;
	
	CRgn rgn1;
	rgn1.CreateEllipticRgn(m_FirstPoint.x-4,m_FirstPoint.y-4,m_SecondPoint.x+4,m_SecondPoint.y+4);
    CRgn rgn2;
	rgn2.CreateEllipticRgn(m_FirstPoint.x+4,m_FirstPoint.y+4,m_SecondPoint.x-4,m_SecondPoint.y-4);

	return rgn1.PtInRegion(point)&&!rgn2.PtInRegion(point);
}

int CRound::IsOnMarginPoint(CPoint point)
{
 CPoint FirstPoint;
 CPoint SecondPoint;
 FirstPoint.x=m_FirstPoint.x<m_SecondPoint.x?m_FirstPoint.x:m_SecondPoint.x;
 FirstPoint.y=m_FirstPoint.y<m_SecondPoint.y?m_FirstPoint.y:m_SecondPoint.y;
 SecondPoint.x=m_FirstPoint.x>m_SecondPoint.x?m_FirstPoint.x:m_SecondPoint.x;
 SecondPoint.y=m_FirstPoint.y>m_SecondPoint.y?m_FirstPoint.y:m_SecondPoint.y;
 m_FirstPoint=FirstPoint;
 m_SecondPoint=SecondPoint;
 CRect rect(point,point);
 rect.InflateRect(CSize(4,4));
 if(rect.PtInRect(CPoint(m_FirstPoint.x+(m_SecondPoint.x-m_FirstPoint.x)/2,m_FirstPoint.y)))
	{
	 m_FoundPoint=CPoint(m_FirstPoint.x+(m_SecondPoint.x-m_FirstPoint.x)/2,m_FirstPoint.y);
	 return 1;
    }   
 if(rect.PtInRect(CPoint(m_SecondPoint.x,m_FirstPoint.y+(m_SecondPoint.y-m_FirstPoint.y)/2)))
 {
	 m_FoundPoint=CPoint(m_SecondPoint.x,m_FirstPoint.y+(m_SecondPoint.y-m_FirstPoint.y)/2);
	 return 2;
 }
 if(rect.PtInRect(CPoint(m_SecondPoint.x+(m_FirstPoint.x-m_SecondPoint.x)/2,m_SecondPoint.y)))
 {
	 m_FoundPoint=CPoint(m_SecondPoint.x+(m_FirstPoint.x-m_SecondPoint.x)/2,m_SecondPoint.y);
	 return 3;
 }
 if(rect.PtInRect(CPoint(m_FirstPoint.x,m_SecondPoint.y+(m_FirstPoint.y-m_SecondPoint.y)/2)))
 {
	 m_FoundPoint=CPoint(m_FirstPoint.x,m_SecondPoint.y+(m_FirstPoint.y-m_SecondPoint.y)/2);
	 return 4;
 }
 if(rect.PtInRect(this->m_CenterPoint))
 {
	 m_FoundPoint=m_CenterPoint;
	 return 5;
 }
  return 0;
}

void CRound::Serialize(CArchive &ar)
{
    CUnit::Serialize(ar);
    if(ar.IsStoring())
	{
	  ar<<m_BrushStyle<<m_BkMode<<m_BrushHatch<<m_BrushColor<<m_CenterPoint;
	}
	else
	{
	  ar>>m_BrushStyle>>m_BkMode>>m_BrushHatch>>m_BrushColor>>m_CenterPoint;
	}


}

void CRound::ShowSelectPoint(CDC *pDC)
{
 CBrush brush;
brush.CreateSolidBrush(RGB(0,0,255));
CPen m_pen;
m_pen.CreatePen(PS_SOLID,1,RGB(0,0,255));
CPen *OldPen=pDC->SelectObject(&m_pen);
int oldBkMode=pDC->SetBkMode(OPAQUE); 
CBrush *OldBrush=pDC->SelectObject(&brush);
int oldDrawingMode=pDC->SetROP2(R2_NOTXORPEN);
 CRect rect;
 rect.SetRect(CPoint(m_FirstPoint.x+(m_SecondPoint.x-m_FirstPoint.x)/2,m_FirstPoint.y),CPoint(m_FirstPoint.x+(m_SecondPoint.x-m_FirstPoint.x)/2,m_FirstPoint.y));
 rect.InflateRect(3,3);
 pDC->Rectangle(rect);
 rect.SetRect(CPoint(m_SecondPoint.x,m_FirstPoint.y+(m_SecondPoint.y-m_FirstPoint.y)/2),CPoint(m_SecondPoint.x,m_FirstPoint.y+(m_SecondPoint.y-m_FirstPoint.y)/2));
 rect.InflateRect(3,3);
 pDC->Rectangle(rect);
 rect.SetRect(CPoint(m_SecondPoint.x+(m_FirstPoint.x-m_SecondPoint.x)/2,m_SecondPoint.y),CPoint(m_SecondPoint.x+(m_FirstPoint.x-m_SecondPoint.x)/2,m_SecondPoint.y));
 rect.InflateRect(3,3);
 pDC->Rectangle(rect);
 rect.SetRect(CPoint(m_FirstPoint.x,m_SecondPoint.y+(m_FirstPoint.y-m_SecondPoint.y)/2),CPoint(m_FirstPoint.x,m_SecondPoint.y+(m_FirstPoint.y-m_SecondPoint.y)/2));
 rect.InflateRect(3,3);
 pDC->Rectangle(rect);

 pDC->SelectObject(OldBrush);
  brush.DeleteObject();
  brush.CreateSolidBrush(RGB(255,0,0));
  pDC->SelectObject(&brush);
 rect.SetRect(this->m_CenterPoint,this->m_CenterPoint);
 rect.InflateRect(3,3);
 pDC->Rectangle(rect);
pDC->SelectObject(OldPen);
pDC->SetBkMode(oldBkMode); 
pDC->SelectObject(OldBrush);
pDC->SetROP2(oldDrawingMode);


}

void CRound::DrawActive(CDC *pDC,CPoint point)
{
  CPen m_pen;
  CBrush m_brush;
  
  m_pen.CreatePen(m_PenStyle,m_PenWidth,m_PenColor);
  CPen* pen=(CPen*)pDC->SelectObject(&m_pen);
  LOGBRUSH brushlog;
  brushlog.lbColor=m_BrushColor;
  brushlog.lbHatch=m_BrushHatch;
  brushlog.lbStyle=m_BrushStyle;

  m_brush.CreateBrushIndirect(&brushlog);
 SetBrushOrg(pDC,&m_brush);
  CBrush*brush=(CBrush*)pDC->SelectObject(&m_brush);
 
 int OldBkMode=pDC->SetBkMode(m_BkMode);
 COLORREF OldColor=pDC->SetBkColor(m_BackgroundColor);

// CPoint lpoint=m_SecondPoint.x-m_FirstPoint.x>m_SecondPoint.y-m_FirstPoint.y?CPoint(m_SecondPoint.x,m_FirstPoint.y+m_SecondPoint.x-m_FirstPoint.x):CPoint(m_FirstPoint.x+m_SecondPoint.y-m_FirstPoint.y,m_SecondPoint.y);
 //m_SecondPoint=lpoint;
 pDC->Ellipse(CRect(m_FirstPoint,m_SecondPoint)); 
 pDC->SelectObject(brush);
 pDC->SelectObject(pen);
 pDC->SetBkMode(OldBkMode);
 pDC->SetBkColor(OldColor);
 
}

void CRound::OnLButtonDown(CDC *pDC, CEastDrawView *pView, CPoint point)
{
  if(m_HaveFindFirst)
	{
	 pView->L_iPointCount=IsOnMarginPoint(point);
	if(pView->L_iPointCount!=0)
	{
		pView->m_bHaveFindSecond=true;
        pView->m_CurrentDrawTool=Round_Tool;
        pView->m_CurrentDrawStatus=Change_Status;
	    pView->m_FirstPoint=m_FirstPoint;
	    pView->m_SecondPoint=m_SecondPoint;
	    
	}//******if(L_iPointCount!=0)
	
  if(pView->L_iPointCount==5)
	{
	 pView->m_FirstPoint=m_FirstPoint;
	 pView->m_SecondPoint=m_SecondPoint;
     pView->m_CurrentDrawTool=Round_Tool;
     pView->m_CurrentDrawStatus=Drag_Status;
	}
	}//********if(L_pRound->m_HaveFindFirst)
  
     if(!pView->m_bHaveFindSecond&&IsInRgn(point))
	 {
		 if(!m_HaveFindFirst)
		 {
	      m_HaveFindFirst=true;
	      pView->m_bHaveFindFirst=true;
		  ShowSelectPoint(pDC);
		 }
         else
		 {
		  this->m_HaveFindFirst=false;
		  pView->m_bHaveFindFirst=true;
           ShowSelectPoint(pDC);
		}

	 }

   
   if(pView->m_bHaveFindSecond)
		{   
	        pView->m_pCurrentUnit=this;
			m_MovingPoint=point;
	        m_DrawingMode=pDC->GetROP2();
			//m_pCurrentUnit->m_MovingPoint=point;
			ShowSelectPoint(pDC);
		    DrawOldReferencePoint(pDC,m_FoundPoint);
	        DrawStatic(pDC);
	    }
 }//******for(i=0;!m_bHaveFindFirst&&i<pDoc->m_RoundArray.GetSize();i++)
 

void CRound::OnMouseMove(CDC *pDC, CEastDrawView *pView, CPoint point)
{
          if(pView->m_CurrentDrawStatus==Drag_Status)
		  {
			 m_FirstPoint.Offset(pView->m_SecondPoint.x-pView->m_FirstPoint.x,pView->m_SecondPoint.y-pView->m_FirstPoint.y);
             m_SecondPoint.Offset(pView->m_SecondPoint.x-pView->m_FirstPoint.x,pView->m_SecondPoint.y-pView->m_FirstPoint.y);
	         m_CenterPoint.Offset(pView->m_SecondPoint.x-pView->m_FirstPoint.x,pView->m_SecondPoint.y-pView->m_FirstPoint.y);
		  
		  }
		  else
		  {
	      
		  ShowMovingLine(pDC,m_CenterPoint,pView->m_SecondPoint);
		   this->DrawActive(pDC,point);
		  ComputRadious(m_CenterPoint,point);
	      pView->m_SecondPoint=point;
		  
		 this->DrawActive(pDC,point);
		  ShowMovingLine(pDC,m_CenterPoint,pView->m_SecondPoint);

		  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区影院| **网站欧美大片在线观看| 亚洲乱码日产精品bd| 91麻豆精品久久久久蜜臀 | 亚洲黄色av一区| 欧美一区欧美二区| 美女精品一区二区| 欧美理论电影在线| 亚洲一线二线三线久久久| 91精品国产综合久久久蜜臀粉嫩| 国产91精品精华液一区二区三区 | 91高清视频免费看| 午夜视频一区二区| 3d动漫精品啪啪| 国产一区啦啦啦在线观看| 成人av网站大全| 中文字幕+乱码+中文字幕一区| 成人性色生活片| 精品在线观看免费| 日本va欧美va欧美va精品| 日本91福利区| 成人美女视频在线观看18| 欧美日韩国产成人在线91| 亚洲精品国产一区二区精华液| 极品美女销魂一区二区三区 | 国产精品卡一卡二| 日韩精品中文字幕一区二区三区| 91国产丝袜在线播放| 99在线精品一区二区三区| 国产一区欧美日韩| 成人午夜又粗又硬又大| 亚洲精品综合在线| 精品久久久网站| 精品久久久影院| 欧美一区二区美女| 国产在线国偷精品产拍免费yy | 日韩一卡二卡三卡国产欧美| 91成人网在线| 国产成人综合在线播放| 国产999精品久久久久久绿帽| 婷婷六月综合亚洲| 99久久婷婷国产综合精品| 国产精品影视天天线| 国产欧美日韩在线| 日韩视频中午一区| 国产在线观看免费一区| 性感美女极品91精品| 日韩影院免费视频| 久久99久久久久| 欧美高清在线一区二区| 一区二区三区四区在线免费观看 | 一区二区欧美视频| 在线观看亚洲精品| 日本aⅴ亚洲精品中文乱码| 久久99久久久久| 成人黄色av电影| 国产精品美女久久久久aⅴ国产馆| 日日欢夜夜爽一区| 在线免费观看日本一区| 一区二区三区四区高清精品免费观看| 美洲天堂一区二卡三卡四卡视频 | 午夜精品久久久久久久蜜桃app| 欧美午夜精品一区二区三区| 视频在线观看一区二区三区| 精品国产乱码久久久久久闺蜜| 国产精品影视在线| 亚洲综合丝袜美腿| 26uuu久久综合| 97久久超碰精品国产| 日本v片在线高清不卡在线观看| 久久女同精品一区二区| 色综合天天综合网天天看片| 日韩综合在线视频| 国产精品网曝门| 欧美蜜桃一区二区三区| 国产不卡视频一区二区三区| 国产精品一区二区在线看| 亚洲一二三区在线观看| 日本电影亚洲天堂一区| 亚洲成av人片一区二区三区| 国产成人亚洲综合a∨婷婷 | 99久久99精品久久久久久| 日韩1区2区3区| 在线视频一区二区免费| 亚洲乱码国产乱码精品精可以看| 成人国产精品免费观看视频| 国产精品拍天天在线| 激情欧美日韩一区二区| 精品欧美一区二区三区精品久久| 极品少妇一区二区| 国产亚洲综合色| 色综合色综合色综合色综合色综合| 国产亚洲自拍一区| 在线观看免费视频综合| 秋霞影院一区二区| 国产亚洲一区字幕| 欧美视频三区在线播放| 狂野欧美性猛交blacked| 国产三区在线成人av| 一本大道av一区二区在线播放| 亚洲黄色录像片| 日韩一区二区不卡| 成人午夜视频福利| 日韩电影一区二区三区| 久久久久久久一区| 欧洲精品一区二区三区在线观看| 日本欧美一区二区三区乱码| 国产人久久人人人人爽| 欧美偷拍一区二区| 精品亚洲porn| 一区二区三区成人| 久久精品视频免费| 欧美日韩精品免费观看视频| 国产成人啪免费观看软件| 一区二区久久久| 国产亚洲美州欧州综合国| 欧美性xxxxxx少妇| 懂色av一区二区夜夜嗨| 亚洲网友自拍偷拍| 国产精品日韩成人| 日韩免费高清av| 欧美在线制服丝袜| 成人免费毛片aaaaa**| 日韩av电影天堂| 亚洲一区二区三区在线| 日本一区二区久久| 精品久久免费看| 51精品秘密在线观看| 91丨九色丨蝌蚪丨老版| 国产精品白丝jk白祙喷水网站 | 亚洲一区二区在线观看视频| 欧美极品少妇xxxxⅹ高跟鞋| 日韩视频在线你懂得| 欧美亚洲国产bt| 97久久精品人人爽人人爽蜜臀| 国产一区免费电影| 免费人成网站在线观看欧美高清| 亚洲国产中文字幕| 一二三四社区欧美黄| 亚洲色图19p| 亚洲色欲色欲www| 日韩理论片网站| 亚洲视频 欧洲视频| 国产精品福利影院| 亚洲欧洲精品天堂一级| 中文欧美字幕免费| 国产精品免费免费| 亚洲特级片在线| 综合在线观看色| 一区二区三区四区蜜桃 | 欧美日韩高清一区二区| 在线免费观看日本一区| 91色九色蝌蚪| 欧美三级乱人伦电影| 色久优优欧美色久优优| 在线看国产日韩| 欧美日韩在线直播| 欧美日韩aaa| 日韩精品在线一区| 国产欧美日韩三级| 日韩理论电影院| 偷窥国产亚洲免费视频| 日本午夜精品视频在线观看| 日本麻豆一区二区三区视频| 青青国产91久久久久久| 91福利在线看| 欧美无砖专区一中文字| 日韩一区二区视频在线观看| 精品美女在线播放| 国产精品久久毛片| 亚洲成人免费观看| 狠狠色丁香久久婷婷综合_中| 成人午夜av在线| 欧美午夜精品久久久久久超碰| 日韩一区二区高清| 国产精品污www在线观看| 一区二区三区在线视频播放 | 久久综合九色综合欧美就去吻| 久久无码av三级| 中文字幕中文在线不卡住| 亚洲狠狠爱一区二区三区| 六月婷婷色综合| 国产成人精品三级| 欧美日韩国产精品成人| 久久欧美一区二区| 亚洲成人精品影院| 国精品**一区二区三区在线蜜桃| 色综合一个色综合| 欧美日本在线播放| 国产午夜精品久久| 亚洲成人av在线电影| 国产激情视频一区二区在线观看| 91香蕉国产在线观看软件| 91理论电影在线观看| 日韩亚洲电影在线| 一区二区三区四区不卡视频| 激情综合色综合久久| 欧美三级视频在线观看| 成人欧美一区二区三区白人 | 欧美高清www午色夜在线视频|