Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在父UIImage上方创建空心UIImage覆盖_Ios_Objective C_Image Processing_Uiimage_Overlay - Fatal编程技术网

Ios 在父UIImage上方创建空心UIImage覆盖

Ios 在父UIImage上方创建空心UIImage覆盖,ios,objective-c,image-processing,uiimage,overlay,Ios,Objective C,Image Processing,Uiimage,Overlay,我有以下代码在另一个UIImage层上创建一个UIImage层 顶层充当主层上某些对象的高亮显示 CIImage *overlay1 = [CIImage imageWithColor:[CIColor colorWithRed:1 green:0 blue:0 alpha:1.00f]]; overlay1 = [overlay1 imageByCroppingToRect:image.extent]; overlay1 = [overlay1 imageByApplyingFil

我有以下代码在另一个UIImage层上创建一个UIImage层
顶层充当主层上某些对象的高亮显示

CIImage *overlay1 = [CIImage imageWithColor:[CIColor colorWithRed:1 green:0 blue:0 alpha:1.00f]];
   overlay1 = [overlay1 imageByCroppingToRect:image.extent];
   overlay1 = [overlay1 imageByApplyingFilter:@"CIPerspectiveTransformWithExtent" withInputParameters:@{@"inputExtent":[CIVector vectorWithCGRect:image.extent],@"inputTopLeft":[CIVector vectorWithCGPoint:CGPointMake(topLeft.x - 5, topLeft.y + 5)],@"inputBottomRight":[CIVector vectorWithCGPoint:CGPointMake(bottomRight.x + 5, bottomRight.y)] }];
   image = [overlay1 imageByCompositingOverImage:image];

其中,image是我的主层,overla1是次层。目前,第二层是一个充满红色的矩形荧光灯

这四个位置一直在变化,我每次都会重新绘制这个覆盖图

我想让它只是边框,而不是填充的覆盖层

我请求解决方案的过程与之前相同,因为我对iOS完全陌生,无法处理更多的更改

永远感谢帮助者