• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxBufferedDC类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: basicDrawSelected

void ddAbstractFigure::basicDrawSelected(wxBufferedDC& context, ddDrawingView *view){
	ddRect copy = displayBox();
	view->CalcScrolledPosition(copy.x,copy.y,&copy.x,&copy.y);
	
	context.SetPen(*wxRED_PEN);
	context.SetBrush(wxBrush (wxColour(133, 133, 133),wxSOLID));
	context.DrawRectangle(copy);
}
开发者ID:xiul,项目名称:Database-Designer-for-pgAdmin,代码行数:8,代码来源:ddAbstractFigure.cpp


示例2: PaintTans

void TangramDlg::PaintTans(wxBufferedDC& dc){
    for(int i=0;i<TANS_NO;i++){
        if(tans[i] != NULL) {
            dc.SetPen(wxPen(wxColour(0,0,0), 3 ));
            dc.SetBrush(wxBrush(wxColour(255*i/8,50,25)));
            dc.DrawPolygon(tans[i]->GetSize(),tans[i]->GetPoints());
        }
    }     
}
开发者ID:reverant,项目名称:Tangram,代码行数:9,代码来源:TangramDlg.cpp


示例3: basicDraw

void hdAbstractFigure::basicDraw(wxBufferedDC &context, hdDrawingView *view)
{
	hdRect copy = displayBox().gethdRect(view->getIdx());
	view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);

	context.SetPen(*wxGREEN_PEN);
	context.SetBrush(wxBrush (wxColour(208, 208, 208), wxSOLID));
	context.DrawRectangle(copy);
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:9,代码来源:hdAbstractFigure.cpp


示例4: draw

void Hole::draw ( wxBufferedDC& dc ) {
	dc.SetBrush( wxBrush( *wxBLACK ) );
	#if NATIVEZOOMING
	double z = 1.0;
	#else
	double z = Billiard::zoom;
	#endif
	
	dc.DrawCircle( pos.x * z, pos.y * z, HOLE * z );
}
开发者ID:emmmile,项目名称:billiards,代码行数:10,代码来源:BilliardObject.cpp


示例5: draw

void hdButtonHandle::draw(wxBufferedDC &context, hdDrawingView *view)
{
	wxPoint copy = getDisplayBox(view->getIdx()).GetPosition();
	view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);
	if(buttonIcon.IsOk())
		context.DrawBitmap(buttonIcon, copy.x, copy.y, true);
}
开发者ID:AnnaSkawinska,项目名称:pgadmin3,代码行数:7,代码来源:hdButtonHandle.cpp


示例6: basicDraw

void ddColumnOptionIcon::basicDraw(wxBufferedDC &context, hdDrawingView *view)
{
	if(iconToDraw)
	{
		hdRect copy = displayBox().gethdRect(view->getIdx());
		view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);
		context.DrawBitmap(*iconToDraw, copy.GetPosition(), true);
	}
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:9,代码来源:ddColumnOptionIcon.cpp


示例7: basicDraw

void hdPolyLineFigure::basicDraw(wxBufferedDC &context, hdDrawingView *view)
{
	int posIdx = view->getIdx();
	if(points[posIdx]->count() < 2)
	{
		return;
	}
	hdPoint start, end;

	if(startTerminal)
	{
		startTerminal->setLinePen(linePen);
		start = startTerminal->draw(context, getStartPoint(posIdx), pointAt(posIdx, 1), view);
	}
	else
	{
		start = getStartPoint(posIdx);
	}

	if(endTerminal)
	{
		endTerminal->setLinePen(linePen);
		end = endTerminal->draw(context, getEndPoint(posIdx), pointAt(posIdx, pointCount(posIdx) - 2), view);
	}
	else
	{
		end = getEndPoint(posIdx);
	}

	context.SetPen(linePen);
	for(int i = 0; i < points[posIdx]->count() - 1; i++)
	{
		hdPoint *p1 = (hdPoint *) points[posIdx]->getItemAt(i);
		hdPoint *p2 = (hdPoint *) points[posIdx]->getItemAt(i + 1);

		hdPoint copyP1 = hdPoint (*p1);
		view->CalcScrolledPosition(copyP1.x, copyP1.y, &copyP1.x, &copyP1.y);
		hdPoint copyP2 = hdPoint (*p2);
		view->CalcScrolledPosition(copyP2.x, copyP2.y, &copyP2.x, &copyP2.y);

		context.DrawLine(copyP1, copyP2);
	}
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:43,代码来源:hdPolyLineFigure.cpp


示例8: draw

void ddPolyLineHandle::draw(wxBufferedDC& context, ddDrawingView *view)
{
    //DD-TODO: set graphic style
    ddRect copy = getDisplayBox();
    view->CalcScrolledPosition(copy.x,copy.y,&copy.x,&copy.y);

    double middle=copy.width/2;
    context.DrawCircle(
        wxPoint(copy.x+middle,copy.y+middle),
        wxCoord(middle)
    );
    //DD-TODO: improve this draw
}
开发者ID:xiul,项目名称:Database-Designer-for-pgAdmin,代码行数:13,代码来源:ddPolyLineHandle.cpp


示例9: draw

void ddScrollBarHandle::draw(wxBufferedDC &context, hdDrawingView *view)
{
	int idx = view->getIdx();
	context.SetBrush(*wxWHITE_BRUSH);
	wxPoint copy = getDisplayBox(idx).GetPosition();
	view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);
	context.DrawRectangle(copy.x, copy.y, getDisplayBox(idx).width, getDisplayBox(idx).height);
	context.DrawBitmap(upBitmap, copy.x + 1, copy.y + 2, true);
	context.DrawBitmap(downBitmap, copy.x + 1, copy.y + getDisplayBox(idx).height - 2 - downBitmap.GetHeight(), true);

	barSize.SetHeight((getDisplayBox(idx).height - 12) * 0.45);
	barSize.SetWidth(getDisplayBox(idx).width - 4);

	int divBy = (table->getTotalColumns() - table->getColumnsWindow());
	if(divBy <= 0)
		divBy = table->getColumnsWindow();
	int colOffset = barSize.GetHeight() / divBy;
	int verticalPosBar = 3 + copy.y + downBitmap.GetHeight() + colOffset * table->getTopColWindowIndex();
	if(table->getColumnsWindow() > 1)
		context.DrawRectangle(wxPoint(copy.x + 2, verticalPosBar), barSize);

}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:22,代码来源:ddScrollBarHandle.cpp


示例10: draw

void hdPolyLineHandle::draw(wxBufferedDC &context, hdDrawingView *view)
{
	//A Handle at polyline figure without a respetive flexibility point at line
	//Hack to allow handles of polylines reuse between different versions of same line.
	if(getOwner() && indx < (((hdPolyLineFigure *) getOwner())->countPointsAt(view->getIdx()) - 1) ) //indx 0 is first, count first is 1
	{
		hdRect copy = getDisplayBox(view->getIdx());
		view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);

		/* Uncomment this for testing purposes of handles in a polyline figure
		wxString pos = wxString::Format(_("%d"),indx);
		double middle2 = copy.width / 2;
		context.DrawText(pos,copy.x + middle2+3, copy.y + middle2);
		*/

		double middle = copy.width / 2;
		context.DrawCircle(
		    wxPoint(copy.x + middle, copy.y + middle),
		    wxCoord(middle)
		);
	}
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:22,代码来源:hdPolyLineHandle.cpp


示例11: drawSelected

void ddIFigure::drawSelected (wxBufferedDC& context, ddDrawingView *view){
	context.SetPen(defaultSelectedPen);
	context.SetBrush(defaultSelectedBrush);
}
开发者ID:xiul,项目名称:Database-Designer-for-pgAdmin,代码行数:4,代码来源:ddIFigure.cpp


示例12: basicDrawSelected

void hdSimpleTextFigure::basicDrawSelected(wxBufferedDC &context, hdDrawingView *view)
{
	hdRect copy = displayBox().gethdRect(view->getIdx());
	view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);
	context.DrawText(getText(true), copy.GetPosition());
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:6,代码来源:hdSimpleTextFigure.cpp


示例13: basicDraw

void ddRectangleFigure::basicDraw(wxBufferedDC& context, ddDrawingView *view)
{
	ddRect copy = displayBox();
	view->CalcScrolledPosition(copy.x,copy.y,&copy.x,&copy.y);
	context.DrawRectangle(copy);
}
开发者ID:xiul,项目名称:Database-Designer-for-pgAdmin,代码行数:6,代码来源:ddRectangleFigure.cpp


示例14: apply

void hdFontAttribute::apply(wxBufferedDC &context)
{
	context.SetFont(fontAttributes);
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:4,代码来源:hdFontAttribute.cpp


示例15: apply

void hdLineAttribute::apply(wxBufferedDC &context)
{
	context.SetPen(penAttributes);
}
开发者ID:mintsoft,项目名称:pgadmin3,代码行数:4,代码来源:hdLineAttribute.cpp


示例16: basicDraw

void ddBitmapFigure::basicDraw(wxBufferedDC& context, ddDrawingView *view)
{
	ddRect copy = displayBox();
	view->CalcScrolledPosition(copy.x,copy.y,&copy.x,&copy.y);
	context.DrawBitmap(imageToDraw,copy.GetPosition(),true);
}
开发者ID:xiul,项目名称:Database-Designer-for-pgAdmin,代码行数:6,代码来源:ddBitmapFigure.cpp


示例17: basicDrawSelected

void hdRectangleFigure::basicDrawSelected(wxBufferedDC &context, hdDrawingView *view)
{
	hdRect copy = displayBox().gethdRect(view->getIdx());
	view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);
	context.DrawRectangle(copy);
}
开发者ID:SokilV,项目名称:pgadmin3,代码行数:6,代码来源:hdRectangleFigure.cpp


示例18: apply

void hdFillAttribute::apply(wxBufferedDC &context)
{
	context.SetBrush(fillAttributes);
}
开发者ID:kleopatra999,项目名称:pgadmin3,代码行数:4,代码来源:hdFillAttribute.cpp


示例19: apply

void hdFontColorAttribute::apply(wxBufferedDC &context)
{
	context.SetTextForeground(fontColor);
}
开发者ID:mintsoft,项目名称:pgadmin3,代码行数:4,代码来源:hdFontColorAttribute.cpp



注:本文中的wxBufferedDC类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxButton类代码示例发布时间:2022-05-31
下一篇:
C++ wxBrush类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap