zoukankan      html  css  js  c++  java
  • 三角形状的点阵模糊效果iOS源码

    源码FFAngularPointilism,FFAngularPointilism能够将UIImageView像添加滤波器一样生成三角形状的点阵模糊效果。可以通过动画方式来模糊,也可以立刻模糊。另外并提供改模糊方式的动画。动画可以配置模糊程度及闪烁间隔。
    效果图:
    • <ignore_js_op> 

    使用方法:


    将Demo中的FFAngularPointilism文件夹直接复制到项目当中,并且将Images.xcassets中的4个三角形图案也要复制到项目中。 

    图像模糊 
    初始化: 
    _imageView = [[FFDoubleTriangleView alloc] initWithImage:[UIImage imageNamed:@"ww"]]; 
        [self.view addSubview:self.imageView]; 

    通过动画方式: 
    [self.imageView startAnimatedEffect:FFDoubleTriangleViewEffectMosaicFilter 
            withCompletion:^ 
            { 
            //完成模糊 
            }]; 
    立刻模糊方式: 
    [self.imageView applyFilter]; 
    -------------------------------------------------------------------- 
    模糊动画: 
    self.shutteringView.coordinateSquaresToOmit = @[@[@0, @0]]; 
        _shutteringView = [[FFShutteringView alloc] initWithFrame:self.view.bounds]; 
        [self.containerShutteringView addSubview:_shutteringView]; 

    动画启动: 
    [self.shutteringView sparkLife]; 

    设置动画的各种属性: 
    -self.shutteringView.maximumAllowedDeathTicks = 1.0/(sender.value) * 400; 
    -self.shutteringView.frameRate = sender.value * 30; 

    具体内容请参考demo.

    详细说明:http://ios.662p.com/thread-2325-1-1.html

  • 相关阅读:
    lLinux 下 Stress 压力测试工具
    zabbix 微信告警配置
    spark Intellij IDEA开发环境搭建
    Spark调优与调试
    在centos 6.5 x64中安装 spark-1.5.1
    二叉树的各种遍历算法
    ServletResponse的一些知识点
    UVA 10303 How Many Trees? (catlan)
    UVA 10183 How Many Fibs?
    UVA 10471 Gift Exchanging
  • 原文地址:https://www.cnblogs.com/huasili/p/4181732.html
Copyright © 2011-2022 走看看