//记录 贝塞尔曲线使用//根据一个矩形画曲线+ (UIBezierPath *)bezierPathWithRect:(CGRect)rect//根据矩形框的内切圆画曲线+ (UIBezierPath *)bezierPathWithOvalInRect:(CGRect)rect//根据矩形画带圆...
分类:
移动开发 时间:
2014-10-22 18:06:39
阅读次数:
168
OnWalkClick:function(sender){var sfLaoJun1=new cc.SpriteFrame(res.npc_laojun1,cc.rect(0,0,70,101));var sfLaoJun2=new cc.SpriteFrame(res.npc_laojun2,cc...
分类:
Web程序 时间:
2014-10-22 17:44:57
阅读次数:
159
前些天客户的ogg延迟到达8小时左右,于是我当时用logdump追踪了一下:
看进程状态:
send extsa staus
EXTRACT ZBDBA (PID 2269368)
Current status: Recovery complete: Processing data with empty data queue
Current read positio...
分类:
其他好文 时间:
2014-10-21 12:21:05
阅读次数:
250
UITextRange *range = textView.selectedTextRange;
//光标位置
CGRect rect = [textView
caretRectForPosition:range.start];
当UITextView的光标在最后位置连续输入4个或以上换行符号时,输出rect为 {{inf,inf},{0,0}}...
分类:
其他好文 时间:
2014-10-21 12:16:43
阅读次数:
298
var R: TRect;begin//Form1.Canvas.TextOut(20,20, '说明'); R:=Rect(20, 20, 120, 70); DrawText(Canvas.Handle, '说明', -1, R, DT_END_ELLIPSIS);end;//在...
通过路径我们可以实现更加复杂的图形的绘制,比如多边形,弧,圆角矩形等等- (void)drawRect:(CGRect)rect{ //获取图像上下文对象 CGContextRef context = UIGraphicsGetCurrentContext(); CGContext...
分类:
移动开发 时间:
2014-10-19 21:09:52
阅读次数:
220
IOS中可以通过CGContextShowTextAtPoint来绘制文字,但这个方法不支持中文字符,而且在ios7之后也不推荐使用我们可以通过NSString的drawAtPoint以及drawInRect实现更加简单的文字绘制- (void)drawRect:(CGRect)rect{ /...
分类:
移动开发 时间:
2014-10-19 15:38:33
阅读次数:
252
获取android屏幕上状态栏的高度方法网上很多这里不再敖述,只举一个例子Rect rect = new Rect();getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);rect.top便是状态栏的高度。但是在响应的布局文件中...
分类:
移动开发 时间:
2014-10-18 20:53:54
阅读次数:
185
函数原型:BOOL ClipCursor(CONST RECT * lpRect); 参数:IpRect:指向RECT结构的指针,该结构包含限制矩形区域左上角和右下角的屏幕坐标,如果该指针为NULL(空),则鼠标可以在屏幕的任何区域移动。void TitleBar::mouseMoveEvent(....
分类:
其他好文 时间:
2014-10-18 16:41:43
阅读次数:
255
1. 图形中常用的基本的类Point:(x,y)坐标确定的点。Size:由Height和Width确定高宽的大小类。Rect:矩形类,显然可以由一个Point和一个Size来确定。Color:由R、G、B、A确定的颜色类。Geometry和Shape都是定义空间区域的类,Shape拥有相关的画笔并可...
分类:
其他好文 时间:
2014-10-14 22:51:19
阅读次数:
183