linsyking/messenger-core/14.0.1

NOTE: the latest version is 20.0.0

Renamed to elm-messenger/messenger-core. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as linsyking/messenger-core still install under that name. 34 versions of 52 come from the new location (see their notes). 7 versions could not be recovered and cannot be installed.

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: Software Heritage has not archived the repo; no fork with tag 14.0.1 found (17 same-name repos checked); no cached copy. Use another version.

Details

Messenger.Coordinate.Coordinates

Coordinate

This module deals with the coordinate transformation.

This module is very important because it can calculate the correct position of the point you want to draw.

fixedPosToReal : InternalData -> ( Float, Float ) -> ( Float, Float )

fixedPosToReal

Same as posToReal, but add the initial position of canvas.

posToReal : InternalData -> ( Float, Float ) -> ( Float, Float )

posToReal

Transform from the virtual coordinate system to the real pixel system.

posToVirtual : InternalData -> ( Float, Float ) -> ( Float, Float )

Inverse of posToReal.

lengthToReal : InternalData -> Float -> Float

widthToReal

Use this if you want to draw something based on the length.

fromRealLength : InternalData -> Float -> Float

The inverse function of widthToReal.

maxHandW : ( Float, Float ) -> ( Float, Float ) -> ( Float, Float )

maxHandW

getStartPoint : ( Float, Float ) -> ( Float, Float ) -> ( Float, Float )

getStartPoint

judgeMouseRect : ( Float, Float ) -> ( Float, Float ) -> ( Float, Float ) -> Bool

judgeMouseRect Judge whether the mouse position is in the rectangle.

fromMouseToVirtual : InternalData -> ( Float, Float ) -> ( Float, Float )

fromMouseToVirtual