Module

Graphics.Glapple.Data.Picture

Package
purescript-glappleDEPRECATED
Repository
yukikurage/purescript-glapple

#(<-*) Source

Operator alias for Graphics.Glapple.Data.Picture.multiplyComposite (left-associative / precedence 5)

#(<-+) Source

Operator alias for Graphics.Glapple.Data.Picture.addComposite (left-associative / precedence 5)

#(<-.) Source

Operator alias for Graphics.Glapple.Data.Picture.destinationOverComposite (left-associative / precedence 5)

#(<-^) Source

Operator alias for Graphics.Glapple.Data.Picture.sourceOverComposite (left-associative / precedence 5)

#DrawStyle Source

data DrawStyle sprite

Constructors

Instances

#Font Source

newtype Font

Constructors

Instances

#Picture Source

newtype Picture sprite

Instances

#Shape Source

data Shape

Constructors

Instances

#absolute Source

absolute :: forall s. Picture s -> Picture s

Disables the parent's transform, forcing it to draw from the origin. Heavy use is deprecated.

#absorb Source

absorb :: forall s. Effect (Picture s) -> Picture s

Embeds the action of Effect into the Picture.

#absorb' Source

absorb' :: forall s. (Context2D -> (s -> Maybe CanvasImageSource) -> Effect (Picture s)) -> Picture s

It is not recommended to use this system except for the glapple system.

#addComposite Source

addComposite :: forall s. Picture s -> Picture s -> Picture s

#arc Source

arc :: forall s. { angle :: Number, radius :: Number, start :: Number } -> Picture s

Draw an arc with stroke. Property angle is the rotation angle from the start position. A positive number will cause a clockwise rotation, 2π will make a perfect circle, and 4π will return to a blank state.

#color Source

color :: forall s. Color -> Picture s -> Picture s

Set color

#composite Source

composite :: forall sprite. Composite -> Picture sprite -> Picture sprite -> Picture sprite

Combine images using the specified combining method. Issue: Synthesis of the combined image behaves unexpectedly. ex) x <-+ (y <-^ z) = (x <-+ y) <-^ z

#destinationOverComposite Source

#drawPicture Source

drawPicture :: forall sprite. Context2D -> (sprite -> Maybe CanvasImageSource) -> Picture sprite -> Effect Unit

Draw a picture It is not recommended to use this except for the glapple system.

#drawWithTransform Source

drawWithTransform :: forall s. (Transform -> Picture s) -> Picture s

Retrieves the current transform state and draws a Picture.

#empty Source

empty :: forall sprite. Picture sprite

Empty picture.

#fan Source

fan :: forall s. Shape -> { angle :: Number, radius :: Number, start :: Number } -> Picture s

Draw a fan. Property angle is the rotation angle from the start position. A positive number will cause a clockwise rotation, 2π will make a perfect circle, and 4π will return to a blank state.

#font Source

font :: forall s. Font -> Picture s -> Picture s

Set font.

#line Source

line :: forall sprite. Array Complex -> Picture sprite

Draw line.

#lineWidth Source

lineWidth :: forall s. Number -> Picture s -> Picture s

Set lineWidth.

#multiplyComposite Source

multiplyComposite :: forall s. Picture s -> Picture s -> Picture s

#opacity Source

opacity :: forall s. Number -> Picture s -> Picture s

Set opacity.

#paint Source

paint :: forall s. DrawStyle s -> Picture s -> Picture s

Add color or pattern.

#polygon Source

polygon :: forall sprite. Shape -> Array Complex -> Picture sprite

Draw polygon.

#rect Source

rect :: forall s. Shape -> Complex -> Picture s

Draw rectangle.

#rotate Source

rotate :: forall s. Number -> Picture s -> Picture s

#scale Source

scale :: forall s. Complex -> Picture s -> Picture s

#setOrigin Source

setOrigin :: forall sprite. Complex -> Picture sprite -> Picture sprite

#sourceOverComposite Source

sourceOverComposite :: forall s. Picture s -> Picture s -> Picture s

#sprite Source

sprite :: forall sprite. sprite -> Picture sprite

Draws the sprite loaded by runGame.

#text Source

text :: forall sprite. Shape -> String -> Picture sprite

Draw text.

#textAlign Source

textAlign :: forall s. TextAlign -> Picture s -> Picture s

Set textAlign.

#textBaseLine Source

textBaseLine :: forall s. TextBaseline -> Picture s -> Picture s

Set textBaseLine.

#transform Source

transform :: forall s. Transform -> Picture s -> Picture s

#translate Source

translate :: forall s. Complex -> Picture s -> Picture s