# Print output for @column tags ?>
  public
  
  final
  
  class
  RenderEffect
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.graphics.RenderEffect | 
Intermediate rendering step used to render drawing commands with a corresponding
 visual effect. A RenderEffect can be configured on a RenderNode through
 RenderNode#setRenderEffect(RenderEffect) and will be applied when drawn through
 Canvas#drawRenderNode(RenderNode).
 Additionally a RenderEffect can be applied to a View's backing RenderNode through
 View.setRenderEffect(RenderEffect)
Public methods | |
|---|---|
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createBitmapEffect(Bitmap bitmap)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createBitmapEffect(Bitmap bitmap, Rect src, Rect dst)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createBlendModeEffect(RenderEffect dst, RenderEffect src, BlendMode blendMode)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createBlurEffect(float radiusX, float radiusY, Shader.TileMode edgeTreatment)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createBlurEffect(float radiusX, float radiusY, RenderEffect inputEffect, Shader.TileMode edgeTreatment)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createChainEffect(RenderEffect outer, RenderEffect inner)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createColorFilterEffect(ColorFilter colorFilter, RenderEffect renderEffect)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createColorFilterEffect(ColorFilter colorFilter)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createOffsetEffect(float offsetX, float offsetY, RenderEffect input)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createOffsetEffect(float offsetX, float offsetY)
      
      
        Create a   | 
  
        
        
        static
        
        
        RenderEffect
     | 
  
    
      
      createShaderEffect(Shader shader)
      
      
        Create a   | 
  
Inherited methods | |
|---|---|
public static RenderEffect createBitmapEffect (Bitmap bitmap)
Create a RenderEffect that renders the contents of the input Bitmap.
 This is useful to create an input for other RenderEffect types such as
 RenderEffect#createBlurEffect(float, float, RenderEffect, TileMode) or
 RenderEffect#createColorFilterEffect(ColorFilter, RenderEffect)
| Parameters | |
|---|---|
bitmap | 
        
          Bitmap: The source bitmap to be rendered by the created RenderEffect
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createBitmapEffect (Bitmap bitmap, Rect src, Rect dst)
Create a RenderEffect that renders the contents of the input Bitmap.
 This is useful to create an input for other RenderEffect types such as
 RenderEffect#createBlurEffect(float, float, RenderEffect, TileMode) or
 RenderEffect#createColorFilterEffect(ColorFilter, RenderEffect)
| Parameters | |
|---|---|
bitmap | 
        
          Bitmap: The source bitmap to be rendered by the created RenderEffect
 This value cannot be null. | 
      
src | 
        
          Rect: Optional subset of the bitmap to be part of the rendered output. If null
            is provided, the entire bitmap bounds are used.
 This value may be null. | 
      
dst | 
        
          Rect: Bounds of the destination which the bitmap is translated and scaled to be
            drawn into within the bounds of the RenderNode this RenderEffect is
            installed on
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        |
public static RenderEffect createBlendModeEffect (RenderEffect dst, RenderEffect src, BlendMode blendMode)
Create a RenderEffect that is a composition of 2 other RenderEffect instances
 combined by the specified BlendMode
| Parameters | |
|---|---|
dst | 
        
          RenderEffect: The Dst pixels used in blending
 This value cannot be null. | 
      
src | 
        
          RenderEffect: The Src pixels used in blending
 This value cannot be null. | 
      
blendMode | 
        
          BlendMode: The BlendMode to be used to combine colors from the two
                  RenderEffects
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createBlurEffect (float radiusX, float radiusY, Shader.TileMode edgeTreatment)
Create a RenderEffect that blurs the contents of the
 RenderNode that this RenderEffect is installed on with the
 specified radius along the x and y axis.
| Parameters | |
|---|---|
radiusX | 
        
          float: Radius of blur along the X axis | 
      
radiusY | 
        
          float: Radius of blur along the Y axis | 
      
edgeTreatment | 
        
          Shader.TileMode: Policy for how to blur content near edges of the blur kernel
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createBlurEffect (float radiusX, float radiusY, RenderEffect inputEffect, Shader.TileMode edgeTreatment)
Create a RenderEffect that blurs the contents of the optional input RenderEffect
 with the specified radius along the x and y axis. If no input RenderEffect is provided
 then all drawing commands issued with a RenderNode that this
 RenderEffect is installed in will be blurred
| Parameters | |
|---|---|
radiusX | 
        
          float: Radius of blur along the X axis | 
      
radiusY | 
        
          float: Radius of blur along the Y axis | 
      
inputEffect | 
        
          RenderEffect: Input RenderEffect that provides the content to be blurred, can be null
                    to indicate that the drawing commands on the RenderNode are to be
                    blurred instead of the input RenderEffect
 This value cannot be null. | 
      
edgeTreatment | 
        
          Shader.TileMode: Policy for how to blur content near edges of the blur kernel
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        |
public static RenderEffect createChainEffect (RenderEffect outer, RenderEffect inner)
Create a RenderEffect that composes 'inner' with 'outer', such that the results of
 'inner' are treated as the source bitmap passed to 'outer', i.e.
 
 result = outer(inner(source))
 
 
 Consumers should favor explicit chaining of RenderEffect instances at creation time
 rather than using chain effect. Chain effects are useful for situations where the input or
 output are provided from elsewhere and the input or output RenderEffect need to be
 changed.
    | Parameters | |
|---|---|
outer | 
        
          RenderEffect: RenderEffect that consumes the output of  as its input
 This value cannot be null. | 
      
inner | 
        
          RenderEffect: RenderEffect that is consumed as input by 
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createColorFilterEffect (ColorFilter colorFilter, RenderEffect renderEffect)
Create a RenderEffect that applies the color filter to the provided RenderEffect
| Parameters | |
|---|---|
colorFilter | 
        
          ColorFilter: ColorFilter applied to the content in the input RenderEffect
 This value cannot be null. | 
      
renderEffect | 
        
          RenderEffect: Source to be transformed by the specified ColorFilter
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createColorFilterEffect (ColorFilter colorFilter)
Create a RenderEffect that applies the color filter to the contents of the
 RenderNode that this RenderEffect is installed on
| Parameters | |
|---|---|
colorFilter | 
        
          ColorFilter: ColorFilter applied to the content in the input RenderEffect
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createOffsetEffect (float offsetX, float offsetY, RenderEffect input)
Create a RenderEffect instance with the provided x and y offset
| Parameters | |
|---|---|
offsetX | 
        
          float: offset along the x axis in pixels | 
      
offsetY | 
        
          float: offset along the y axis in pixels | 
      
input | 
        
          RenderEffect: target RenderEffect used to render in the offset coordinates.
 
 This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createOffsetEffect (float offsetX, float offsetY)
Create a RenderEffect instance that will offset the drawing content
 by the provided x and y offset.
| Parameters | |
|---|---|
offsetX | 
        
          float: offset along the x axis in pixels | 
      
offsetY | 
        
          float: offset along the y axis in pixels | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. | 
      
public static RenderEffect createShaderEffect (Shader shader)
Create a RenderEffect that renders the contents of the input Shader.
 This is useful to create an input for other RenderEffect types such as
 RenderEffect#createBlurEffect(float, float, RenderEffect, TileMode)
 RenderEffect#createBlurEffect(float, float, RenderEffect, TileMode) or
 RenderEffect#createColorFilterEffect(ColorFilter, RenderEffect).
| Parameters | |
|---|---|
shader | 
        
          Shader: This value cannot be null. | 
      
| Returns | |
|---|---|
RenderEffect | 
        This value cannot be null. |