Skia之四——SkGradientShader篇
摘要:SkGradientShader1. SkGradientShader::CreateLinear?/** Returns a shader that generates a linear gradient between the twospecified points.<p />CreateLinear returns a shader with a reference count of 1.The caller should decrement the shader's reference count when done with the shader.It is an
阅读全文
posted @
2012-05-31 16:29
人间奇迹
阅读(1919)
推荐(0) 编辑
Skia之二 —— SkPaint 篇
摘要:SkPaint ?/** \class SkPaintThe SkPaint class holds the style and color information about how to drawgeometries, text and bitmaps.*/ SkPaint 保存绘制 几何形状、文本、位图 的风格和颜色信息。skia的 jni接口 http://blog.csdn.net/fangyuanseu/article/details/6619561?setAntiAlias: 设置画笔的锯齿效果。 setColor: 设置画笔颜色 setARGB: 设置画笔的a,r,p,g值。.
阅读全文
posted @
2012-05-31 13:48
人间奇迹
阅读(6396)
推荐(0) 编辑
最快速度找到内存泄漏
摘要:内存管理是C++程序员的痛。我的《内存管理变革》系列就是试图讨论更为有效的内存管理方式,以杜绝(或减少)内存泄漏,减轻C++程序员的负担。1. 确认是否存在内存泄漏 MFC程序如果检测到存在内存泄漏,退出程序的时候会在调试窗口提醒内存泄漏。例如:classCMyApp:publicCWinApp{public:BOOLInitApplication(){int*leak=newint[10];returnTRUE;}}; 产生的内存泄漏报告大体如下:Detectedmemoryleaks!Dumpingobjects->c:/work/test.cpp(186):{52}normalbl
阅读全文
posted @
2012-05-09 10:48
人间奇迹
阅读(486)
推荐(0) 编辑