Class ImageVisual

    Definition

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

    The visual which can display an image resource.

    public class ImageVisual : VisualBase, IDynamicResourceHandler, INameScope, System.IDisposable
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    VisualBase
    ImageVisual
    Derived
    AnimatedImageVisual
    AnimatedImageVisual
    NPatchVisual
    NPatchVisual
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Constructors

    View Source

    ImageVisual()

    Creates an visual object.

    Declaration
    public ImageVisual()

    Properties

    View Source

    AlphaMaskUrl

    Gets or sets the URL of the alpha mask.
    Optional.

    Declaration
    public string AlphaMaskUrl { get; set; }
    Property Value
    Type Description
    string
    View Source

    BorderlineColor

    The color for the borderline of the visual. It is Color.Black by default.

    Declaration
    public Color BorderlineColor { get; set; }
    Property Value
    Type Description
    Color
    View Source

    BorderlineOffset

    The Relative offset for the borderline of the visual. Recommended range : [-1.0f to 1.0f]. If -1.0f, draw borderline inside of the visual. If 1.0f, draw borderline outside of the visual. If 0.0f, draw borderline half inside and half outside. It is 0.0f by default.

    Declaration
    public float BorderlineOffset { get; set; }
    Property Value
    Type Description
    float
    View Source

    BorderlineWidth

    The width for the borderline of the visual.

    Declaration
    public float BorderlineWidth { get; set; }
    Property Value
    Type Description
    float
    View Source

    CornerRadius

    The radius for the rounded corners of the visual. The values in Vector4 are used in clockwise order from top-left to bottom-left : Vector4(top-left-corner, top-right-corner, bottom-right-corner, bottom-left-corner). Each radius will clamp internally to the half of smaller of the visual's width or height.

    Declaration
    public Vector4 CornerRadius { get; set; }
    Property Value
    Type Description
    Vector4
    View Source

    CornerRadiusPolicy

    Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the visual size) or absolute (in world units). It is absolute by default. When the policy is relative, the corner radius is relative to the smaller of the visual's width and height.

    Declaration
    public VisualTransformPolicyType CornerRadiusPolicy { get; set; }
    Property Value
    Type Description
    VisualTransformPolicyType
    View Source

    CornerSquareness

    The squareness for the rounded corners of the visual. The values in Vector4 are used in clockwise order from top-left to bottom-left : Vector4(top-left-corner, top-right-corner, bottom-right-corner, bottom-left-corner). Each radius will clamp internally between [0.0f to 1.0f].

    Declaration
    public Vector4 CornerSquareness { get; set; }
    Property Value
    Type Description
    Vector4
    View Source

    CropToMask

    Whether to crop image to mask or scale mask to fit image.

    Declaration
    public bool CropToMask { get; set; }
    Property Value
    Type Description
    bool
    View Source

    DesiredHeight

    Gets or sets the desired image height.
    If not specified, the actual image height is used.
    For normal quad images only.
    Optional.

    Declaration
    public int DesiredHeight { get; set; }
    Property Value
    Type Description
    int
    View Source

    DesiredWidth

    Gets or sets the desired image width.
    If not specified, the actual image width is used.
    For normal quad images only.
    Optional.

    Declaration
    public int DesiredWidth { get; set; }
    Property Value
    Type Description
    int
    View Source

    FastTrackUploading

    Gets or sets whether to apply fast track uploading or not.

    Declaration
    public bool FastTrackUploading { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    If we use fast track uploading feature, It can upload texture without event-thead dependency. But also,

    • Texture size is invalid until ResourceReady signal comes.
    • Texture cannot be cached (We always try to load new image).
    • Seamless visual change didn't supported.
    • Alpha masking didn't supported. If you try, It will load as normal case.
    • Synchronous loading didn't supported. If you try, It will load as normal case.
    • Synchronous sizing didn't supported. If you try, It will load as normal case.
    • Reload action didn't supported. If you try, It will load as normal case.
    • Atlas loading didn't supported. If you try, It will load as normal case.
    • Custom shader didn't supported. If you try, It will load as normal case.
    View Source

    LoadPolicy

    Gets or sets the Image Visual image loading policy.
    It decides if a texture should be loaded immediately after source set or only after the visual is added to the window.

    Declaration
    public LoadPolicyType LoadPolicy { get; set; }
    Property Value
    Type Description
    LoadPolicyType
    View Source

    MaskContentScale

    Gets or sets scale factor to apply to the content image before masking.

    Declaration
    public float MaskContentScale { get; set; }
    Property Value
    Type Description
    float
    View Source

    MaskingMode

    Gets or sets whether to apply mask on GPU or not.

    Declaration
    public ImageView.MaskingModeType MaskingMode { get; set; }
    Property Value
    Type Description
    ImageView.MaskingModeType
    View Source

    OrientationCorrection

    Gets or sets whether to automatically correct the orientation of an image.

    Declaration
    public bool OrientationCorrection { get; set; }
    Property Value
    Type Description
    bool
    View Source

    PixelArea

    Gets or sets the image area to be displayed.
    It is a rectangular area.
    The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.
    If not specified, the default value is Vector4 (0.0, 0.0, 1.0, 1.0), i.e., the entire area of the image.
    For normal quad images only.
    Optional.

    Declaration
    public Vector4 PixelArea { get; set; }
    Property Value
    Type Description
    Vector4
    View Source

    PreMultipliedAlpha

    ImageView PreMultipliedAlpha, type Boolean.
    Image must be initialized.

    Declaration
    public bool PreMultipliedAlpha { get; set; }
    Property Value
    Type Description
    bool
    View Source

    ReleasePolicy

    Gets or sets the Image Visual release policy.
    It decides if a texture should be released from the cache or kept to reduce the loading time.

    Declaration
    public ReleasePolicyType ReleasePolicy { get; set; }
    Property Value
    Type Description
    ReleasePolicyType
    View Source

    ResourceUrl

    Gets or sets the URL of the image.

    Declaration
    public string ResourceUrl { get; set; }
    Property Value
    Type Description
    string
    View Source

    SamplingMode

    Gets or sets filtering options used when resizing images to the sample original pixels.
    If not supplied, the default is SamplingModeType.BoxThenLinear.
    For normal quad images only.
    Optional.

    Declaration
    public SamplingModeType SamplingMode { get; set; }
    Property Value
    Type Description
    SamplingModeType
    View Source

    SynchronousLoading

    Synchronously load the image for the visual.

    Declaration
    public bool SynchronousLoading { get; set; }
    Property Value
    Type Description
    bool
    View Source

    SynchronousSizing

    Gets or sets whether to automatically reload the image as the visual size.
    If we set this value as true, Visual size will be works as desired size of image.

    Declaration
    public bool SynchronousSizing { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    If this value is true, DesiredWidth and DesiredHeight will be invalidated.

    View Source

    WrapModeU

    Gets or sets the wrap mode for the u coordinate.
    It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
    If not specified, the default is WrapModeType.Default(CLAMP).
    For normal quad images only.
    Optional.

    Declaration
    public WrapModeType WrapModeU { get; set; }
    Property Value
    Type Description
    WrapModeType
    View Source

    WrapModeV

    Gets or sets the wrap mode for the v coordinate.
    It decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
    The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.
    If not specified, the default is WrapModeType.Default(CLAMP).
    For normal quad images only. Optional.

    Declaration
    public WrapModeType WrapModeV { get; set; }
    Property Value
    Type Description
    WrapModeType

    Methods

    View Source

    Reload()

    Reload image.

    Declaration
    public void Reload()

    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