Class Texture

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    Texture represents a texture object used as input or output by shaders.

    public class Texture : BaseHandle, IDynamicResourceHandler, INameScope, System.IDisposable
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Texture
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Constructors

    View Source

    Texture(NativeImageInterface)

    Declaration
    public Texture(NativeImageInterface nativeImageInterface)
    Parameters
    Type Name Description
    NativeImageInterface nativeImageInterface
    View Source

    Texture(TextureShape, PixelFormat, uint, uint)

    Creates a new Texture object.

    Declaration
    public Texture(TextureShape textureShape, PixelFormat format, uint width, uint height)
    Parameters
    Type Name Description
    TextureShape textureShape

    The type of the texture.

    PixelFormat format

    The format of the pixel data.

    uint width

    The width of the texture.

    uint height

    The height of the texture.

    View Source

    Texture(TextureType, PixelFormat, uint, uint)

    Creates a new Texture object.

    Declaration
    public Texture(TextureType type, PixelFormat format, uint width, uint height)
    Parameters
    Type Name Description
    TextureType type

    The type of the texture.

    PixelFormat format

    The format of the pixel data.

    uint width

    The width of the texture.

    uint height

    The height of the texture.

    Properties

    View Source

    AliveCount

    Gets the number of currently alived Texture object.

    Declaration
    public static int AliveCount { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    Dispose(DisposeTypes)

    Declaration
    protected override void Dispose(DisposeTypes type)
    Parameters
    Type Name Description
    DisposeTypes type
    Overrides
    BaseHandle.Dispose(DisposeTypes)
    View Source

    GenerateMipmaps()

    Generates mipmaps for the texture.
    This will auto generate all the mipmaps for the texture based on the data in the base level.

    Declaration
    public void GenerateMipmaps()
    View Source

    GenerateUrl()

    Generate Url from texture. For default, we assume that texture is pre-multiplied by alpha.

    Declaration
    public ImageUrl GenerateUrl()
    Returns
    Type Description
    ImageUrl
    Remarks

    This API should not be called at worker thread.

    View Source

    GenerateUrl(bool)

    Generate Url from texture with pre-multiplied by alpha information.

    Declaration
    public ImageUrl GenerateUrl(bool preMultiplied)
    Parameters
    Type Name Description
    bool preMultiplied

    The raw pixel data pre-multiplied by alpha.

    Returns
    Type Description
    ImageUrl
    Remarks

    This API should not be called at worker thread.

    View Source

    GetHeight()

    Returns the height of the texture..

    Declaration
    public uint GetHeight()
    Returns
    Type Description
    uint

    The height, in pixels, of the texture.

    View Source

    GetWidth()

    Returns the width of the texture.

    Declaration
    public uint GetWidth()
    Returns
    Type Description
    uint

    The width, in pixels, of the texture.

    View Source

    ReleaseSwigCPtr(HandleRef)

    Declaration
    protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
    Parameters
    Type Name Description
    System.Runtime.InteropServices.HandleRef swigCPtr
    Overrides
    BaseHandle.ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef)
    View Source

    Upload(PixelData, uint, uint, uint, uint, uint, uint)

    Uploads data to the texture from a PixelData object.

    Declaration
    public bool Upload(PixelData pixelData, uint layer, uint mipmap, uint xOffset, uint yOffset, uint width, uint height)
    Parameters
    Type Name Description
    PixelData pixelData

    The pixelData object.

    uint layer

    The layer of a cube map or array texture.

    uint mipmap

    The level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.

    uint xOffset

    The horizontal offset of the rectangular area in the texture that will be updated.

    uint yOffset

    The vertical offset of the rectangular area in the texture that will be updated.

    uint width

    The width of the rectangular area in the texture that will be updated.

    uint height

    height of the rectangular area in the texture that will be updated.

    Returns
    Type Description
    bool

    True if the PixelData object has compatible pixel format and fits within the texture, false otherwise.

    View Source

    Upload(PixelData, TextureUploadProperties)

    Uploads data to the texture from a PixelData object.

    Declaration
    public bool Upload(PixelData pixelData, TextureUploadProperties properties)
    Parameters
    Type Name Description
    PixelData pixelData

    The pixelData object.

    TextureUploadProperties properties

    Properties used to upload PixelData.

    Returns
    Type Description
    bool

    True if the PixelData object has compatible pixel format and fits within the texture, false otherwise.

    View Source

    Upload(PixelData)

    Uploads data to the texture from a PixelData object.

    Declaration
    public bool Upload(PixelData pixelData)
    Parameters
    Type Name Description
    PixelData pixelData

    The pixelData object.

    Returns
    Type Description
    bool

    True if the PixelData object has compatible pixel format and fits within the texture, false otherwise.

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Extension Methods

    BindableObjectExtensions.SetBinding(BindableObject, BindableProperty, string, BindingMode, IValueConverter, string)
    NameScopeExtensions.FindByName<T>(Element, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX