using UnityEngine;
namespace Rive.Components
{
///
/// Interface for a procedural drawing that can be used to draw a procedural graphic within a ProceduralRiveWidget.
///
public interface IProceduralDrawing
{
///
/// This should pass the procedural graphic using the given renderer. This might be called multiple times during the lifetime of the object, such as when the render texture is redrawn.
///
/// The Rive renderer to use to draw the procedural graphic.
/// The frame to draw the procedural visual within.
/// Provides additional context to consider when drawing the procedural graphic.
void Draw(IRenderer renderer, AABB frame, RenderContext renderContext);
///
/// This should update the procedural graphic. Use this to update the procedural drawing changes over time.
///
/// The time since the last update.
/// True if the procedural graphic has changed, false otherwise.
bool Advance(float deltaTime);
///
/// Tests if a given local position within the widget's rectangle hits any interactive elements.
///
///
/// The normalized point of the pointer position in the rectangle. The coordinates are in the range [0,1] where (0,0) is the bottom-left corner and (1,1) is the top-right corner.
///
///
/// The rectangle to test the hit against.
///
///
/// Returns true if the position hits an interactive element; otherwise, false.
///
bool HitTest(Vector2 point, Rect rect);
///
/// Responds to a pointer press event within the procedural graphic in the given rect.
///
///
/// The normalized point of the pointer position in the rectangle. The coordinates are in the range [0,1] where (0,0) is the bottom-left corner and (1,1) is the top-right corner.
///
///
/// The rectangle to reference for the pointer down event.
///
/// Returns true if the pointer down event was handled; otherwise, false.
bool HandlePointerDown(Vector2 point, Rect rect);
///
/// Responds to a pointer up event within the procedural graphic in the given rect.
///
///
/// The normalized point of the pointer position in the rectangle. The coordinates are in the range [0,1] where (0,0) is the bottom-left corner and (1,1) is the top-right corner.
///
///
/// The rectangle to reference for the pointer up event.
///
/// Returns true if the pointer up event was handled; otherwise, false.
bool HandlePointerUp(Vector2 point, Rect rect);
///
/// Responds to a pointer move event within the procedural graphic in the given rect.
///
///
/// The normalized point of the pointer position in the rectangle. The coordinates are in the range [0,1] where (0,0) is the bottom-left corner and (1,1) is the top-right corner.
///
///
/// The rectangle to reference for the pointer move event.
///
/// Returns true if the pointer move event was handled; otherwise, false.
bool HandlePointerMove(Vector2 point, Rect rect);
///
/// Responds to a pointer exit event within the procedural graphic in the given rect.
///
///
/// The normalized point of the pointer position in the rectangle. The coordinates are in the range [0,1] where (0,0) is the bottom-left corner and (1,1) is the top-right corner.
///
///
/// The rectangle to reference for the pointer exit event.
///
/// Returns true if the pointer exit event was handled; otherwise, false.
bool HandlePointerExit(Vector2 point, Rect rect);
}
}