module JSDOM.Generated.CanvasPath
(closePath, moveTo, lineTo, quadraticCurveTo, bezierCurveTo, arcTo,
rect, arc, ellipse, CanvasPath(..), gTypeCanvasPath, IsCanvasPath,
toCanvasPath)
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)
import JSDOM.Enums
closePath :: (MonadDOM m, IsCanvasPath self) => self -> m ()
closePath self
= liftDOM (void ((toCanvasPath self) ^. jsf "closePath" ()))
moveTo ::
(MonadDOM m, IsCanvasPath self) => self -> Double -> Double -> m ()
moveTo self x y
= liftDOM
(void ((toCanvasPath self) ^. jsf "moveTo" [toJSVal x, toJSVal y]))
lineTo ::
(MonadDOM m, IsCanvasPath self) => self -> Double -> Double -> m ()
lineTo self x y
= liftDOM
(void ((toCanvasPath self) ^. jsf "lineTo" [toJSVal x, toJSVal y]))
quadraticCurveTo ::
(MonadDOM m, IsCanvasPath self) =>
self -> Double -> Double -> Double -> Double -> m ()
quadraticCurveTo self cpx cpy x y
= liftDOM
(void
((toCanvasPath self) ^. jsf "quadraticCurveTo"
[toJSVal cpx, toJSVal cpy, toJSVal x, toJSVal y]))
bezierCurveTo ::
(MonadDOM m, IsCanvasPath self) =>
self ->
Double -> Double -> Double -> Double -> Double -> Double -> m ()
bezierCurveTo self cp1x cp1y cp2x cp2y x y
= liftDOM
(void
((toCanvasPath self) ^. jsf "bezierCurveTo"
[toJSVal cp1x, toJSVal cp1y, toJSVal cp2x, toJSVal cp2y, toJSVal x,
toJSVal y]))
arcTo ::
(MonadDOM m, IsCanvasPath self) =>
self -> Double -> Double -> Double -> Double -> Double -> m ()
arcTo self x1 y1 x2 y2 radius
= liftDOM
(void
((toCanvasPath self) ^. jsf "arcTo"
[toJSVal x1, toJSVal y1, toJSVal x2, toJSVal y2, toJSVal radius]))
rect ::
(MonadDOM m, IsCanvasPath self) =>
self -> Double -> Double -> Double -> Double -> m ()
rect self x y w h
= liftDOM
(void
((toCanvasPath self) ^. jsf "rect"
[toJSVal x, toJSVal y, toJSVal w, toJSVal h]))
arc ::
(MonadDOM m, IsCanvasPath self) =>
self ->
Double -> Double -> Double -> Double -> Double -> Bool -> m ()
arc self x y radius startAngle endAngle anticlockwise
= liftDOM
(void
((toCanvasPath self) ^. jsf "arc"
[toJSVal x, toJSVal y, toJSVal radius, toJSVal startAngle,
toJSVal endAngle, toJSVal anticlockwise]))
ellipse ::
(MonadDOM m, IsCanvasPath self) =>
self ->
Double ->
Double ->
Double -> Double -> Double -> Double -> Double -> Bool -> m ()
ellipse self x y radiusX radiusY rotation startAngle endAngle
anticlockwise
= liftDOM
(void
((toCanvasPath self) ^. jsf "ellipse"
[toJSVal x, toJSVal y, toJSVal radiusX, toJSVal radiusY,
toJSVal rotation, toJSVal startAngle, toJSVal endAngle,
toJSVal anticlockwise]))