type t
Type of shapes
type t
val create_polygon : points:OgamlMath.Vector2f.t list -> color:Color.t -> ?origin:OgamlMath.Vector2f.t -> ?position:OgamlMath.Vector2f.t -> ?scale:OgamlMath.Vector2f.t -> ?rotation:float -> ?thickness:float -> ?border_color:Color.t -> unit -> t
val create_rectangle : position:OgamlMath.Vector2f.t -> size:OgamlMath.Vector2f.t -> color:Color.t -> ?origin:OgamlMath.Vector2f.t -> ?scale:OgamlMath.Vector2f.t -> ?rotation:float -> ?thickness:float -> ?border_color:Color.t -> unit -> t
val create_regular : position:OgamlMath.Vector2f.t -> radius:float -> amount:int -> color:Color.t -> ?origin:OgamlMath.Vector2f.t -> ?scale:OgamlMath.Vector2f.t -> ?rotation:float -> ?thickness:float -> ?border_color:Color.t -> unit -> t
val create_line : thickness:float -> color:Color.t -> ?top:OgamlMath.Vector2f.t -> tip:OgamlMath.Vector2f.t -> ?position:OgamlMath.Vector2f.t -> ?origin:OgamlMath.Vector2f.t -> ?rotation:float -> unit -> t
top
(zero by default) to tip
.
val draw : (module RenderTarget.T with type t = 'a) -> ?parameters:DrawParameter.t -> target:'a -> shape:t -> unit -> unit
parameters
defaults to DrawParameter.make ~depth_test:false ~blend_mode:DrawParameter.BlendMode.alpha
val set_position : t -> OgamlMath.Vector2f.t -> unit
val set_origin : t -> OgamlMath.Vector2f.t -> unit
val set_rotation : t -> float -> unit
val set_scale : t -> OgamlMath.Vector2f.t -> unit
val set_thickness : t -> float -> unit
val set_color : t -> Color.t -> unit
val translate : t -> OgamlMath.Vector2f.t -> unit
val rotate : t -> float -> unit
val scale : t -> OgamlMath.Vector2f.t -> unit
val position : t -> OgamlMath.Vector2f.t
val origin : t -> OgamlMath.Vector2f.t
val rotation : t -> float
val get_scale : t -> OgamlMath.Vector2f.t
val thickness : t -> float
val color : t -> Color.t
val to_source : t -> VertexArray.SimpleVertex.T.s VertexArray.VertexSource.t -> unit
val map_to_source : t -> (VertexArray.SimpleVertex.T.s VertexArray.Vertex.t -> 'b VertexArray.Vertex.t) -> 'b VertexArray.VertexSource.t -> unit
to_source
for more information.