jsaddle-dom-0.10.0.0: src/JSDOM/Generated/CanvasDrawPath.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module JSDOM.Generated.CanvasDrawPath
(beginPath, clip, clipPath, fill, fillPath, isPointInPath, isPointInPath_, isPointInPathPath, isPointInPathPath_, isPointInStroke, isPointInStroke_, isPointInStrokePath, isPointInStrokePath_, stroke, strokePath, CanvasDrawPath(..), gTypeCanvasDrawPath, IsCanvasDrawPath, toCanvasDrawPath)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/beginPath MDN CanvasDrawPath.beginPath documentation>
beginPath :: (MonadDOM m, IsCanvasDrawPath self) => self -> m ()
beginPath self = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "beginPath" ()))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip MDN CanvasDrawPath.clip documentation>
clip :: (MonadDOM m, IsCanvasDrawPath self) => self -> Maybe CanvasFillRule -> m ()
clip self fillRule = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "clip" [P.maybe (P.return jsUndefined) toJSVal fillRule]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip MDN CanvasDrawPath.clip documentation>
clipPath :: (MonadDOM m, IsCanvasDrawPath self) => self -> Path2D -> Maybe CanvasFillRule -> m ()
clipPath self path fillRule = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "clip" [toJSVal path, P.maybe (P.return jsUndefined) toJSVal fillRule]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill MDN CanvasDrawPath.fill documentation>
fill :: (MonadDOM m, IsCanvasDrawPath self) => self -> Maybe CanvasFillRule -> m ()
fill self fillRule = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "fill" [P.maybe (P.return jsUndefined) toJSVal fillRule]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill MDN CanvasDrawPath.fill documentation>
fillPath :: (MonadDOM m, IsCanvasDrawPath self) => self -> Path2D -> Maybe CanvasFillRule -> m ()
fillPath self path fillRule = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "fill" [toJSVal path, P.maybe (P.return jsUndefined) toJSVal fillRule]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath MDN CanvasDrawPath.isPointInPath documentation>
isPointInPath :: (MonadDOM m, IsCanvasDrawPath self) => self -> Double -> Double -> Maybe CanvasFillRule -> m Bool
isPointInPath self x y fillRule = liftDOM ((((Types.toCanvasDrawPath self) ^. jsf "isPointInPath" [toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal fillRule]) >>= valToBool))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath MDN CanvasDrawPath.isPointInPath documentation>
isPointInPath_ :: (MonadDOM m, IsCanvasDrawPath self) => self -> Double -> Double -> Maybe CanvasFillRule -> m ()
isPointInPath_ self x y fillRule = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "isPointInPath" [toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal fillRule]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath MDN CanvasDrawPath.isPointInPath documentation>
isPointInPathPath :: (MonadDOM m, IsCanvasDrawPath self) => self -> Path2D -> Double -> Double -> Maybe CanvasFillRule -> m Bool
isPointInPathPath self path x y fillRule = liftDOM ((((Types.toCanvasDrawPath self) ^. jsf "isPointInPath" [toJSVal path, toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal fillRule]) >>= valToBool))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath MDN CanvasDrawPath.isPointInPath documentation>
isPointInPathPath_ :: (MonadDOM m, IsCanvasDrawPath self) => self -> Path2D -> Double -> Double -> Maybe CanvasFillRule -> m ()
isPointInPathPath_ self path x y fillRule = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "isPointInPath" [toJSVal path, toJSVal x, toJSVal y, P.maybe (P.return jsUndefined) toJSVal fillRule]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke MDN CanvasDrawPath.isPointInStroke documentation>
isPointInStroke :: (MonadDOM m, IsCanvasDrawPath self) => self -> Double -> Double -> m Bool
isPointInStroke self x y = liftDOM ((((Types.toCanvasDrawPath self) ^. jsf "isPointInStroke" [toJSVal x, toJSVal y]) >>= valToBool))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke MDN CanvasDrawPath.isPointInStroke documentation>
isPointInStroke_ :: (MonadDOM m, IsCanvasDrawPath self) => self -> Double -> Double -> m ()
isPointInStroke_ self x y = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "isPointInStroke" [toJSVal x, toJSVal y]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke MDN CanvasDrawPath.isPointInStroke documentation>
isPointInStrokePath :: (MonadDOM m, IsCanvasDrawPath self) => self -> Path2D -> Double -> Double -> m Bool
isPointInStrokePath self path x y = liftDOM ((((Types.toCanvasDrawPath self) ^. jsf "isPointInStroke" [toJSVal path, toJSVal x, toJSVal y]) >>= valToBool))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke MDN CanvasDrawPath.isPointInStroke documentation>
isPointInStrokePath_ :: (MonadDOM m, IsCanvasDrawPath self) => self -> Path2D -> Double -> Double -> m ()
isPointInStrokePath_ self path x y = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "isPointInStroke" [toJSVal path, toJSVal x, toJSVal y]))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke MDN CanvasDrawPath.stroke documentation>
stroke :: (MonadDOM m, IsCanvasDrawPath self) => self -> m ()
stroke self = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "stroke" ()))
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke MDN CanvasDrawPath.stroke documentation>
strokePath :: (MonadDOM m, IsCanvasDrawPath self) => self -> Path2D -> m ()
strokePath self path = liftDOM (void ((Types.toCanvasDrawPath self) ^. jsf "stroke" [toJSVal path]))