您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Ellipse函数代码示例

51自学网 2021-06-01 20:37:07
  C++
这篇教程C++ Ellipse函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中Ellipse函数的典型用法代码示例。如果您正苦于以下问题:C++ Ellipse函数的具体用法?C++ Ellipse怎么用?C++ Ellipse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了Ellipse函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CreateHatchBrush

void quadrupedClass::Draw(HDC hdc)const{		/*//DEBUGGING CODE: draw the redraw box. 	//note: the box is not erased due to how this works (drawing what it would be the previous frame...), 	//but it's a decent indicator of where the erasing will happen, to be sure it works properly	HBRUSH brushRed = CreateHatchBrush(HS_DIAGCROSS, RGB(255, 0, 0));	FillRect(hdc, &RedrawArea(true), brushRed);	//END debugging*/	HPEN penFront = CreatePen(PS_SOLID, 2, RGB(0, 0, 255));	HPEN penBack = CreatePen(PS_SOLID, 2, RGB(255, 0, 0));//different colors for the legs	HPEN pen = CreatePen(PS_SOLID, 2, RGB(0, 0, 0));//basic pen is black	HPEN oldPen = (HPEN)SelectObject(hdc, pen);//store the original pen	//head	Ellipse(hdc, Head.left, Head.top, Head.right, Head.bottom);	//back	DrawLine(hdc, Back.Start, Back.End);	//legs		//back	SelectObject(hdc, penBack);//change the pen	DrawLine(hdc, LegBB.Start, LegBB.End);	DrawLine(hdc, LegFB.Start, LegFB.End);		//front	SelectObject(hdc, penFront);//change the pen	DrawLine(hdc, LegFF.Start, LegFF.End);	DrawLine(hdc, LegBF.Start, LegBF.End);	//reset hdc	SelectObject(hdc, oldPen);	DeleteObject(pen);	DeleteObject(penFront);	DeleteObject(penBack);}
开发者ID:ZacTheHac,项目名称:SchoolWork,代码行数:37,


示例2: Ellipse

heavysideFunction::value_typeheavysideFunction::operator()( node_type const& pointHat ) const{    node_type Ellipse( pbeqspace_type::Dim );    node_type point( pbeqspace_type::Dim );    point = element_prod( *M_stretch,pointHat ) + ( *M_translation );    molecule_type::atoms_const_iterator_type atom( M_molecule->begin() );    for ( ; atom != M_molecule->end(); ++atom )    {        Ellipse =  point  - atom->center();        //if ( norm_inf(Ellipse) >  atom->radius() ) continue;        if  ( norm_2( Ellipse ) < atom->radius2() )        {            return 0;        }    }    return 1;}
开发者ID:TrojanXu,项目名称:feelpp,代码行数:24,


示例3: WindowProcedure

//.........这里部分代码省略.........        case VK_DOWN:            if(resizeCount>10) break;            for(int i=0; i<figureCount; i++) {                for(int j=0; j<4; j++) {                    slope=(arrayPoints[i][j].y-(rect.bottom-126)/2)/(float)(arrayPoints[i][j].x-rect.right/2);                    displacement=arrayPoints[i][j].y-slope*arrayPoints[i][j].x;                    arrayPoints[i][j].x=(rect.right/2)-(rect.right/2-arrayPoints[i][j].x)*0.9;                    arrayPoints[i][j].y=roundf(arrayPoints[i][j].x*slope+displacement);                }            }            resizeCount++;            break;        }        InvalidateRect(hwnd,&invalidationRect,TRUE);        break;    case WM_PAINT:        hdc=BeginPaint(hwnd,&ps);        GetClientRect(hwnd,&rect);        //Create figures        SelectObject(hdc,GetStockObject(NULL_BRUSH));        for (int i=0; i<figureCount; i++) {            switch(arrayPoints[i][4].x) {            case ID_SWITCH_SQUARE:                Rectangle(hdc,arrayPoints[i][0].x,arrayPoints[i][0].y,arrayPoints[i][1].x,arrayPoints[i][1].y);                break;            case ID_SWITCH_CIRCLE:                Ellipse(hdc,arrayPoints[i][0].x,arrayPoints[i][0].y,arrayPoints[i][1].x,arrayPoints[i][1].y);                break;            case ID_SWITCH_BEZIER:                PolyBezier(hdc,arrayPoints[i],4);                break;            }        }        //Create traces        if (mouse_moving) {            if (drawing_circle) {                Ellipse(hdc,arrayPoints[figureCount][0].x,arrayPoints[figureCount][0].y,xFin,yFin);            }            if (drawing_bezier && !first_point) {                MoveToEx(hdc,arrayPoints[figureCount][0].x,arrayPoints[figureCount][0].y,NULL);                LineTo(hdc,xFin,yFin);            } else if (drawing_bezier) {                MoveToEx(hdc,arrayPoints[figureCount][0].x,arrayPoints[figureCount][0].y,NULL);                LineTo(hdc,xFin,yFin);                MoveToEx(hdc,arrayPoints[figureCount][2].x,arrayPoints[figureCount][2].y,NULL);                LineTo(hdc,xFinSecond,yFinSecond);            }            if (drawing_square) {                Rectangle(hdc,arrayPoints[figureCount][0].x,arrayPoints[figureCount][0].y,xFin,yFin);            }        }        SelectObject(hdc,GetStockObject(WHITE_BRUSH));        //Create the gradients
开发者ID:Caraganciu,项目名称:WP-FAF-111-Rezantev-Gheorghe,代码行数:67,


示例4: ellipse

void ellipse(int left,int top,int right, int bottom){	ACL_ASSERT_BEGIN_PAINT;	Ellipse(g_hmemdc,left,top,right,bottom);}
开发者ID:Gnnng,项目名称:LaserTank,代码行数:5,


示例5: DrawPoint

static void DrawPoint(void *data, long x, long y){  Ellipse((HDC)data,x-1,y-1,x+1,y+1);}
开发者ID:jpflori,项目名称:pari,代码行数:4,


示例6: WndProc

万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。