Most visited

Recently visited

Added in API level 1

BitmapShader

public class BitmapShader
extends Shader

java.lang.Object
   ↳ android.graphics.Shader
     ↳ android.graphics.BitmapShader


着色器用于将位图绘制为纹理。 位图可以通过设置平铺模式来重复或镜像。

Summary

Public constructors

BitmapShader(Bitmap bitmap, Shader.TileMode tileX, Shader.TileMode tileY)

调用它来创建一个新的着色器,该着色器将使用位图进行绘制。

Inherited methods

From class android.graphics.Shader
From class java.lang.Object

Public constructors

BitmapShader

Added in API level 1
BitmapShader (Bitmap bitmap, 
                Shader.TileMode tileX, 
                Shader.TileMode tileY)

调用它来创建一个新的着色器,该着色器将使用位图进行绘制。

Parameters
bitmap Bitmap: The bitmap to use inside the shader
tileX Shader.TileMode: The tiling mode for x to draw the bitmap in.
tileY Shader.TileMode: The tiling mode for y to draw the bitmap in.

Hooray!