Portability | GHC |
---|---|
Stability | unstable |
Maintainer | stephen.tetley@gmail.com |
Scaling in X and Y
** WARNING ** - half baked.
- data ScalingContext ux uy u = ScalingContext {
- scale_in_x :: ux -> u
- scale_in_y :: uy -> u
- scaleX :: ScalingContext ux uy u -> ux -> u
- scaleY :: ScalingContext ux uy u -> uy -> u
- scalePt :: ScalingContext ux uy u -> ux -> uy -> Point2 u
- scaleVec :: ScalingContext ux uy u -> ux -> uy -> Vec2 u
- unitX :: Num ux => ScalingContext ux uy u -> u
- unitY :: Num uy => ScalingContext ux uy u -> u
- uniformScaling :: Num u => u -> ScalingContext u u u
- coordinateScaling :: Num u => u -> u -> ScalingContext Int Int u
Documentation
data ScalingContext ux uy u Source
ScalingContext is a dictionary of two functions for scaling in X and Y.
ScalingContext | |
|
scaleX :: ScalingContext ux uy u -> ux -> uSource
scaleY :: ScalingContext ux uy u -> uy -> uSource
scalePt :: ScalingContext ux uy u -> ux -> uy -> Point2 uSource
scaleVec :: ScalingContext ux uy u -> ux -> uy -> Vec2 uSource
unitX :: Num ux => ScalingContext ux uy u -> uSource
unitY :: Num uy => ScalingContext ux uy u -> uSource
uniformScaling :: Num u => u -> ScalingContext u u uSource
Build a ScalingContext where both X and Y are scaled by the same uniform step.
The dimensions (types) of the ScalingContext are unified - the output type and the input types are all the same.
coordinateScaling :: Num u => u -> u -> ScalingContext Int Int uSource
Build a ScalingContext for scaling Int coordinates.
The scaling factors in X and Y can be different sizes.