Fork me on GitHub
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 125 下一页

2012年4月27日

摘要: http://blog.csdn.net/flyhawk007j2me/article/details/6830354RTP(Real-time transport Protocol)用于在网路上多媒体数据流的传输协议做流媒体传输方面的应用一般都会用基于RTP的JRTPLIB库等;ORTP是一个支持RTP以及RFC3550协议的库,使用C语言编写,可用于Windows、Linux以及类Unix平台且支持单线程的多个RTP回话,支持自适应抖动处理。//========================================================================= 阅读全文
posted @ 2012-04-27 20:31 pengyingh 阅读(1349) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/flyhawk007j2me/article/details/6829238最近才发现可以用ptype来获取到结构体的结构信息,进而取得变量的值还可以在调试过程中调用函数来获取你想要的输出。#include<stdio.h>[cpp]view plaincopytypedefstructtagvec{intsize;charname[1];}vec;int debug_cat(vec *v){ printf("vector size:%d \n vector:%s \n",v->size,v->name);f 阅读全文
posted @ 2012-04-27 20:27 pengyingh 阅读(4351) 评论(0) 推荐(0)
摘要: 动画分隐式动画和显式动画CAAnimatione采用了CAMediaTiming协议,可以调整时间,包括持续时间,速度,重复次数;采用了CAAction协议,可以通过响应动作的方式来显示动画.CAAnimation的一些派生类:CATransition 提供渐变效果:(推拉push效果,消退fade效果,揭开reveal效果)CAAnimationGroup 允许多个动画同时播放CABasicAnimation 提供了对单一动画的实现CAKeyframeAnimation 关键桢动画,可以定义行动路线CAConstraint 约束类,在布局管理器类中用它来设置属性CAConstraintLay 阅读全文
posted @ 2012-04-27 20:21 pengyingh 阅读(13310) 评论(0) 推荐(0)
摘要: ask:I have an UIView which I want to give a gradient background and I'm wondering how to implement that as efficient as possible.I am considering three options:Create an UIImageView as subview and give it an image of the gradient to display.Draw the gradient image in drawRect: of the original UI 阅读全文
posted @ 2012-04-27 15:47 pengyingh 阅读(256) 评论(0) 推荐(0)

2012年4月26日

摘要: I have a UIView that I am trying to render into a UIImage using [CALayer renderInContext:]. However, I find that the resultant image is flipped vertically. I kind of expect this due to the different coordinate systems. However, I then try and flip the context back to normal with an affine transform 阅读全文
posted @ 2012-04-26 14:55 pengyingh 阅读(460) 评论(0) 推荐(0)
摘要: http://www.cocoachina.com/bbs/simple/?t73051.htmlCGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();CGContextRef context = CGBitmapContextCreate(NULL,pageSize.width,/* size_t width */pageSize.height, /* size_t height */8,/* bits per component 32/4 */pageSize.width * 4,/* bytes per row 每行字节数, 阅读全文
posted @ 2012-04-26 14:50 pengyingh 阅读(3890) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/delonchen/archive/2011/08/03/iostransform.html1.坐标变换的数学基础1.1坐标系数学中我们使用的是笛卡儿坐标系,如下图所示: X轴正方向向右,Y轴正方向向上,原点O,坐标点A(x,y)。1.2仿射变换已知坐标点A,变换后新坐标系中坐标为B ,则有:B = AM A为1*3的矩阵[x,y,1]B为1* 3的矩阵[x’,y’,1]M为3*3仿射矩阵 所以AM=B可以写成: 展开后得到: 以... 阅读全文
posted @ 2012-04-26 08:56 pengyingh 阅读(210) 评论(0) 推荐(0)

2012年4月25日

摘要: http://www.cnblogs.com/delonchen/archive/2011/06/12/CGContextDrawImage.html这个函数绘制图片,但坐标系统原点在左上角,y方向向下的(坐标系A),但在Quartz中坐标系原点在左下角,y方向向上的(坐标系B)。图片绘制也是颠倒的。要达到预想的效果必须变换坐标系,代码如下:void drawImage(CGContextRef context, CGImageRef image , CGRect rect){ CGContextSaveGState(context); CGContextTranslateCTM(co... 阅读全文
posted @ 2012-04-25 19:52 pengyingh 阅读(3377) 评论(0) 推荐(0)
摘要: http://stackoverflow.com/questions/1344767/how-to-draw-a-shape-on-top-of-a-uiimage-while-respecting-the-images-alpha-maskI need a UIImageView that can draw itself in color or b/w according to a flag: BOOL isGrey;I'm trying to do it by drawing a black rectangle on top of the original image with t 阅读全文
posted @ 2012-04-25 18:24 pengyingh 阅读(1190) 评论(0) 推荐(0)
摘要: NSNumberFormatter *formatter=[[NSNumberFormatter alloc]init]; [formatter setGroupingSeparator:@","]; [formatter setGroupingSize:3]; [formatter setUsesGroupingSeparator:YES]; NSNumber *num= [NSNumber numberWithInt:144343]; NSString *str = [formatter stringFromNumber:num]; 结果:144,343 阅读全文
posted @ 2012-04-25 15:37 pengyingh 阅读(826) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 125 下一页

导航