reflex-dom-svg-0.3.2.0: Reflex functions for SVG elements.

Safe HaskellNone
LanguageHaskell2010

Reflex.Dom.Widget.SVG.Types.Pos

Contents

Description

Pos is a general purpose wrapper for a specific positional value.

Synopsis

Documentation

data Pos p Source #

Wrap up the normal Float value with a newtype so that we can't mix things up as easily. Include a phantom type so we're able to be granular about the specific position we're interested in.

Instances
Eq (Pos p) Source # 
Instance details

Defined in Reflex.Dom.Widget.SVG.Types.Pos

Methods

(==) :: Pos p -> Pos p -> Bool #

(/=) :: Pos p -> Pos p -> Bool #

Show (Pos p) Source # 
Instance details

Defined in Reflex.Dom.Widget.SVG.Types.Pos

Methods

showsPrec :: Int -> Pos p -> ShowS #

show :: Pos p -> String #

showList :: [Pos p] -> ShowS #

Wrapped (Pos p) Source # 
Instance details

Defined in Reflex.Dom.Widget.SVG.Types.Pos

Associated Types

type Unwrapped (Pos p) :: * #

Methods

_Wrapped' :: Iso' (Pos p) (Unwrapped (Pos p)) #

Pos p ~ t => Rewrapped (Pos p) t Source # 
Instance details

Defined in Reflex.Dom.Widget.SVG.Types.Pos

type Unwrapped (Pos p) Source # 
Instance details

Defined in Reflex.Dom.Widget.SVG.Types.Pos

type Unwrapped (Pos p) = Float

Empty types to separate coordinate spaces

data X Source #

data Y Source #

Prisms

_PosX :: Iso' (Pos X) Float Source #

Specific Iso for describing a X coordinate

_PosY :: Iso' (Pos Y) Float Source #

Specific Iso for describing a Y coordinate

_PosCenterX :: Iso' (Pos CenterX) Float Source #

Specific Iso for describing a centered X coordinate

_PosCenterY :: Iso' (Pos CenterY) Float Source #

Specific Iso for describing a centered Y coordinate

Functions

changePosType :: Pos a -> Pos b Source #

Change the Pos index type

makePointsProp :: NonEmpty (Pos X, Pos Y) -> Text Source #

Convert the list of points to a correctly formatted list of X/Y positions expected by SVG attributes.