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

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

?? croundrectangle.cpp

?? 完整的基本圖形繪制系統 .rar
?? CPP
字號:
#include "stdafx.h"
#include"CRoundRectangle.h"
#include"EastDrawView.h"
IMPLEMENT_SERIAL(CRoundRectangle,CUnit,1)
void CRoundRectangle::DrawStatic(CDC*pDC)
{  
 
  CPen m_pen;
  CBrush m_brush;
  int oldDrawingMode=pDC->SetROP2(this->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);
  SetBrushOrg(pDC,&m_brush);
  CBrush*brush=(CBrush*)pDC->SelectObject(&m_brush);
 
 int OldBkMode=pDC->SetBkMode(m_BkMode);
 COLORREF OldColor=pDC->SetBkColor(m_BackgroundColor);
 pDC->RoundRect(CRect(m_FirstPoint,m_SecondPoint),CPoint(abs(m_FirstPoint.x-m_SecondPoint.x)/3,abs(m_FirstPoint.y-m_SecondPoint.y)/3)); 
 pDC->SelectObject(brush);
 pDC->SelectObject(pen);
 pDC->SetBkMode(OldBkMode);
 pDC->SetBkColor(OldColor);
 pDC->SetROP2(oldDrawingMode);

}
CRoundRectangle::CRoundRectangle()
{
  Initial();
  //m_Shape=0;
  m_BrushStyle=BS_HOLLOW;
  m_BrushHatch=HS_CROSS;

}
void CRoundRectangle::Serialize(CArchive &ar)
{
	CUnit::Serialize(ar);
    if(ar.IsStoring())
	{
	  ar<<m_BrushStyle<<m_BrushHatch<<m_BrushColor;
	}
	else
	{
	  ar>>m_BrushStyle>>m_BrushHatch>>m_BrushColor;
	}
	
}
BOOL CRoundRectangle::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;
	
	
	
	CRect rgn1;
	rgn1.SetRect(m_FirstPoint.x,m_FirstPoint.y,m_SecondPoint.x,m_SecondPoint.y);
	rgn1.InflateRect(4,4);
    CRect rgn2;
	rgn2.SetRect(m_FirstPoint.x,m_FirstPoint.y,m_SecondPoint.x,m_SecondPoint.y);
    rgn2.DeflateRect(4,4); 
	return rgn1.PtInRect(point)&&!rgn2.PtInRect(point);
	
}
int CRoundRectangle::IsOnMarginPoint(CPoint point)
{

 
 CRect rect(point,point);
 rect.InflateRect(CSize(4,4));
 

 CPoint lpoint=m_FirstPoint;
        //lpoint.Offset(abs(m_FirstPoint.x-m_SecondPoint.x)/1,abs(m_FirstPoint.y-m_SecondPoint.y)/1);
 if(rect.PtInRect(lpoint))
 {
	 m_FoundPoint=lpoint;
	 return 1;
 }      
        lpoint=CPoint(m_SecondPoint.x,m_FirstPoint.y);
	//	lpoint.Offset(-abs(m_FirstPoint.x-m_SecondPoint.x)/1,abs(m_FirstPoint.y-m_SecondPoint.y)/1);
 if(rect.PtInRect(lpoint))
 {
	 m_FoundPoint=lpoint;
	 return 2;
 }      
        lpoint=m_SecondPoint;
        //lpoint.Offset(-abs(m_FirstPoint.x-m_SecondPoint.x)/1,-abs(m_FirstPoint.y-m_SecondPoint.y)/1);
 if(rect.PtInRect(lpoint))
 { 
	 m_FoundPoint=lpoint;
	 return 3;
 }      
        lpoint=CPoint(m_FirstPoint.x,m_SecondPoint.y);
        //lpoint.Offset(abs(m_FirstPoint.x-m_SecondPoint.x)/1,-abs(m_FirstPoint.y-m_SecondPoint.y)/1);
 if(rect.PtInRect(lpoint))
 {
	 m_FoundPoint=lpoint;
	 return 4;
 }
 if(rect.PtInRect(CPoint((m_FirstPoint.x+m_SecondPoint.x)/2,(m_FirstPoint.y+m_SecondPoint.y)/2)))
 {
	 m_FoundPoint=CPoint((m_FirstPoint.x+m_SecondPoint.x)/2,(m_FirstPoint.y+m_SecondPoint.y)/2);
	 return 5;
 }
  return 0;


	
}

void CRoundRectangle::ShowSelectPoint(CDC *pDC)
{

 CRect rect;
 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);

 CPoint lpoint=m_FirstPoint;
        //lpoint.Offset(abs(m_FirstPoint.x-m_SecondPoint.x)/1,abs(m_FirstPoint.y-m_SecondPoint.y)/1);
         rect.SetRect(lpoint,lpoint);
		 rect.InflateRect(3,3);
		 pDC->Rectangle(rect);
        
        lpoint=CPoint(m_SecondPoint.x,m_FirstPoint.y);
	//	lpoint.Offset(-abs(m_FirstPoint.x-m_SecondPoint.x)/1,abs(m_FirstPoint.y-m_SecondPoint.y)/1);
 rect.SetRect(lpoint,lpoint);
		 rect.InflateRect(3,3);
		 pDC->Rectangle(rect);
        
        lpoint=m_SecondPoint;
        //lpoint.Offset(-abs(m_FirstPoint.x-m_SecondPoint.x)/1,-abs(m_FirstPoint.y-m_SecondPoint.y)/1);
 rect.SetRect(lpoint,lpoint);
		 rect.InflateRect(3,3);
		 pDC->Rectangle(rect);
        
        lpoint=CPoint(m_FirstPoint.x,m_SecondPoint.y);
        ///lpoint.Offset(abs(m_FirstPoint.x-m_SecondPoint.x)/1,-abs(m_FirstPoint.y-m_SecondPoint.y)/1);
 rect.SetRect(lpoint,lpoint);
		 rect.InflateRect(3,3);
		 pDC->Rectangle(rect);


		 pDC->SelectObject(OldBrush);
  brush.DeleteObject();
  brush.CreateSolidBrush(RGB(255,0,0));
  pDC->SelectObject(&brush);
    lpoint=CPoint((m_FirstPoint.x+m_SecondPoint.x)/2,(m_FirstPoint.y+m_SecondPoint.y)/2);
     rect.SetRect(lpoint,lpoint);
		 rect.InflateRect(3,3);
		 pDC->Rectangle(rect);


pDC->SelectObject(OldPen);

pDC->SetBkMode(oldBkMode); 
pDC->SelectObject(OldBrush);
pDC->SetROP2(oldDrawingMode);

}

void CRoundRectangle::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);
 pDC->RoundRect(CRect(m_FirstPoint,m_SecondPoint),CPoint(abs(m_FirstPoint.x-m_SecondPoint.x)/3,abs(m_FirstPoint.y-m_SecondPoint.y)/3)); 
 pDC->SelectObject(brush);
 pDC->SelectObject(pen);
 pDC->SetBkMode(OldBkMode);
 pDC->SetBkColor(OldColor);

}

void CRoundRectangle::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=RoundRectangle_Tool;
        pView->m_CurrentDrawStatus=Change_Status;

	  if(pView->L_iPointCount==1)
	  {
	   pView->m_FirstPoint=m_SecondPoint;
	   pView->m_SecondPoint=point;
	  }
	  if(pView->L_iPointCount==2)
	  {
	  pView->m_FirstPoint=CPoint(m_FirstPoint.x,m_SecondPoint.y);
	  pView->m_SecondPoint=point;
	  }
      if(pView->L_iPointCount==3)
	  {
	   pView->m_FirstPoint=m_FirstPoint;
	   pView->m_SecondPoint=point;
	  }
	  if(pView->L_iPointCount==4)
	  {
	   pView->m_FirstPoint=CPoint(m_SecondPoint.x,m_FirstPoint.y);
	   pView->m_SecondPoint=point;
	  }
	  if(pView->L_iPointCount==5)
	  {
	   pView->m_FirstPoint=m_FirstPoint;
	   pView->m_SecondPoint=m_SecondPoint;
       pView->m_CurrentDrawTool=RoundRectangle_Tool;
       pView->m_CurrentDrawStatus=Drag_Status;
	   
	  }
	 }//******if(L_iPointCount!=0)
	 }//******if(L_pRoundRectangle->m_HaveFindFirst)
    
	if((!pView->m_bHaveFindSecond)&&IsInRgn(point))
	  {
        if(!m_HaveFindFirst)
		{
		  m_HaveFindFirst=true;
		  pView->m_bHaveFindFirst=true;
	      ShowSelectPoint(pDC);
		}
	    else
		{
	       m_HaveFindFirst=false;
		   pView->m_bHaveFindFirst=true;
		   ShowSelectPoint(pDC);
		}
	  
	  }
   
   if(pView->m_bHaveFindSecond)
		{   
	        pView->m_pCurrentUnit=this;
	        ShowSelectPoint(pDC);
	        m_DrawingMode=pDC->GetROP2();
	        DrawStatic(pDC);
		    DrawOldReferencePoint(pDC,m_FoundPoint);
	    }
		
}

void CRoundRectangle::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);   
	  }
	  else
	  {
	     
		  this->DrawActive(pDC,point);
	      pView->m_SecondPoint=point;
	      m_SecondPoint=pView->m_SecondPoint;
		  
		  this->DrawActive(pDC,point);
	  }
	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆视频一区二区| 一区二区三区在线不卡| 蜜桃视频第一区免费观看| 欧美日韩mp4| 免费高清不卡av| 欧美成人精品1314www| 韩日精品视频一区| 国产午夜精品一区二区三区嫩草 | 图片区日韩欧美亚洲| 欧美男人的天堂一二区| 麻豆精品一区二区三区| 久久精品人人爽人人爽| 一本色道久久综合狠狠躁的推荐| 亚洲激情av在线| 日韩一区二区免费视频| 成人小视频在线| 一区二区三区免费观看| 欧美一区二区三区在线| 国产成人亚洲综合a∨婷婷| 中文字幕亚洲区| 6080午夜不卡| 国产xxx精品视频大全| 一区二区三区中文字幕精品精品| 欧美日韩和欧美的一区二区| 国产一二三精品| 亚洲六月丁香色婷婷综合久久| 欧美日韩激情一区二区| 国产成人啪免费观看软件| 一区二区三区国产精华| 精品播放一区二区| 色偷偷成人一区二区三区91| 久久99热99| 亚洲欧美另类小说视频| 欧美成人猛片aaaaaaa| 色婷婷综合久久久中文字幕| 韩国成人精品a∨在线观看| 亚洲男人的天堂av| xnxx国产精品| 欧美日韩免费在线视频| 国产乱色国产精品免费视频| 亚洲伊人色欲综合网| 久久亚洲精品小早川怜子| 欧美三级日韩三级| 国产69精品久久99不卡| 日本女人一区二区三区| 亚洲丝袜另类动漫二区| 亚洲精品在线免费播放| 欧美三级中文字幕| 一本久久精品一区二区| 国产精品一二三四五| 丝袜诱惑亚洲看片| 亚洲乱码国产乱码精品精小说| 久久这里只有精品首页| 欧美精品九九99久久| 色94色欧美sute亚洲13| 国产99一区视频免费| 男女视频一区二区| 亚洲国产成人高清精品| 亚洲欧洲99久久| 国产色爱av资源综合区| 欧美成人福利视频| 欧美一区二区大片| 欧美美女一区二区在线观看| 色香色香欲天天天影视综合网| 国产不卡视频一区二区三区| 精品一区二区三区免费播放| 视频一区在线播放| 亚洲6080在线| 午夜精品在线看| 一区二区三区在线不卡| 亚洲精品第一国产综合野| 中文字幕亚洲欧美在线不卡| 国产精品情趣视频| 中文字幕第一页久久| 久久久久99精品国产片| 久久中文娱乐网| 国产性做久久久久久| 久久综合网色—综合色88| 欧美成人vr18sexvr| 精品国产成人系列| 久久九九久久九九| 久久久三级国产网站| 国产女主播视频一区二区| 久久久美女毛片| 日本一区二区久久| 国产精品盗摄一区二区三区| 中日韩av电影| 亚洲另类春色国产| 亚州成人在线电影| 久久精品999| 国产电影一区二区三区| 国产.欧美.日韩| 色天天综合色天天久久| 在线看一区二区| 欧美精品一卡两卡| 日韩一区二区三区av| 偷拍自拍另类欧美| 日本一不卡视频| 国产精品99久久久| 97久久精品人人澡人人爽| 欧美在线免费播放| 欧美精品视频www在线观看| 日韩一区二区视频在线观看| 欧美精品一区二区三| 中文字幕日韩一区| 午夜电影一区二区三区| 精品一区二区免费视频| 成人网页在线观看| 欧美视频在线观看一区| 日韩精品一区二区三区三区免费 | 精品国产乱码久久久久久免费| 国产视频不卡一区| 一区二区三区在线观看网站| 日韩中文字幕区一区有砖一区| 国产在线视频精品一区| 成人av中文字幕| 欧美日韩精品电影| 久久九九久久九九| 五月天视频一区| 丁香桃色午夜亚洲一区二区三区| 一本到三区不卡视频| 日韩免费观看高清完整版 | 亚洲日本免费电影| 美女视频黄免费的久久| 99久久精品国产导航| 日韩欧美激情一区| 国产精品成人一区二区三区夜夜夜| 午夜精品久久久久久久久久久| 国产精选一区二区三区| 欧美最猛黑人xxxxx猛交| 久久影视一区二区| 夜夜嗨av一区二区三区中文字幕| 国产另类ts人妖一区二区| 欧美性欧美巨大黑白大战| 久久久精品免费观看| 无码av中文一区二区三区桃花岛| www.亚洲在线| 精品国产免费一区二区三区四区| 一区2区3区在线看| 成人激情校园春色| 精品美女一区二区| 天天色 色综合| 91久久国产最好的精华液| 久久久久久久久岛国免费| 亚洲第一成人在线| www.欧美亚洲| 久久久久97国产精华液好用吗| 日本欧美加勒比视频| 欧美探花视频资源| 亚洲欧洲综合另类| 国产suv精品一区二区三区| 日韩一区二区三区免费观看| 亚洲高清在线视频| 91黄色免费网站| 一区二区视频在线| 91玉足脚交白嫩脚丫在线播放| 久久久久99精品国产片| 久草热8精品视频在线观看| 欧美精品在线观看一区二区| 亚洲一区在线视频| 色婷婷av一区二区| 亚洲综合精品自拍| 欧美最猛黑人xxxxx猛交| 亚洲影院在线观看| 精品视频1区2区| 亚洲午夜精品在线| 欧美日韩一区二区三区不卡| 亚洲午夜国产一区99re久久| 欧美中文字幕一区| 亚洲午夜日本在线观看| 欧美日韩视频在线一区二区| 天堂成人国产精品一区| 911精品国产一区二区在线| 午夜视频一区在线观看| 欧美色图片你懂的| 亚洲18女电影在线观看| 欧美一区二区精品久久911| 蜜臀av性久久久久av蜜臀妖精| 欧美一级黄色片| 国产午夜亚洲精品不卡| 欧美军同video69gay| 一区二区三区资源| 欧美日韩一区二区在线视频| 午夜一区二区三区在线观看| 欧美一级高清片| 国产在线不卡一区| 国产精品免费久久久久| 91亚洲大成网污www| 亚洲伊人伊色伊影伊综合网| 欧美夫妻性生活| 久久99国产精品免费| 欧美激情综合网| 色欧美88888久久久久久影院| 亚洲电影中文字幕在线观看| 日韩精品在线一区二区| 成人教育av在线| 天天操天天色综合| 国产情人综合久久777777| 色综合久久久久综合体桃花网| 亚洲va韩国va欧美va精品 |