zoukankan      html  css  js  c++  java
  • 几行代码,和几行代码,

    CGRect rect=CGRectMake(_xstep*j, _ystep*i, _xstep, _ystep);

    CGImageRef imageRef=CGImageCreateWithImageInRect([image CGImage],rect);

    UIImage* elementImage=[UIImage imageWithCGImage:imageRef];

    UIImageView*_imageView=[[UIImageView alloc] initWithImage:elementImage];

    _imageView.frame=rect;

     

     UIGraphicsBeginImageContext(CGSizeMake(self.targetSize.width*scale, self.targetSize.height*scale));

      [self.sourceImage drawInRect:CGRectMake(-startX*scale, -startY*scale, imageViewSize.width*scale, imageViewSize.height*scale)];

      UIImage* image = UIGraphicsGetImageFromCurrentImageContext();

     

  • 相关阅读:
    常见模块和包
    二分查找算法
    常见内置函数
    Django总目录
    nginx配置站点
    Arduino语言
    Python连接Arduino的方法
    机器人学习
    Redis
    arduino总目录
  • 原文地址:https://www.cnblogs.com/guligei/p/3656189.html
Copyright © 2011-2022 走看看