Cauldron2D.GameMaker.Shapes (Cauldron2D.GameMaker v0.2.1)

Copy Markdown View Source

GameMaker's drawn shapes as pictures, in white, to be tinted by a draw list item's :blend and :alpha.

{:ellipse, {width, height}, fill} is draw_ellipse(x1, y1, x1 + width, y1 + height, outline) placed at {x1, y1}: the polygon of the runtime's circle precision (24 points, draw_set_circle_precision's default) inscribed in the box, fill :filled covering every pixel whose centre lies inside it, :outline its edges one pixel wide.

item = %{picture: {:ellipse, {200, 200}, :filled}, position: {0, 0}, blend: {255, 255, 255}}

Cauldron2D.GameMaker.Surfaces.lookup/2 resolves these pictures.

Summary

Functions

The raster of shape key, nil for a box without area.

Types

fill()

@type fill() :: :filled | :outline

key()

@type key() :: {:ellipse, {number(), number()}, fill()}

Functions

raster(arg)

@spec raster(key()) :: FrenchCurve.Raster.t() | nil

The raster of shape key, nil for a box without area.