Safe Haskell | None |
---|---|
Language | Haskell98 |
- data ViewPort = ViewPort {
- viewPortTranslate :: !(Float, Float)
- viewPortRotate :: !Float
- viewPortScale :: !Float
- viewPortInit :: ViewPort
- applyViewPortToPicture :: ViewPort -> Picture -> Picture
- invertViewPort :: ViewPort -> Point -> Point
Documentation
The ViewPort
represents the global transformation applied to the displayed picture.
When the user pans, zooms, or rotates the display then this changes the ViewPort
.
ViewPort | |
|
viewPortInit :: ViewPort Source #
The initial state of the viewport.
applyViewPortToPicture :: ViewPort -> Picture -> Picture Source #
Translates, rotates, and scales an image according to the ViewPort
.
invertViewPort :: ViewPort -> Point -> Point Source #
Takes a point using screen coordinates, and uses the ViewPort
to convert
it to Picture coordinates. This is the inverse of applyViewPortToPicture
for points.