图片中心透明

作者: 远方的飞鸟 | 来源:发表于2017-03-16 12:38 被阅读71次

_imaegView= [[UIImageViewalloc]initWithFrame:[UIScreenmainScreen].bounds];

self.imaegView.image= [selfgetImage];

self.imaegView.alpha=0.5;

[self.viewaddSubview:self.imaegView];

- (UIImage*)getImage {

UIImage*images = [UIImageimageNamed:@"图片"];

UIGraphicsBeginImageContextWithOptions([UIScreenmainScreen].bounds.size,NO,1);

CGContextRefref =UIGraphicsGetCurrentContext();

[imagesdrawInRect:[UIScreenmainScreen].bounds];

CGContextAddEllipseInRect(ref,CGRectMake(50,100,200,200));

CGContextSetBlendMode(ref,kCGBlendModeClear);

CGContextFillPath(ref);

UIImage*image =UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

returnimage;

}

相关文章

  • 图片中心透明

    _imaegView= [[UIImageViewalloc]initWithFrame:[UIScreenmai...

  • 2018-12-08设置图片透明

    1. 图片不需要的部分改透明 图片导入到excel 图片--格式--透明--选取透明区域--导出图片 2. veg...

  • iOS常用代码

    1.设置图片透明 //图片透明 - (UIImage *)imageWithColor:(UIColor *)co...

  • 图片引入标签 img

    常见图片格式说明.png 静态图片,支持透明.jpg/jpeg 静态图片,不支持透明.g...

  • 2019-07-05

    去中心化不是目的,公开透明不可篡改才是。 去中心化是方法,用去中心化的方法去达到公开透明不可篡改。

  • 图片像素操作

    将白底图片转化为透明底图片

  • 微信小程序:背景图片透明处理(采用CSS/wxss)

    图片透明可以用 opacity 例如: 其中0.5是图片透明度 如果是背景图片呢?推荐使用 linear-grad...

  • iOS11人机交互指南-视图-05:图片视图 Image Vie

    图片视图在透明或不透明背景上显示单个图片或图片序列。在图片视图中,图片可以被拉伸、缩放或固定到特定位置。默认情况下...

  • axure中心放大图片与改变遮罩透明度

    效果预览: 分析过程: 鼠标指针进入图片时,放大图片并且遮罩变为完全透明; 鼠标指针离开图片时,图片恢复原有尺寸并...

  • 蒙版

    ⒈先调整不透明度 Ctrl t 旋转以及调整图片使图片对齐 再讲透明度调回(shift 等比例放大缩小图片) ⒉左...

网友评论

    本文标题:图片中心透明

    本文链接:https://www.haomeiwen.com/subject/qcjrhttx.html