Most visited

Recently visited

Added in API level 11

Sampler

public class Sampler
extends BaseObj

java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.Sampler


取样器对象,用于定义如何将Allocations读取为内核中的纹理。 采样器与rsSample运行时函数一起使用,以从规范化坐标返回值。 与采样器一起使用的任何分配必须使用USAGE_GRAPHICS_TEXTURE创建; 使用未使用USAGE_GRAPHICS_TEXTURE创建的Allocation上的采样器未定义。

Summary

Nested classes

class Sampler.Builder

用于创建非标准采样器的Builder。

枚举 Sampler.Value

 

Public methods

static Sampler CLAMP_LINEAR(RenderScript rs)

检索采样器,将min和mag设置为线性,并将包装模式设置为钳制。

static Sampler CLAMP_LINEAR_MIP_LINEAR(RenderScript rs)

检索mag设置为线性,最小线性mipmap线性和包装模式设置为钳制的采样器。

static Sampler CLAMP_NEAREST(RenderScript rs)

检索采样器,将min和mag设置为最接近,并将包装模式设置为钳位。

static Sampler MIRRORED_REPEAT_LINEAR(RenderScript rs)

检索一个采样器,将min和mag设置为线性,并将wrap模式设置为镜像重复。

static Sampler MIRRORED_REPEAT_LINEAR_MIP_LINEAR(RenderScript rs)

检索一个采样器,将min和mag设置为线性,并将wrap模式设置为镜像重复。

static Sampler MIRRORED_REPEAT_NEAREST(RenderScript rs)

检索采样器,将min和mag设置为最接近,并将包装模式设置为镜像重复。

static Sampler WRAP_LINEAR(RenderScript rs)

检索一个采样器,将min和mag设置为线性并将包装模式设置为包装。

static Sampler WRAP_LINEAR_MIP_LINEAR(RenderScript rs)

检索mag设置为线性的采样器,min线性mipmap linear,并将wrap模式设置为wrap。

static Sampler WRAP_NEAREST(RenderScript rs)

检索采样器,将min和mag设置为最接近,并将包装模式设置为包装。

float getAnisotropy()
Sampler.Value getMagnification()
Sampler.Value getMinification()
Sampler.Value getWrapS()
Sampler.Value getWrapT()

Inherited methods

From class android.renderscript.BaseObj
From class java.lang.Object

Public methods

CLAMP_LINEAR

Added in API level 11
Sampler CLAMP_LINEAR (RenderScript rs)

检索采样器,将min和mag设置为线性,并将包装模式设置为钳制。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

CLAMP_LINEAR_MIP_LINEAR

Added in API level 11
Sampler CLAMP_LINEAR_MIP_LINEAR (RenderScript rs)

检索mag设置为线性,最小线性mipmap线性和包装模式设置为钳制的采样器。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

CLAMP_NEAREST

Added in API level 11
Sampler CLAMP_NEAREST (RenderScript rs)

检索采样器,将min和mag设置为最接近,并将包装模式设置为钳位。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

MIRRORED_REPEAT_LINEAR

Added in API level 18
Sampler MIRRORED_REPEAT_LINEAR (RenderScript rs)

检索一个采样器,将min和mag设置为线性,并将wrap模式设置为镜像重复。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

MIRRORED_REPEAT_LINEAR_MIP_LINEAR

Added in API level 18
Sampler MIRRORED_REPEAT_LINEAR_MIP_LINEAR (RenderScript rs)

检索一个采样器,将min和mag设置为线性,并将wrap模式设置为镜像重复。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

MIRRORED_REPEAT_NEAREST

Added in API level 18
Sampler MIRRORED_REPEAT_NEAREST (RenderScript rs)

检索采样器,将min和mag设置为最接近,并将包装模式设置为镜像重复。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

WRAP_LINEAR

Added in API level 11
Sampler WRAP_LINEAR (RenderScript rs)

检索一个采样器,将min和mag设置为线性并将包装模式设置为包装。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

WRAP_LINEAR_MIP_LINEAR

Added in API level 11
Sampler WRAP_LINEAR_MIP_LINEAR (RenderScript rs)

检索mag设置为线性的采样器,min线性mipmap linear,并将wrap模式设置为wrap。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

WRAP_NEAREST

Added in API level 11
Sampler WRAP_NEAREST (RenderScript rs)

检索采样器,将min和mag设置为最接近,并将包装模式设置为包装。

Parameters
rs RenderScript: Context to which the sampler will belong.
Returns
Sampler Sampler

getAnisotropy

Added in API level 16
float getAnisotropy ()

Returns
float anisotropy setting for the sampler

getMagnification

Added in API level 16
Sampler.Value getMagnification ()

Returns
Sampler.Value magnification setting for the sampler

getMinification

Added in API level 16
Sampler.Value getMinification ()

Returns
Sampler.Value minification setting for the sampler

getWrapS

Added in API level 16
Sampler.Value getWrapS ()

Returns
Sampler.Value S wrapping mode for the sampler

getWrapT

Added in API level 16
Sampler.Value getWrapT ()

Returns
Sampler.Value T wrapping mode for the sampler

Hooray!