{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGPathElement
(getTotalLength, getTotalLength_, getPointAtLength,
getPointAtLength_, getPathSegAtLength, getPathSegAtLength_,
createSVGPathSegClosePath, createSVGPathSegClosePath_,
createSVGPathSegMovetoAbs, createSVGPathSegMovetoAbs_,
createSVGPathSegMovetoRel, createSVGPathSegMovetoRel_,
createSVGPathSegLinetoAbs, createSVGPathSegLinetoAbs_,
createSVGPathSegLinetoRel, createSVGPathSegLinetoRel_,
createSVGPathSegCurvetoCubicAbs, createSVGPathSegCurvetoCubicAbs_,
createSVGPathSegCurvetoCubicRel, createSVGPathSegCurvetoCubicRel_,
createSVGPathSegCurvetoQuadraticAbs,
createSVGPathSegCurvetoQuadraticAbs_,
createSVGPathSegCurvetoQuadraticRel,
createSVGPathSegCurvetoQuadraticRel_, createSVGPathSegArcAbs,
createSVGPathSegArcAbs_, createSVGPathSegArcRel,
createSVGPathSegArcRel_, createSVGPathSegLinetoHorizontalAbs,
createSVGPathSegLinetoHorizontalAbs_,
createSVGPathSegLinetoHorizontalRel,
createSVGPathSegLinetoHorizontalRel_,
createSVGPathSegLinetoVerticalAbs,
createSVGPathSegLinetoVerticalAbs_,
createSVGPathSegLinetoVerticalRel,
createSVGPathSegLinetoVerticalRel_,
createSVGPathSegCurvetoCubicSmoothAbs,
createSVGPathSegCurvetoCubicSmoothAbs_,
createSVGPathSegCurvetoCubicSmoothRel,
createSVGPathSegCurvetoCubicSmoothRel_,
createSVGPathSegCurvetoQuadraticSmoothAbs,
createSVGPathSegCurvetoQuadraticSmoothAbs_,
createSVGPathSegCurvetoQuadraticSmoothRel,
createSVGPathSegCurvetoQuadraticSmoothRel_, getPathLength,
getPathSegList, getNormalizedPathSegList, getAnimatedPathSegList,
getAnimatedNormalizedPathSegList, SVGPathElement(..),
gTypeSVGPathElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Enums
getTotalLength :: (MonadDOM m) => SVGPathElement -> m Float
getTotalLength self
= liftDOM
(realToFrac <$>
((self ^. jsf "getTotalLength" ()) >>= valToNumber))
getTotalLength_ :: (MonadDOM m) => SVGPathElement -> m ()
getTotalLength_ self
= liftDOM (void (self ^. jsf "getTotalLength" ()))
getPointAtLength ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m SVGPoint
getPointAtLength self distance
= liftDOM
((self ^. jsf "getPointAtLength" [toJSVal distance]) >>=
fromJSValUnchecked)
getPointAtLength_ ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m ()
getPointAtLength_ self distance
= liftDOM
(void (self ^. jsf "getPointAtLength" [toJSVal distance]))
getPathSegAtLength ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m Word
getPathSegAtLength self distance
= liftDOM
(round <$>
((self ^. jsf "getPathSegAtLength" [toJSVal distance]) >>=
valToNumber))
getPathSegAtLength_ ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m ()
getPathSegAtLength_ self distance
= liftDOM
(void (self ^. jsf "getPathSegAtLength" [toJSVal distance]))
createSVGPathSegClosePath ::
(MonadDOM m) => SVGPathElement -> m SVGPathSegClosePath
createSVGPathSegClosePath self
= liftDOM
((self ^. jsf "createSVGPathSegClosePath" ()) >>=
fromJSValUnchecked)
createSVGPathSegClosePath_ ::
(MonadDOM m) => SVGPathElement -> m ()
createSVGPathSegClosePath_ self
= liftDOM (void (self ^. jsf "createSVGPathSegClosePath" ()))
createSVGPathSegMovetoAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float -> Maybe Float -> m SVGPathSegMovetoAbs
createSVGPathSegMovetoAbs self x y
= liftDOM
((self ^. jsf "createSVGPathSegMovetoAbs" [toJSVal x, toJSVal y])
>>= fromJSValUnchecked)
createSVGPathSegMovetoAbs_ ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegMovetoAbs_ self x y
= liftDOM
(void
(self ^. jsf "createSVGPathSegMovetoAbs" [toJSVal x, toJSVal y]))
createSVGPathSegMovetoRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float -> Maybe Float -> m SVGPathSegMovetoRel
createSVGPathSegMovetoRel self x y
= liftDOM
((self ^. jsf "createSVGPathSegMovetoRel" [toJSVal x, toJSVal y])
>>= fromJSValUnchecked)
createSVGPathSegMovetoRel_ ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegMovetoRel_ self x y
= liftDOM
(void
(self ^. jsf "createSVGPathSegMovetoRel" [toJSVal x, toJSVal y]))
createSVGPathSegLinetoAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float -> Maybe Float -> m SVGPathSegLinetoAbs
createSVGPathSegLinetoAbs self x y
= liftDOM
((self ^. jsf "createSVGPathSegLinetoAbs" [toJSVal x, toJSVal y])
>>= fromJSValUnchecked)
createSVGPathSegLinetoAbs_ ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegLinetoAbs_ self x y
= liftDOM
(void
(self ^. jsf "createSVGPathSegLinetoAbs" [toJSVal x, toJSVal y]))
createSVGPathSegLinetoRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float -> Maybe Float -> m SVGPathSegLinetoRel
createSVGPathSegLinetoRel self x y
= liftDOM
((self ^. jsf "createSVGPathSegLinetoRel" [toJSVal x, toJSVal y])
>>= fromJSValUnchecked)
createSVGPathSegLinetoRel_ ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegLinetoRel_ self x y
= liftDOM
(void
(self ^. jsf "createSVGPathSegLinetoRel" [toJSVal x, toJSVal y]))
createSVGPathSegCurvetoCubicAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoCubicAbs
createSVGPathSegCurvetoCubicAbs self x y x1 y1 x2 y2
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoCubicAbs"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1, toJSVal x2,
toJSVal y2])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoCubicAbs_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoCubicAbs_ self x y x1 y1 x2 y2
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoCubicAbs"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1, toJSVal x2,
toJSVal y2]))
createSVGPathSegCurvetoCubicRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoCubicRel
createSVGPathSegCurvetoCubicRel self x y x1 y1 x2 y2
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoCubicRel"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1, toJSVal x2,
toJSVal y2])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoCubicRel_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoCubicRel_ self x y x1 y1 x2 y2
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoCubicRel"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1, toJSVal x2,
toJSVal y2]))
createSVGPathSegCurvetoQuadraticAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoQuadraticAbs
createSVGPathSegCurvetoQuadraticAbs self x y x1 y1
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoQuadraticAbs"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoQuadraticAbs_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoQuadraticAbs_ self x y x1 y1
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoQuadraticAbs"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1]))
createSVGPathSegCurvetoQuadraticRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoQuadraticRel
createSVGPathSegCurvetoQuadraticRel self x y x1 y1
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoQuadraticRel"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoQuadraticRel_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoQuadraticRel_ self x y x1 y1
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoQuadraticRel"
[toJSVal x, toJSVal y, toJSVal x1, toJSVal y1]))
createSVGPathSegArcAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> Maybe Float -> Bool -> Bool -> m SVGPathSegArcAbs
createSVGPathSegArcAbs self x y r1 r2 angle largeArcFlag sweepFlag
= liftDOM
((self ^. jsf "createSVGPathSegArcAbs"
[toJSVal x, toJSVal y, toJSVal r1, toJSVal r2, toJSVal angle,
toJSVal largeArcFlag, toJSVal sweepFlag])
>>= fromJSValUnchecked)
createSVGPathSegArcAbs_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> Bool -> Bool -> m ()
createSVGPathSegArcAbs_ self x y r1 r2 angle largeArcFlag sweepFlag
= liftDOM
(void
(self ^. jsf "createSVGPathSegArcAbs"
[toJSVal x, toJSVal y, toJSVal r1, toJSVal r2, toJSVal angle,
toJSVal largeArcFlag, toJSVal sweepFlag]))
createSVGPathSegArcRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> Maybe Float -> Bool -> Bool -> m SVGPathSegArcRel
createSVGPathSegArcRel self x y r1 r2 angle largeArcFlag sweepFlag
= liftDOM
((self ^. jsf "createSVGPathSegArcRel"
[toJSVal x, toJSVal y, toJSVal r1, toJSVal r2, toJSVal angle,
toJSVal largeArcFlag, toJSVal sweepFlag])
>>= fromJSValUnchecked)
createSVGPathSegArcRel_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> Bool -> Bool -> m ()
createSVGPathSegArcRel_ self x y r1 r2 angle largeArcFlag sweepFlag
= liftDOM
(void
(self ^. jsf "createSVGPathSegArcRel"
[toJSVal x, toJSVal y, toJSVal r1, toJSVal r2, toJSVal angle,
toJSVal largeArcFlag, toJSVal sweepFlag]))
createSVGPathSegLinetoHorizontalAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float -> m SVGPathSegLinetoHorizontalAbs
createSVGPathSegLinetoHorizontalAbs self x
= liftDOM
((self ^. jsf "createSVGPathSegLinetoHorizontalAbs" [toJSVal x])
>>= fromJSValUnchecked)
createSVGPathSegLinetoHorizontalAbs_ ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m ()
createSVGPathSegLinetoHorizontalAbs_ self x
= liftDOM
(void
(self ^. jsf "createSVGPathSegLinetoHorizontalAbs" [toJSVal x]))
createSVGPathSegLinetoHorizontalRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float -> m SVGPathSegLinetoHorizontalRel
createSVGPathSegLinetoHorizontalRel self x
= liftDOM
((self ^. jsf "createSVGPathSegLinetoHorizontalRel" [toJSVal x])
>>= fromJSValUnchecked)
createSVGPathSegLinetoHorizontalRel_ ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m ()
createSVGPathSegLinetoHorizontalRel_ self x
= liftDOM
(void
(self ^. jsf "createSVGPathSegLinetoHorizontalRel" [toJSVal x]))
createSVGPathSegLinetoVerticalAbs ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> m SVGPathSegLinetoVerticalAbs
createSVGPathSegLinetoVerticalAbs self y
= liftDOM
((self ^. jsf "createSVGPathSegLinetoVerticalAbs" [toJSVal y]) >>=
fromJSValUnchecked)
createSVGPathSegLinetoVerticalAbs_ ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m ()
createSVGPathSegLinetoVerticalAbs_ self y
= liftDOM
(void
(self ^. jsf "createSVGPathSegLinetoVerticalAbs" [toJSVal y]))
createSVGPathSegLinetoVerticalRel ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> m SVGPathSegLinetoVerticalRel
createSVGPathSegLinetoVerticalRel self y
= liftDOM
((self ^. jsf "createSVGPathSegLinetoVerticalRel" [toJSVal y]) >>=
fromJSValUnchecked)
createSVGPathSegLinetoVerticalRel_ ::
(MonadDOM m) => SVGPathElement -> Maybe Float -> m ()
createSVGPathSegLinetoVerticalRel_ self y
= liftDOM
(void
(self ^. jsf "createSVGPathSegLinetoVerticalRel" [toJSVal y]))
createSVGPathSegCurvetoCubicSmoothAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoCubicSmoothAbs
createSVGPathSegCurvetoCubicSmoothAbs self x y x2 y2
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoCubicSmoothAbs"
[toJSVal x, toJSVal y, toJSVal x2, toJSVal y2])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoCubicSmoothAbs_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoCubicSmoothAbs_ self x y x2 y2
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoCubicSmoothAbs"
[toJSVal x, toJSVal y, toJSVal x2, toJSVal y2]))
createSVGPathSegCurvetoCubicSmoothRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoCubicSmoothRel
createSVGPathSegCurvetoCubicSmoothRel self x y x2 y2
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoCubicSmoothRel"
[toJSVal x, toJSVal y, toJSVal x2, toJSVal y2])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoCubicSmoothRel_ ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoCubicSmoothRel_ self x y x2 y2
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoCubicSmoothRel"
[toJSVal x, toJSVal y, toJSVal x2, toJSVal y2]))
createSVGPathSegCurvetoQuadraticSmoothAbs ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoQuadraticSmoothAbs
createSVGPathSegCurvetoQuadraticSmoothAbs self x y
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoQuadraticSmoothAbs"
[toJSVal x, toJSVal y])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoQuadraticSmoothAbs_ ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoQuadraticSmoothAbs_ self x y
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoQuadraticSmoothAbs"
[toJSVal x, toJSVal y]))
createSVGPathSegCurvetoQuadraticSmoothRel ::
(MonadDOM m) =>
SVGPathElement ->
Maybe Float ->
Maybe Float -> m SVGPathSegCurvetoQuadraticSmoothRel
createSVGPathSegCurvetoQuadraticSmoothRel self x y
= liftDOM
((self ^. jsf "createSVGPathSegCurvetoQuadraticSmoothRel"
[toJSVal x, toJSVal y])
>>= fromJSValUnchecked)
createSVGPathSegCurvetoQuadraticSmoothRel_ ::
(MonadDOM m) =>
SVGPathElement -> Maybe Float -> Maybe Float -> m ()
createSVGPathSegCurvetoQuadraticSmoothRel_ self x y
= liftDOM
(void
(self ^. jsf "createSVGPathSegCurvetoQuadraticSmoothRel"
[toJSVal x, toJSVal y]))
getPathLength ::
(MonadDOM m) => SVGPathElement -> m SVGAnimatedNumber
getPathLength self
= liftDOM ((self ^. js "pathLength") >>= fromJSValUnchecked)
getPathSegList ::
(MonadDOM m) => SVGPathElement -> m SVGPathSegList
getPathSegList self
= liftDOM ((self ^. js "pathSegList") >>= fromJSValUnchecked)
getNormalizedPathSegList ::
(MonadDOM m) => SVGPathElement -> m SVGPathSegList
getNormalizedPathSegList self
= liftDOM
((self ^. js "normalizedPathSegList") >>= fromJSValUnchecked)
getAnimatedPathSegList ::
(MonadDOM m) => SVGPathElement -> m SVGPathSegList
getAnimatedPathSegList self
= liftDOM
((self ^. js "animatedPathSegList") >>= fromJSValUnchecked)
getAnimatedNormalizedPathSegList ::
(MonadDOM m) => SVGPathElement -> m SVGPathSegList
getAnimatedNormalizedPathSegList self
= liftDOM
((self ^. js "animatedNormalizedPathSegList") >>=
fromJSValUnchecked)