using UnityEngine.Rendering; namespace Rive { /// /// Interface for rendering Rive content to a render queue /// public interface IRenderer { /// /// Clear the commands in the render queue /// void Clear(); /// /// Draw the given artboard to the render queue /// /// The artboard to draw void Draw(Artboard artboard); /// /// Draw the given path and paint to the render queue /// /// The path to draw /// The paint to apply to the path void Draw(Path path, Paint paint); /// /// Clip the render queue to the given path /// /// The path to use as a clip mask void Clip(Path path); /// /// Save the current render queue state /// void Save(); /// /// Restore the last saved render queue state /// void Restore(); /// /// Transform the render queue by the given translation /// /// The translation vector to apply void Translate(System.Numerics.Vector2 translation); /// /// Transform the render queue by the given translation /// /// The x translation /// The y translation void Translate(float x, float y); /// /// Transform the render queue by the given matrix /// /// The transformation matrix to apply void Transform(System.Numerics.Matrix3x2 matrix); /// /// Align the artboard to the given fit and alignment /// /// The fit mode to use /// The alignment to apply /// The artboard to align /// Optional scale factor to apply (defaults to 1.0) void Align(Fit fit, Alignment alignment, Artboard artboard, float scaleFactor = 1.0f); /// /// Align the artboard to the given fit and alignment, with the given frame /// /// The fit mode to use /// The alignment to apply /// The artboard to align /// The frame to align within /// Optional scale factor to apply (defaults to 1.0) void Align(Fit fit, Alignment alignment, Artboard artboard, AABB frame, float scaleFactor = 1.0f); /// /// Add the render queue commands to an existing command buffer /// /// The command buffer to add commands to /// Whether to release resources after execution (defaults to false) void AddToCommandBuffer(UnityEngine.Rendering.CommandBuffer commandBuffer, bool release = false); } }