zoukankan      html  css  js  c++  java
  • CGContext ----生成图片--image

    //获取图片

     

    + (UIImage*) getImageWithColor:(UIColor*)color andHeight:(CGFloat)height

    {

      CGRect r= CGRectMake(0.0f, 0.0f, 1.0f, height);

      UIGraphicsBeginImageContext(r.size);

      CGContextRef context = UIGraphicsGetCurrentContext();

      

      CGContextSetFillColorWithColor(context, [color CGColor]);

      CGContextFillRect(context, r);

      

      UIImage *img = UIGraphicsGetImageFromCurrentImageContext();

      UIGraphicsEndImageContext();

      return img;

    }

  • 相关阅读:
    laravel blog 一
    dede:channelartlist currentstyle高亮显示
    dede调用导航/幻灯
    rmp 安装LNMP环境
    无极分类之子孙树、父辈树
    创始人 密码
    mysql报错显示法文解决办法
    渐变色背景
    laravel sendmail
    工作流系统webservice服务
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6677812.html
Copyright © 2011-2022 走看看