Package 

Class RiveSurface

  • All Implemented Interfaces:
    app.rive.core.CheckableAutoCloseable , java.lang.AutoCloseable

    
    public abstract class RiveSurface
     implements CheckableAutoCloseable
                        

    A backend agnostic collection of surface properties needed for rendering.

    • A Rive render target, created natively which renders to the GL framebuffer

    • A draw key, which uniquely identifies draw operations in the CommandQueue

    It also stores the width and height of the surface.

    ⚠️ This class assumes ownership of all resources and should be closed when no longer needed.

    Alone it is not sufficient for rendering, as it lacks a backend-specific surface, which is provided by sub-classes.

    • Constructor Detail

      • RiveSurface

        RiveSurface(Long renderTargetPointer, DrawKey drawKey, Integer width, Integer height)
        Parameters:
        renderTargetPointer - The native pointer to the Rive render target.
        drawKey - The key used to uniquely identify the draw operation in the CommandQueue.
        width - The width of the surface in pixels.
        height - The height of the surface in pixels.