当前位置: 首页>>代码示例>>C++>>正文


C++ Draw::Clipoff方法代码示例

本文整理汇总了C++中Draw::Clipoff方法的典型用法代码示例。如果您正苦于以下问题:C++ Draw::Clipoff方法的具体用法?C++ Draw::Clipoff怎么用?C++ Draw::Clipoff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Draw的用法示例。


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

示例1: Paint

void  RichTextView::Paint(Draw& w)
{
	Size sz = GetSize();
	w.DrawRect(sz, background);
	sz.cx -= margin.left + margin.right;
	sz.cy -= margin.top + margin.bottom;
	w.Clipoff(margin.left, margin.top, sz.cx, sz.cy);
	PaintInfo pi;
	if(!hldec)
		pi.hyperlink = Null;
	if(sell < selh) {
		pi.sell = sell;
		pi.selh = selh;
	}
	pi.indexentry = Null;
	pi.highlightpara = highlight;
	pi.zoom = GetZoom();
	int q = sb * pi.zoom;
	scroller.Set(q);
	w.Offset(0, -q);
	SimplePageDraw pw(w);
	pi.top = PageY(0, sb);
	pi.bottom = PageY(0, sb + sz.cy / pi.zoom);
	pi.usecache = true;
	pi.sizetracking = sizetracking;
	pi.shrink_oversized_objects = shrink_oversized_objects;
	Color c = SColorPaper();
	if(Grayscale(c) < 100)
		pi.coloroverride = true;
	text.Paint(pw, GetPage(), pi);
	w.End();
	w.End();
}
开发者ID:pedia,项目名称:raidget,代码行数:33,代码来源:RichTextView.cpp

示例2: Paint

void Picture::Paint(Draw& w) {
	Size sz = GetSize();
	w.DrawRect(0, 0, sz.cx, sz.cy, background);
	if(!picture) return;
	int dx = 0;
	int dy = 0;
	Size rz = sz;
	if(ratio) {
		Size sr = picture.GetSize();
		if(sr.cy * sz.cx < sz.cy * sr.cx) {
			if(sr.cx) {
				rz.cy = sr.cy * sz.cx / sr.cx;
				dy = (sz.cy - rz.cy) / 2;
			}
		}
		else {
			if(sr.cy) {
				rz.cx = sr.cx * sz.cy / sr.cy;
				dx = (sz.cx - rz.cx) / 2;
			}
		}
	}
	w.Clipoff(dx, dy, rz.cx, rz.cy);
	w.DrawDrawing(0, 0, rz.cx, rz.cy, picture);
	w.End();
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:26,代码来源:Static.cpp

示例3: Paint

void QTFDisplayCls::Paint(Draw& draw, const Rect& r, const Value& v, Color ink, Color paper, dword style) const
{
	String s;
	s << "[@(" << ink.GetR() << "." << ink.GetG() << "." << ink.GetB() << ") " << v;
	RichText rtext = ParseQTF(s);
	rtext.ApplyZoom(GetRichTextStdScreenZoom());
	draw.DrawRect(r, paper);
	draw.Clipoff(r);
	rtext.Paint(Zoom(1, 1), draw, 0, 0, r.Width());
	draw.End();
}
开发者ID:pedia,项目名称:raidget,代码行数:11,代码来源:Util.cpp

示例4: DrawFocus

void DrawFocus(Draw& w, int x, int y, int cx, int cy, Color c) {
	w.Clipoff(x, y, cx, cy);
	for(int a = 0; a < cx; a += CtrlImg::focus_h().GetWidth()) {
		w.DrawImage(a, 0, CtrlImg::focus_h(), c);
		w.DrawImage(a, cy - 1, CtrlImg::focus_h(), c);
	}
	for(int a = 0; a < cy; a += CtrlImg::focus_v().GetHeight()) {
		w.DrawImage(0, a, CtrlImg::focus_v(), c);
		w.DrawImage(cx - 1, a, CtrlImg::focus_v(), c);
	}
	w.End();
}
开发者ID:pedia,项目名称:raidget,代码行数:12,代码来源:LabelBase.cpp

示例5: Paint

 virtual void Paint(Draw& w) {
     w.DrawRect(GetSize(), White());
     DoPainting(w);
     w.Offset(30, 50);
     DoPainting(w);
     w.End();
     w.Offset(20, 100);
     w.Clip(5, 5, 40, 20);
     DoPainting(w);
     w.End();
     w.End();
     w.Clipoff(10, 150, 60, 20);
     DoPainting(w);
     w.End();
 }
开发者ID:kolyden,项目名称:mirror,代码行数:15,代码来源:main.cpp

示例6: Paint

	virtual void Paint(Draw& w)
	{
		Size sz = GetSize();
		w.DrawRect(sz, LtGray);
		w.DrawRect(sz / 2, LtBlue);
		w.DrawText(10, 10, "Hello", Arial(12));
		w.DrawImage(50, 50, CtrlImg::exclamation());
		w.DrawImage(100, 50, CtrlImg::exclamation(), Blue);
		w.DrawImage(50, 150, CtrlsImg::O1h());
		w.DrawImage(150, 150, CtrlsImg::O1h());
		w.Clipoff(50, 180, 40, 40);
		w.DrawImage(0, 0, 50, 50, CtrlsImg::O1h());
		w.End();
		w.DrawImage(100, 100, ball);
		w.DrawImage(200, 200, 40, 40, ball);
	}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:16,代码来源:wince.cpp


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