根据颜色生成对应的image
来源:互联网 发布:mac os x 10.6.8 编辑:程序博客网 时间:2024/04/30 21:08
+ (UIImage *)imageWithColor:(UIColor *)color
{
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 2.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
{
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 2.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
0 0
- 根据颜色生成对应的image
- Generative Adversarial Text to Image Synthesis --- 根据文字描述生成对应的图片
- 通知根据电量颜色闪烁对应的颜色
- iOS 颜色生成image
- 根据十六进制返回对应颜色
- 根据十六进制返回对应颜色
- 根据颜色生成图片
- 根据json生成对应属性
- 根据存有RGB值的一维数组生成Image
- 使用xmlbeans根据xsd文件生成对应的jar包
- 根据wsdl文件生成对应的服务端文件
- php根据路径生成对应的文件目录
- android 根据证书生成对应的签名文件
- xorm根据数据库表生成对应的结构体
- 根据指定颜色生成图片
- oc根据颜色生成图片
- log4J 根据日志级别生成对应文件
- php 根据字符串生成对应数组方法
- Splash 页面
- appkey 和 secret key & token
- 一种简单的直观的高效的权限设计
- 在Linux中增加swap空间
- make Image uImage与zImage的区别
- 根据颜色生成对应的image
- 读取等待 纯H5 JS
- play中@With注解的用法
- ExtJs6 Desktop Demo 修改测试
- 从开发者角度解析 Android N 新特性!
- 矩阵相乘优化算法实现讲解
- hadoop细节积累
- 关于malloc动态连接两个字符串
- 0019-前后台数据传递