gloss-1.12.0.0: Painless 2D vector graphics, animations and simulations.

Graphics.Gloss.Data.ViewPort

Synopsis

# Documentation

data ViewPort Source #

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.

Constructors

 ViewPort FieldsviewPortTranslate :: !(Float, Float)Global translation.viewPortRotate :: !FloatGlobal rotation (in degrees).viewPortScale :: !FloatGlobal scaling (of both x and y coordinates).

The initial state of the viewport.

Translates, rotates, and scales an image according to the ViewPort.

Takes a point using screen coordinates, and uses the ViewPort to convert it to Picture coordinates. This is the inverse of applyViewPortToPicture for points.