Package 

Class VignetteFilter

  • All Implemented Interfaces:
    com.otaliastudios.cameraview.filter.Filter , com.otaliastudios.cameraview.filter.OneParameterFilter , com.otaliastudios.cameraview.filter.TwoParameterFilter

    
    public class VignetteFilter
    extends BaseFilter implements TwoParameterFilter
                        

    Applies a vignette effect to input frames.

    • Constructor Summary

      Constructors 
      Constructor Description
      VignetteFilter()
    • Method Summary

      Modifier and Type Method Description
      void setSize(int width, int height) Called anytime the output size changes.
      void setVignetteScale(float scale) Sets the vignette effect scale (0.0 - 1.0).
      void setVignetteShade(float shade) Sets the vignette effect shade (0.0 - 1.0).
      float getVignetteScale() Gets the current vignette scale.
      float getVignetteShade() Gets the current vignette shade.
      void setParameter1(float value) Sets the parameter.The value should always be between 0 and 1.
      float getParameter1() Returns the parameter.The returned value should always be between 0 and 1.
      void setParameter2(float value) Sets the second parameter.The value should always be between 0 and 1.
      float getParameter2() Returns the second parameter.The returned value should always be between 0 and 1.
      String getFragmentShader() Returns a String containing the fragment shader.
      void onCreate(int programHandle) The filter program was just created.
      void onDestroy() The filter program is about to be destroyed.
      • Methods inherited from class com.otaliastudios.cameraview.filter.BaseFilter

        copy, draw, getVertexShader
      • Methods inherited from class com.otaliastudios.cameraview.filter.Filter

        copy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VignetteFilter

        VignetteFilter()
    • Method Detail

      • setSize

         void setSize(int width, int height)

        Called anytime the output size changes.

        Parameters:
        width - width
        height - height
      • setVignetteScale

         void setVignetteScale(float scale)

        Sets the vignette effect scale (0.0 - 1.0).

        Parameters:
        scale - new scale
      • setVignetteShade

         void setVignetteShade(float shade)

        Sets the vignette effect shade (0.0 - 1.0).

        Parameters:
        shade - new shade
      • setParameter1

         void setParameter1(float value)

        Sets the parameter.The value should always be between 0 and 1.

        Parameters:
        value - parameter
      • getParameter1

         float getParameter1()

        Returns the parameter.The returned value should always be between 0 and 1.

      • setParameter2

         void setParameter2(float value)

        Sets the second parameter.The value should always be between 0 and 1.

        Parameters:
        value - parameter
      • getParameter2

         float getParameter2()

        Returns the second parameter.The returned value should always be between 0 and 1.

      • onCreate

         void onCreate(int programHandle)

        The filter program was just created. We pass in a handle to the OpenGLprogram that was created, so you can fetch pointers.

        Parameters:
        programHandle - handle
      • onDestroy

         void onDestroy()

        The filter program is about to be destroyed.