使用imcrop函数时,如果rect为空(rect=[]),执行函数后会直接弹出显示的图像,所以在使用imcrop之前一定要检查rect是否为空,否则会不停的弹出图像。
分类:
其他好文 时间:
2014-05-26 14:43:46
阅读次数:
198
CGSize rect =
[info.contentsizeWithFont:self.contentLabel.fontconstrainedToSize:CGSizeMake(self.contentLabel.frame.size.width,
MAXFLOAT)]; self.cont.....
分类:
其他好文 时间:
2014-05-26 07:09:59
阅读次数:
217
将结构体包装成 NSValue ,并取出结构体1 NSRect rect = {0, 0,
200,200};2 NSValue *rectValue = [NSValue valueWithBytes:&rect
objCType:@encode(NSRect)];3 NS...
分类:
其他好文 时间:
2014-05-19 17:31:28
阅读次数:
246
package main import ("fmt")//对象定义type Rect
struct{x,y float64width ,height float64} //对象方法实现func (r *Rect)
Area()float64{return r.width*r.height}//Go语...
分类:
其他好文 时间:
2014-05-18 19:36:55
阅读次数:
405
基本图形的绘制 包括: 代码画线,画文字 图片 裁剪 重绘 简单动画
当自定义view的时候 系统会自动调用drawRect 方法
画线
- (void)drawRect:(CGRect)rect
{
// Drawing code
// 1.获得图形上下文
CGContextRef ctx = UIGraphicsGetCurrentContext();
...
分类:
移动开发 时间:
2014-05-14 21:20:24
阅读次数:
497
iOS 设置UILabel 的内边距-
(void)drawTextInRect:(CGRect)rect { UIEdgeInsets insets = {0, 5, 0, 5}; [super
drawTextInRect:UIEdgeInsetsInsetRect(rect, in...
分类:
移动开发 时间:
2014-05-14 10:12:21
阅读次数:
4319
玩魔兽和LOL时注意到即时游戏窗口最小化,鼠标仍限制在窗口内,这具体是怎么实现的呢?Msdn上有个例子Confining a Cursor:RECT
rcClip; // new area for ClipCursorRECT rcOldClip; // previ...
分类:
其他好文 时间:
2014-05-12 20:25:11
阅读次数:
431
1 前言构造和绘制路径,能够在图形环境上画任意形状.2
代码实例ZYViewControllerView.m[plain]view
plaincopy-(void)drawRect:(CGRect)rect{//创建路径创建一个新的CGMutablePathRef类型的可变路径并返回其句柄。CGMu...
分类:
其他好文 时间:
2014-05-12 10:02:22
阅读次数:
308
EditorGUI.ProgressBar 进度条static
functionProgressBar(position:Rect,value: float,text: string) :
voidParameters参数totalPositionRectangle on the screen to...
分类:
其他好文 时间:
2014-05-10 01:28:36
阅读次数:
440
- (void)drawRect:(CGRect)rect
{
[super drawRect:rect];
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(ctx, .3, .3, .3, .1);
CGContextFillRect(ctx, self.boun...
分类:
其他好文 时间:
2014-04-29 13:33:22
阅读次数:
284