在头文件中添加一个CImage m_image;然后在CPP中的OnInitDialog()函数中加载图片: img.Load(_T("res/xxxx.png")); //wuziqi.png是我要加载的图片名称,包含路径然后在OnPaint()函数中添加:CRect rect;GetCli...
分类:
其他好文 时间:
2014-09-02 12:11:04
阅读次数:
244
UI
系统允许您快速、
直观地创建用户界面(Ui)。这是Unity的新
UI 系统的主要功能介绍。
一、UI Overview
概要
在这篇概述中,我们就去通过 UI
系统的基础知识。我们将开始介绍Canvas(画布)并将所有
UI 元素都放在里面,和使用Rect Tool和
Rect Transform进行UI元素排版。然后我们来看看视...
分类:
其他好文 时间:
2014-08-30 08:47:09
阅读次数:
278
GetDlgItem(控件ID)->GetWindowRect(&rect);//获取控件的屏幕坐标ScreenToClient(&rect);//转换为对话框上的客户坐标
分类:
其他好文 时间:
2014-08-29 12:46:37
阅读次数:
210
viewport表示的是svg可视区大小,具体体现就是svg元素的width和height属性值所圈起来的区域: <svg?width="400"?height="300"?style="border:1px?solid?#cd0000;">
????<rect?x="10"?y="5"?width="20...
分类:
其他好文 时间:
2014-08-28 17:05:01
阅读次数:
278
publicvoid getHitRect(Rect outRect) Added in API level 1 Hit rectangle in parent's coordinates:找到控件占据的矩形区域的矩形坐标ParametersoutRect: The hit recta...
分类:
其他好文 时间:
2014-08-27 20:22:18
阅读次数:
190
CWnd.GetWindowRect参照坐标系:屏幕坐标系,原点为屏幕左上角(0,0)的位置功能:取得调用窗口CWnd在屏幕坐标系下的RECT坐标CWnd.GetClientRect参照坐标系:CWnd窗口的客户区坐标系,原点为客户区左上角(0,0)的位置功能:取得窗口在自己的客户区(不包括非客户区...
//创建一个画布
var paper = new Raphael("paper", 500, 500);
//画圆
paper.circle(50, 50, 50);
//画圆角方形
paper.rect(90, 90, 50, 50, 10);
这样一个简单的案例就完成了。
简要说明:
new R...
分类:
Web程序 时间:
2014-08-25 17:06:44
阅读次数:
211
/**1.画矩形: UIRectFill2.内存管理*/- (void)drawRect:(CGRect)rect{ CGContextRef ctx = UIGraphicsGetCurrentContext(); CGMutablePathRef path = CGPathCreateMutab...
分类:
其他好文 时间:
2014-08-23 16:43:41
阅读次数:
260
function Shape(type){ this.type = type || "rect"; this.calc = function(){ return "calc, "+this.type; }}var triangle = new Shape("trian...
分类:
其他好文 时间:
2014-08-21 13:04:04
阅读次数:
215
function circleIntersectRect(circle_pt, radius, rect)
local cx = nil
local cy = nil
-- Find the point on the collision box closest to the center of the circle
if circle_pt.x...
分类:
其他好文 时间:
2014-08-20 16:22:42
阅读次数:
213