Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ElementRenderer Class

    Namespace: Stride.UI.Renderers
    Assembly: Stride.UI.dll

    Base class for UI element renderers

    System.Object → DisposeBase → ComponentBase → ElementRenderer
    Derived from ElementRenderer: DefaultBorderRenderer

    public class ElementRenderer : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
    Name Description
    Constructors
    ElementRenderer(IServiceRegistry)

    Create an instance of an UI element renderer.

    Properties
    Batch

    Gets a reference to the UI image drawer.

    Content

    A reference to the game asset manager.

    DecreaseStencilValueState

    A depth stencil state that decrease the stencil value if the stencil test passes.

    GraphicsDevice

    A reference to the game graphic device.

    IncreaseStencilValueState

    A depth stencil state that increase the stencil value if the stencil test passes.

    KeepStencilValueState

    A depth stencil state that keep the stencil value in any cases.

    Methods
    RenderClipping(UIElement, UIRenderingContext)

    Render the clipping region of the provided UIElement.

    RenderColor(UIElement, UIRenderingContext)

    Render the provided UIElement.

    | Improve this Doc View Source

    Constructors


    ElementRenderer(IServiceRegistry)

    Create an instance of an UI element renderer.

    public ElementRenderer(IServiceRegistry services)
    Parameters
    Type Name Description
    IServiceRegistry services

    The list of registered services

    | Improve this Doc View Source

    Properties


    Batch

    Gets a reference to the UI image drawer.

    public UIBatch Batch { get; }
    Property Value
    Type Description
    UIBatch

    Content

    A reference to the game asset manager.

    public IContentManager Content { get; }
    Property Value
    Type Description
    IContentManager

    DecreaseStencilValueState

    A depth stencil state that decrease the stencil value if the stencil test passes.

    public DepthStencilStateDescription DecreaseStencilValueState { get; }
    Property Value
    Type Description
    DepthStencilStateDescription

    GraphicsDevice

    A reference to the game graphic device.

    public GraphicsDevice GraphicsDevice { get; }
    Property Value
    Type Description
    GraphicsDevice

    IncreaseStencilValueState

    A depth stencil state that increase the stencil value if the stencil test passes.

    public DepthStencilStateDescription IncreaseStencilValueState { get; }
    Property Value
    Type Description
    DepthStencilStateDescription

    KeepStencilValueState

    A depth stencil state that keep the stencil value in any cases.

    public DepthStencilStateDescription KeepStencilValueState { get; }
    Property Value
    Type Description
    DepthStencilStateDescription
    | Improve this Doc View Source

    Methods


    RenderClipping(UIElement, UIRenderingContext)

    Render the clipping region of the provided UIElement.

    public virtual void RenderClipping(UIElement element, UIRenderingContext context)
    Parameters
    Type Name Description
    UIElement element

    The element to render.

    UIRenderingContext context

    The rendering context containing information how to draw the element.

    Remarks

    The render target, the depth stencil buffer and the depth stencil state are already correctly set when entering this function. If the user wants to perform some intermediate rendering, it is his responsibility to bind them back correctly before the final rendering.


    RenderColor(UIElement, UIRenderingContext)

    Render the provided UIElement.

    public virtual void RenderColor(UIElement element, UIRenderingContext context)
    Parameters
    Type Name Description
    UIElement element

    The element to render.

    UIRenderingContext context

    The rendering context containing information how to draw the element.

    Remarks

    The render target, the depth stencil buffer and the depth stencil state are already correctly set when entering this function. If the user wants to perform some intermediate rendering, it is his responsibility to bind them back correctly before the final rendering.


    Inherited Members

    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.Destroy()
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article
    In This Article
    • Constructors
      • ElementRenderer(IServiceRegistry)
    • Properties
      • Batch
      • Content
      • DecreaseStencilValueState
      • GraphicsDevice
      • IncreaseStencilValueState
      • KeepStencilValueState
    • Methods
      • RenderClipping(UIElement, UIRenderingContext)
      • RenderColor(UIElement, UIRenderingContext)
    • Inherited Members
    • Extension Methods

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation