{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.CanvasRenderingContext2D
       (save, restore, commit, scale, rotate, translate, transform,
        setTransform, resetTransform, setLineDash, getLineDash,
        getLineDash_, clearRect, fillRect, beginPath, fillPath, strokePath,
        clipPath, fill, stroke, clip, isPointInPathPath,
        isPointInPathPath_, isPointInStrokePath, isPointInStrokePath_,
        isPointInPath, isPointInPath_, isPointInStroke, isPointInStroke_,
        measureText, measureText_, setAlpha, setCompositeOperation,
        setLineWidthFunction, setLineCapFunction, setLineJoinFunction,
        setMiterLimitFunction, clearShadow, fillText, strokeText,
        setStrokeColor, setStrokeColorGray, setStrokeColorRGB,
        setStrokeColorCYMK, setFillColor, setFillColorGray,
        setFillColorRGB, setFillColorCYMK, strokeRect, drawImage,
        drawImageScaled, drawImagePart, drawImageFromRect, setShadow,
        setShadowGray, setShadowRGB, setShadowCYMK, putImageData,
        putImageDataDirty, webkitPutImageDataHD, webkitPutImageDataHDDirty,
        createImageData, createImageData_, createImageDataSize,
        createImageDataSize_, createLinearGradient, createLinearGradient_,
        createRadialGradient, createRadialGradient_, createPattern,
        createPattern_, createPatternUnsafe, createPatternUnchecked,
        getImageData, getImageData_, webkitGetImageDataHD,
        webkitGetImageDataHD_, drawFocusIfNeeded, drawFocusIfNeededPath,
        getCanvas, setGlobalAlpha, getGlobalAlpha,
        setGlobalCompositeOperation, getGlobalCompositeOperation,
        setLineWidth, getLineWidth, setLineCap, getLineCap, setLineJoin,
        getLineJoin, setMiterLimit, getMiterLimit, setShadowOffsetX,
        getShadowOffsetX, setShadowOffsetY, getShadowOffsetY,
        setShadowBlur, getShadowBlur, setShadowColor, getShadowColor,
        setLineDashOffset, getLineDashOffset, setWebkitLineDash,
        getWebkitLineDash, setWebkitLineDashOffset,
        getWebkitLineDashOffset, setFont, getFont, setTextAlign,
        getTextAlign, setTextBaseline, getTextBaseline, setDirection,
        getDirection, setStrokeStyle, getStrokeStyle, setFillStyle,
        getFillStyle, getWebkitBackingStorePixelRatio,
        setImageSmoothingEnabled, getImageSmoothingEnabled,
        setWebkitImageSmoothingEnabled, getWebkitImageSmoothingEnabled,
        setImageSmoothingQuality, getImageSmoothingQuality,
        CanvasRenderingContext2D(..), gTypeCanvasRenderingContext2D)
       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

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.save Mozilla CanvasRenderingContext2D.save documentation> 
save :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
save :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
save CanvasRenderingContext2D
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"save" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.restore Mozilla CanvasRenderingContext2D.restore documentation> 
restore :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
restore :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
restore CanvasRenderingContext2D
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"restore" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.commit Mozilla CanvasRenderingContext2D.commit documentation> 
commit :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
commit :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
commit CanvasRenderingContext2D
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"commit" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.scale Mozilla CanvasRenderingContext2D.scale documentation> 
scale ::
      (MonadDOM m) => CanvasRenderingContext2D -> Float -> Float -> m ()
scale :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Float -> m ()
scale CanvasRenderingContext2D
self Float
sx Float
sy
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"scale" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sy]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.rotate Mozilla CanvasRenderingContext2D.rotate documentation> 
rotate :: (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
rotate :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
rotate CanvasRenderingContext2D
self Float
angle
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"rotate" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
angle]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.translate Mozilla CanvasRenderingContext2D.translate documentation> 
translate ::
          (MonadDOM m) => CanvasRenderingContext2D -> Float -> Float -> m ()
translate :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Float -> m ()
translate CanvasRenderingContext2D
self Float
tx Float
ty
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"translate" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
tx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
ty]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.transform Mozilla CanvasRenderingContext2D.transform documentation> 
transform ::
          (MonadDOM m) =>
            CanvasRenderingContext2D ->
              Float -> Float -> Float -> Float -> Float -> Float -> m ()
transform :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> Float -> Float -> m ()
transform CanvasRenderingContext2D
self Float
m11 Float
m12 Float
m21 Float
m22 Float
dx Float
dy
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"transform"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m11, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m12, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m21, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m22, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dx,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dy]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setTransform Mozilla CanvasRenderingContext2D.setTransform documentation> 
setTransform ::
             (MonadDOM m) =>
               CanvasRenderingContext2D ->
                 Float -> Float -> Float -> Float -> Float -> Float -> m ()
setTransform :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> Float -> Float -> m ()
setTransform CanvasRenderingContext2D
self Float
m11 Float
m12 Float
m21 Float
m22 Float
dx Float
dy
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setTransform"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m11, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m12, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m21, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m22, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dx,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dy]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.resetTransform Mozilla CanvasRenderingContext2D.resetTransform documentation> 
resetTransform :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
resetTransform :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
resetTransform CanvasRenderingContext2D
self
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"resetTransform" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setLineDash Mozilla CanvasRenderingContext2D.setLineDash documentation> 
setLineDash ::
            (MonadDOM m) => CanvasRenderingContext2D -> [Float] -> m ()
setLineDash :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> [Float] -> m ()
setLineDash CanvasRenderingContext2D
self [Float]
dash
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setLineDash" [JSM Object -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ([Float] -> JSM Object
forall args. MakeArgs args => args -> JSM Object
array [Float]
dash)]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.getLineDash Mozilla CanvasRenderingContext2D.getLineDash documentation> 
getLineDash ::
            (MonadDOM m) => CanvasRenderingContext2D -> m [Float]
getLineDash :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m [Float]
getLineDash CanvasRenderingContext2D
self
  = DOM [Float] -> m [Float]
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getLineDash" ()) JSM JSVal -> (JSVal -> DOM [Float]) -> DOM [Float]
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM [Float]
forall o. FromJSVal o => JSVal -> JSM [o]
fromJSArrayUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.getLineDash Mozilla CanvasRenderingContext2D.getLineDash documentation> 
getLineDash_ :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
getLineDash_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
getLineDash_ CanvasRenderingContext2D
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getLineDash" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.clearRect Mozilla CanvasRenderingContext2D.clearRect documentation> 
clearRect ::
          (MonadDOM m) =>
            CanvasRenderingContext2D ->
              Float -> Float -> Float -> Float -> m ()
clearRect :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
clearRect CanvasRenderingContext2D
self Float
x Float
y Float
width Float
height
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"clearRect"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.fillRect Mozilla CanvasRenderingContext2D.fillRect documentation> 
fillRect ::
         (MonadDOM m) =>
           CanvasRenderingContext2D ->
             Float -> Float -> Float -> Float -> m ()
fillRect :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
fillRect CanvasRenderingContext2D
self Float
x Float
y Float
width Float
height
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"fillRect"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.beginPath Mozilla CanvasRenderingContext2D.beginPath documentation> 
beginPath :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
beginPath :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
beginPath CanvasRenderingContext2D
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"beginPath" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.fill Mozilla CanvasRenderingContext2D.fill documentation> 
fillPath ::
         (MonadDOM m) =>
           CanvasRenderingContext2D ->
             Path2D -> Maybe CanvasWindingRule -> m ()
fillPath :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Path2D -> Maybe CanvasWindingRule -> m ()
fillPath CanvasRenderingContext2D
self Path2D
path Maybe CanvasWindingRule
winding
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"fill" [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path, Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.stroke Mozilla CanvasRenderingContext2D.stroke documentation> 
strokePath ::
           (MonadDOM m) => CanvasRenderingContext2D -> Path2D -> m ()
strokePath :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Path2D -> m ()
strokePath CanvasRenderingContext2D
self Path2D
path
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"stroke" [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.clip Mozilla CanvasRenderingContext2D.clip documentation> 
clipPath ::
         (MonadDOM m) =>
           CanvasRenderingContext2D ->
             Path2D -> Maybe CanvasWindingRule -> m ()
clipPath :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Path2D -> Maybe CanvasWindingRule -> m ()
clipPath CanvasRenderingContext2D
self Path2D
path Maybe CanvasWindingRule
winding
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"clip" [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path, Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.fill Mozilla CanvasRenderingContext2D.fill documentation> 
fill ::
     (MonadDOM m) =>
       CanvasRenderingContext2D -> Maybe CanvasWindingRule -> m ()
fill :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Maybe CanvasWindingRule -> m ()
fill CanvasRenderingContext2D
self Maybe CanvasWindingRule
winding
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"fill" [Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.stroke Mozilla CanvasRenderingContext2D.stroke documentation> 
stroke :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
stroke :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
stroke CanvasRenderingContext2D
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"stroke" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.clip Mozilla CanvasRenderingContext2D.clip documentation> 
clip ::
     (MonadDOM m) =>
       CanvasRenderingContext2D -> Maybe CanvasWindingRule -> m ()
clip :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Maybe CanvasWindingRule -> m ()
clip CanvasRenderingContext2D
self Maybe CanvasWindingRule
winding
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"clip" [Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInPath Mozilla CanvasRenderingContext2D.isPointInPath documentation> 
isPointInPathPath ::
                  (MonadDOM m) =>
                    CanvasRenderingContext2D ->
                      Path2D -> Float -> Float -> Maybe CanvasWindingRule -> m Bool
isPointInPathPath :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Path2D -> Float -> Float -> Maybe CanvasWindingRule -> m Bool
isPointInPathPath CanvasRenderingContext2D
self Path2D
path Float
x Float
y Maybe CanvasWindingRule
winding
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInPath"
          [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding])
         JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInPath Mozilla CanvasRenderingContext2D.isPointInPath documentation> 
isPointInPathPath_ ::
                   (MonadDOM m) =>
                     CanvasRenderingContext2D ->
                       Path2D -> Float -> Float -> Maybe CanvasWindingRule -> m ()
isPointInPathPath_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Path2D -> Float -> Float -> Maybe CanvasWindingRule -> m ()
isPointInPathPath_ CanvasRenderingContext2D
self Path2D
path Float
x Float
y Maybe CanvasWindingRule
winding
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInPath"
            [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInStroke Mozilla CanvasRenderingContext2D.isPointInStroke documentation> 
isPointInStrokePath ::
                    (MonadDOM m) =>
                      CanvasRenderingContext2D -> Path2D -> Float -> Float -> m Bool
isPointInStrokePath :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Path2D -> Float -> Float -> m Bool
isPointInStrokePath CanvasRenderingContext2D
self Path2D
path Float
x Float
y
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInStroke"
          [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y])
         JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInStroke Mozilla CanvasRenderingContext2D.isPointInStroke documentation> 
isPointInStrokePath_ ::
                     (MonadDOM m) =>
                       CanvasRenderingContext2D -> Path2D -> Float -> Float -> m ()
isPointInStrokePath_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Path2D -> Float -> Float -> m ()
isPointInStrokePath_ CanvasRenderingContext2D
self Path2D
path Float
x Float
y
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInStroke"
            [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInPath Mozilla CanvasRenderingContext2D.isPointInPath documentation> 
isPointInPath ::
              (MonadDOM m) =>
                CanvasRenderingContext2D ->
                  Float -> Float -> Maybe CanvasWindingRule -> m Bool
isPointInPath :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Maybe CanvasWindingRule -> m Bool
isPointInPath CanvasRenderingContext2D
self Float
x Float
y Maybe CanvasWindingRule
winding
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInPath"
          [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding])
         JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInPath Mozilla CanvasRenderingContext2D.isPointInPath documentation> 
isPointInPath_ ::
               (MonadDOM m) =>
                 CanvasRenderingContext2D ->
                   Float -> Float -> Maybe CanvasWindingRule -> m ()
isPointInPath_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Maybe CanvasWindingRule -> m ()
isPointInPath_ CanvasRenderingContext2D
self Float
x Float
y Maybe CanvasWindingRule
winding
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInPath"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Maybe CanvasWindingRule -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe CanvasWindingRule
winding]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInStroke Mozilla CanvasRenderingContext2D.isPointInStroke documentation> 
isPointInStroke ::
                (MonadDOM m) =>
                  CanvasRenderingContext2D -> Float -> Float -> m Bool
isPointInStroke :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Float -> m Bool
isPointInStroke CanvasRenderingContext2D
self Float
x Float
y
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInStroke" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y]) JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>=
         JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.isPointInStroke Mozilla CanvasRenderingContext2D.isPointInStroke documentation> 
isPointInStroke_ ::
                 (MonadDOM m) => CanvasRenderingContext2D -> Float -> Float -> m ()
isPointInStroke_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Float -> m ()
isPointInStroke_ CanvasRenderingContext2D
self Float
x Float
y
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"isPointInStroke" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.measureText Mozilla CanvasRenderingContext2D.measureText documentation> 
measureText ::
            (MonadDOM m, ToJSString text) =>
              CanvasRenderingContext2D -> text -> m TextMetrics
measureText :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m TextMetrics
measureText CanvasRenderingContext2D
self text
text
  = DOM TextMetrics -> m TextMetrics
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"measureText" [text -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal text
text]) JSM JSVal -> (JSVal -> DOM TextMetrics) -> DOM TextMetrics
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM TextMetrics
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.measureText Mozilla CanvasRenderingContext2D.measureText documentation> 
measureText_ ::
             (MonadDOM m, ToJSString text) =>
               CanvasRenderingContext2D -> text -> m ()
measureText_ :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
measureText_ CanvasRenderingContext2D
self text
text
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"measureText" [text -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal text
text]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setAlpha Mozilla CanvasRenderingContext2D.setAlpha documentation> 
setAlpha ::
         (MonadDOM m) => CanvasRenderingContext2D -> Maybe Float -> m ()
setAlpha :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Maybe Float -> m ()
setAlpha CanvasRenderingContext2D
self Maybe Float
alpha
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setAlpha" [Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
alpha]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setCompositeOperation Mozilla CanvasRenderingContext2D.setCompositeOperation documentation> 
setCompositeOperation ::
                      (MonadDOM m, ToJSString compositeOperation) =>
                        CanvasRenderingContext2D -> Maybe compositeOperation -> m ()
setCompositeOperation :: forall (m :: * -> *) compositeOperation.
(MonadDOM m, ToJSString compositeOperation) =>
CanvasRenderingContext2D -> Maybe compositeOperation -> m ()
setCompositeOperation CanvasRenderingContext2D
self Maybe compositeOperation
compositeOperation
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setCompositeOperation" [Maybe compositeOperation -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe compositeOperation
compositeOperation]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setLineWidth Mozilla CanvasRenderingContext2D.setLineWidth documentation> 
setLineWidthFunction ::
                     (MonadDOM m) => CanvasRenderingContext2D -> Maybe Float -> m ()
setLineWidthFunction :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Maybe Float -> m ()
setLineWidthFunction CanvasRenderingContext2D
self Maybe Float
width
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setLineWidth" [Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
width]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setLineCap Mozilla CanvasRenderingContext2D.setLineCap documentation> 
setLineCapFunction ::
                   (MonadDOM m, ToJSString cap) =>
                     CanvasRenderingContext2D -> Maybe cap -> m ()
setLineCapFunction :: forall (m :: * -> *) compositeOperation.
(MonadDOM m, ToJSString compositeOperation) =>
CanvasRenderingContext2D -> Maybe compositeOperation -> m ()
setLineCapFunction CanvasRenderingContext2D
self Maybe cap
cap
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setLineCap" [Maybe cap -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe cap
cap]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setLineJoin Mozilla CanvasRenderingContext2D.setLineJoin documentation> 
setLineJoinFunction ::
                    (MonadDOM m, ToJSString join) =>
                      CanvasRenderingContext2D -> Maybe join -> m ()
setLineJoinFunction :: forall (m :: * -> *) compositeOperation.
(MonadDOM m, ToJSString compositeOperation) =>
CanvasRenderingContext2D -> Maybe compositeOperation -> m ()
setLineJoinFunction CanvasRenderingContext2D
self Maybe join
join
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setLineJoin" [Maybe join -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe join
join]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setMiterLimit Mozilla CanvasRenderingContext2D.setMiterLimit documentation> 
setMiterLimitFunction ::
                      (MonadDOM m) => CanvasRenderingContext2D -> Maybe Float -> m ()
setMiterLimitFunction :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Maybe Float -> m ()
setMiterLimitFunction CanvasRenderingContext2D
self Maybe Float
limit
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setMiterLimit" [Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
limit]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.clearShadow Mozilla CanvasRenderingContext2D.clearShadow documentation> 
clearShadow :: (MonadDOM m) => CanvasRenderingContext2D -> m ()
clearShadow :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ()
clearShadow CanvasRenderingContext2D
self = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> () -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"clearShadow" ()))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.fillText Mozilla CanvasRenderingContext2D.fillText documentation> 
fillText ::
         (MonadDOM m, ToJSString text) =>
           CanvasRenderingContext2D ->
             text -> Float -> Float -> Maybe Float -> m ()
fillText :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D
-> text -> Float -> Float -> Maybe Float -> m ()
fillText CanvasRenderingContext2D
self text
text Float
x Float
y Maybe Float
maxWidth
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"fillText"
            [text -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal text
text, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
maxWidth]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.strokeText Mozilla CanvasRenderingContext2D.strokeText documentation> 
strokeText ::
           (MonadDOM m, ToJSString text) =>
             CanvasRenderingContext2D ->
               text -> Float -> Float -> Maybe Float -> m ()
strokeText :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D
-> text -> Float -> Float -> Maybe Float -> m ()
strokeText CanvasRenderingContext2D
self text
text Float
x Float
y Maybe Float
maxWidth
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"strokeText"
            [text -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal text
text, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
maxWidth]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setStrokeColor Mozilla CanvasRenderingContext2D.setStrokeColor documentation> 
setStrokeColor ::
               (MonadDOM m, ToJSString color) =>
                 CanvasRenderingContext2D -> color -> Maybe Float -> m ()
setStrokeColor :: forall (m :: * -> *) color.
(MonadDOM m, ToJSString color) =>
CanvasRenderingContext2D -> color -> Maybe Float -> m ()
setStrokeColor CanvasRenderingContext2D
self color
color Maybe Float
alpha
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setStrokeColor" [color -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal color
color, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
alpha]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setStrokeColor Mozilla CanvasRenderingContext2D.setStrokeColor documentation> 
setStrokeColorGray ::
                   (MonadDOM m) =>
                     CanvasRenderingContext2D -> Float -> Maybe Float -> m ()
setStrokeColorGray :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Maybe Float -> m ()
setStrokeColorGray CanvasRenderingContext2D
self Float
grayLevel Maybe Float
alpha
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setStrokeColor" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
grayLevel, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
alpha]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setStrokeColor Mozilla CanvasRenderingContext2D.setStrokeColor documentation> 
setStrokeColorRGB ::
                  (MonadDOM m) =>
                    CanvasRenderingContext2D ->
                      Float -> Float -> Float -> Float -> m ()
setStrokeColorRGB :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
setStrokeColorRGB CanvasRenderingContext2D
self Float
r Float
g Float
b Float
a
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setStrokeColor"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
r, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
g, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
b, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
a]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setStrokeColor Mozilla CanvasRenderingContext2D.setStrokeColor documentation> 
setStrokeColorCYMK ::
                   (MonadDOM m) =>
                     CanvasRenderingContext2D ->
                       Float -> Float -> Float -> Float -> Float -> m ()
setStrokeColorCYMK :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> Float -> m ()
setStrokeColorCYMK CanvasRenderingContext2D
self Float
c Float
m Float
y Float
k Float
a
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setStrokeColor"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
c, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
k, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
a]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setFillColor Mozilla CanvasRenderingContext2D.setFillColor documentation> 
setFillColor ::
             (MonadDOM m, ToJSString color) =>
               CanvasRenderingContext2D -> color -> Maybe Float -> m ()
setFillColor :: forall (m :: * -> *) color.
(MonadDOM m, ToJSString color) =>
CanvasRenderingContext2D -> color -> Maybe Float -> m ()
setFillColor CanvasRenderingContext2D
self color
color Maybe Float
alpha
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setFillColor" [color -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal color
color, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
alpha]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setFillColor Mozilla CanvasRenderingContext2D.setFillColor documentation> 
setFillColorGray ::
                 (MonadDOM m) =>
                   CanvasRenderingContext2D -> Float -> Maybe Float -> m ()
setFillColorGray :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Maybe Float -> m ()
setFillColorGray CanvasRenderingContext2D
self Float
grayLevel Maybe Float
alpha
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setFillColor" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
grayLevel, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
alpha]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setFillColor Mozilla CanvasRenderingContext2D.setFillColor documentation> 
setFillColorRGB ::
                (MonadDOM m) =>
                  CanvasRenderingContext2D ->
                    Float -> Float -> Float -> Float -> m ()
setFillColorRGB :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
setFillColorRGB CanvasRenderingContext2D
self Float
r Float
g Float
b Float
a
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setFillColor"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
r, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
g, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
b, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
a]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setFillColor Mozilla CanvasRenderingContext2D.setFillColor documentation> 
setFillColorCYMK ::
                 (MonadDOM m) =>
                   CanvasRenderingContext2D ->
                     Float -> Float -> Float -> Float -> Float -> m ()
setFillColorCYMK :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> Float -> m ()
setFillColorCYMK CanvasRenderingContext2D
self Float
c Float
m Float
y Float
k Float
a
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setFillColor"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
c, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
k, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
a]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.strokeRect Mozilla CanvasRenderingContext2D.strokeRect documentation> 
strokeRect ::
           (MonadDOM m) =>
             CanvasRenderingContext2D ->
               Float -> Float -> Float -> Float -> m ()
strokeRect :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
strokeRect CanvasRenderingContext2D
self Float
x Float
y Float
width Float
height
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"strokeRect"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage Mozilla CanvasRenderingContext2D.drawImage documentation> 
drawImage ::
          (MonadDOM m, IsCanvasImageSource image) =>
            CanvasRenderingContext2D -> image -> Float -> Float -> m ()
drawImage :: forall (m :: * -> *) image.
(MonadDOM m, IsCanvasImageSource image) =>
CanvasRenderingContext2D -> image -> Float -> Float -> m ()
drawImage CanvasRenderingContext2D
self image
image Float
x Float
y
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"drawImage" [image -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal image
image, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage Mozilla CanvasRenderingContext2D.drawImage documentation> 
drawImageScaled ::
                (MonadDOM m, IsCanvasImageSource image) =>
                  CanvasRenderingContext2D ->
                    image -> Float -> Float -> Float -> Float -> m ()
drawImageScaled :: forall (m :: * -> *) image.
(MonadDOM m, IsCanvasImageSource image) =>
CanvasRenderingContext2D
-> image -> Float -> Float -> Float -> Float -> m ()
drawImageScaled CanvasRenderingContext2D
self image
image Float
x Float
y Float
width Float
height
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"drawImage"
            [image -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal image
image, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage Mozilla CanvasRenderingContext2D.drawImage documentation> 
drawImagePart ::
              (MonadDOM m, IsCanvasImageSource image) =>
                CanvasRenderingContext2D ->
                  image ->
                    Float ->
                      Float -> Float -> Float -> Float -> Float -> Float -> Float -> m ()
drawImagePart :: forall (m :: * -> *) image.
(MonadDOM m, IsCanvasImageSource image) =>
CanvasRenderingContext2D
-> image
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> m ()
drawImagePart CanvasRenderingContext2D
self image
image Float
sx Float
sy Float
sw Float
sh Float
dx Float
dy Float
dw Float
dh
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"drawImage"
            [image -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal image
image, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sh,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dh]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImageFromRect Mozilla CanvasRenderingContext2D.drawImageFromRect documentation> 
drawImageFromRect ::
                  (MonadDOM m, ToJSString compositeOperation) =>
                    CanvasRenderingContext2D ->
                      HTMLImageElement ->
                        Maybe Float ->
                          Maybe Float ->
                            Maybe Float ->
                              Maybe Float ->
                                Maybe Float ->
                                  Maybe Float ->
                                    Maybe Float -> Maybe Float -> Maybe compositeOperation -> m ()
drawImageFromRect :: forall (m :: * -> *) compositeOperation.
(MonadDOM m, ToJSString compositeOperation) =>
CanvasRenderingContext2D
-> HTMLImageElement
-> Maybe Float
-> Maybe Float
-> Maybe Float
-> Maybe Float
-> Maybe Float
-> Maybe Float
-> Maybe Float
-> Maybe Float
-> Maybe compositeOperation
-> m ()
drawImageFromRect CanvasRenderingContext2D
self HTMLImageElement
image Maybe Float
sx Maybe Float
sy Maybe Float
sw Maybe Float
sh Maybe Float
dx Maybe Float
dy Maybe Float
dw Maybe Float
dh
  Maybe compositeOperation
compositeOperation
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"drawImageFromRect"
            [HTMLImageElement -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal HTMLImageElement
image, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
sx, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
sy, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
sw, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
sh,
             Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
dx, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
dy, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
dw, Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
dh,
             Maybe compositeOperation -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe compositeOperation
compositeOperation]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setShadow Mozilla CanvasRenderingContext2D.setShadow documentation> 
setShadow ::
          (MonadDOM m, ToJSString color) =>
            CanvasRenderingContext2D ->
              Float -> Float -> Float -> Maybe color -> Maybe Float -> m ()
setShadow :: forall (m :: * -> *) color.
(MonadDOM m, ToJSString color) =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Maybe color -> Maybe Float -> m ()
setShadow CanvasRenderingContext2D
self Float
width Float
height Float
blur Maybe color
color Maybe Float
alpha
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setShadow"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
blur, Maybe color -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe color
color,
             Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
alpha]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setShadow Mozilla CanvasRenderingContext2D.setShadow documentation> 
setShadowGray ::
              (MonadDOM m) =>
                CanvasRenderingContext2D ->
                  Float -> Float -> Float -> Float -> Maybe Float -> m ()
setShadowGray :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> Maybe Float -> m ()
setShadowGray CanvasRenderingContext2D
self Float
width Float
height Float
blur Float
grayLevel Maybe Float
alpha
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setShadow"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
blur, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
grayLevel,
             Maybe Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe Float
alpha]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setShadow Mozilla CanvasRenderingContext2D.setShadow documentation> 
setShadowRGB ::
             (MonadDOM m) =>
               CanvasRenderingContext2D ->
                 Float -> Float -> Float -> Float -> Float -> Float -> Float -> m ()
setShadowRGB :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> m ()
setShadowRGB CanvasRenderingContext2D
self Float
width Float
height Float
blur Float
r Float
g Float
b Float
a
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setShadow"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
blur, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
r, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
g,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
b, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
a]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.setShadow Mozilla CanvasRenderingContext2D.setShadow documentation> 
setShadowCYMK ::
              (MonadDOM m) =>
                CanvasRenderingContext2D ->
                  Float ->
                    Float -> Float -> Float -> Float -> Float -> Float -> Float -> m ()
setShadowCYMK :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> m ()
setShadowCYMK CanvasRenderingContext2D
self Float
width Float
height Float
blur Float
c Float
m Float
y Float
k Float
a
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"setShadow"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
width, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
height, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
blur, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
c, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
m,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
k, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
a]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.putImageData Mozilla CanvasRenderingContext2D.putImageData documentation> 
putImageData ::
             (MonadDOM m) =>
               CanvasRenderingContext2D -> ImageData -> Float -> Float -> m ()
putImageData :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> ImageData -> Float -> Float -> m ()
putImageData CanvasRenderingContext2D
self ImageData
imagedata Float
dx Float
dy
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"putImageData"
            [ImageData -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ImageData
imagedata, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dy]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.putImageData Mozilla CanvasRenderingContext2D.putImageData documentation> 
putImageDataDirty ::
                  (MonadDOM m) =>
                    CanvasRenderingContext2D ->
                      ImageData ->
                        Float -> Float -> Float -> Float -> Float -> Float -> m ()
putImageDataDirty :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> ImageData
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> m ()
putImageDataDirty CanvasRenderingContext2D
self ImageData
imagedata Float
dx Float
dy Float
dirtyX Float
dirtyY Float
dirtyWidth
  Float
dirtyHeight
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"putImageData"
            [ImageData -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ImageData
imagedata, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyX,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyY, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyWidth, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyHeight]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitPutImageDataHD Mozilla CanvasRenderingContext2D.webkitPutImageDataHD documentation> 
webkitPutImageDataHD ::
                     (MonadDOM m) =>
                       CanvasRenderingContext2D -> ImageData -> Float -> Float -> m ()
webkitPutImageDataHD :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> ImageData -> Float -> Float -> m ()
webkitPutImageDataHD CanvasRenderingContext2D
self ImageData
imagedata Float
dx Float
dy
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"webkitPutImageDataHD"
            [ImageData -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ImageData
imagedata, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dy]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitPutImageDataHD Mozilla CanvasRenderingContext2D.webkitPutImageDataHD documentation> 
webkitPutImageDataHDDirty ::
                          (MonadDOM m) =>
                            CanvasRenderingContext2D ->
                              ImageData ->
                                Float -> Float -> Float -> Float -> Float -> Float -> m ()
webkitPutImageDataHDDirty :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> ImageData
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> m ()
webkitPutImageDataHDDirty CanvasRenderingContext2D
self ImageData
imagedata Float
dx Float
dy Float
dirtyX Float
dirtyY
  Float
dirtyWidth Float
dirtyHeight
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"webkitPutImageDataHD"
            [ImageData -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ImageData
imagedata, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyX,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyY, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyWidth, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
dirtyHeight]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createImageData Mozilla CanvasRenderingContext2D.createImageData documentation> 
createImageData ::
                (MonadDOM m) =>
                  CanvasRenderingContext2D -> Maybe ImageData -> m ImageData
createImageData :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Maybe ImageData -> m ImageData
createImageData CanvasRenderingContext2D
self Maybe ImageData
imagedata
  = DOM ImageData -> m ImageData
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createImageData" [Maybe ImageData -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe ImageData
imagedata]) JSM JSVal -> (JSVal -> DOM ImageData) -> DOM ImageData
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>=
         JSVal -> DOM ImageData
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createImageData Mozilla CanvasRenderingContext2D.createImageData documentation> 
createImageData_ ::
                 (MonadDOM m) => CanvasRenderingContext2D -> Maybe ImageData -> m ()
createImageData_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Maybe ImageData -> m ()
createImageData_ CanvasRenderingContext2D
self Maybe ImageData
imagedata
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createImageData" [Maybe ImageData -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Maybe ImageData
imagedata]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createImageData Mozilla CanvasRenderingContext2D.createImageData documentation> 
createImageDataSize ::
                    (MonadDOM m) =>
                      CanvasRenderingContext2D -> Float -> Float -> m ImageData
createImageDataSize :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Float -> m ImageData
createImageDataSize CanvasRenderingContext2D
self Float
sw Float
sh
  = DOM ImageData -> m ImageData
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createImageData" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sh]) JSM JSVal -> (JSVal -> DOM ImageData) -> DOM ImageData
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>=
         JSVal -> DOM ImageData
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createImageData Mozilla CanvasRenderingContext2D.createImageData documentation> 
createImageDataSize_ ::
                     (MonadDOM m) => CanvasRenderingContext2D -> Float -> Float -> m ()
createImageDataSize_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> Float -> m ()
createImageDataSize_ CanvasRenderingContext2D
self Float
sw Float
sh
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createImageData" [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sh]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createLinearGradient Mozilla CanvasRenderingContext2D.createLinearGradient documentation> 
createLinearGradient ::
                     (MonadDOM m) =>
                       CanvasRenderingContext2D ->
                         Float -> Float -> Float -> Float -> m CanvasGradient
createLinearGradient :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m CanvasGradient
createLinearGradient CanvasRenderingContext2D
self Float
x0 Float
y0 Float
x1 Float
y1
  = DOM CanvasGradient -> m CanvasGradient
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createLinearGradient"
          [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x1, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y1])
         JSM JSVal -> (JSVal -> DOM CanvasGradient) -> DOM CanvasGradient
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM CanvasGradient
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createLinearGradient Mozilla CanvasRenderingContext2D.createLinearGradient documentation> 
createLinearGradient_ ::
                      (MonadDOM m) =>
                        CanvasRenderingContext2D ->
                          Float -> Float -> Float -> Float -> m ()
createLinearGradient_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
createLinearGradient_ CanvasRenderingContext2D
self Float
x0 Float
y0 Float
x1 Float
y1
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createLinearGradient"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x1, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y1]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createRadialGradient Mozilla CanvasRenderingContext2D.createRadialGradient documentation> 
createRadialGradient ::
                     (MonadDOM m) =>
                       CanvasRenderingContext2D ->
                         Float ->
                           Float -> Float -> Float -> Float -> Float -> m CanvasGradient
createRadialGradient :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> m CanvasGradient
createRadialGradient CanvasRenderingContext2D
self Float
x0 Float
y0 Float
r0 Float
x1 Float
y1 Float
r1
  = DOM CanvasGradient -> m CanvasGradient
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createRadialGradient"
          [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
r0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x1, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y1,
           Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
r1])
         JSM JSVal -> (JSVal -> DOM CanvasGradient) -> DOM CanvasGradient
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM CanvasGradient
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createRadialGradient Mozilla CanvasRenderingContext2D.createRadialGradient documentation> 
createRadialGradient_ ::
                      (MonadDOM m) =>
                        CanvasRenderingContext2D ->
                          Float -> Float -> Float -> Float -> Float -> Float -> m ()
createRadialGradient_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> Float -> Float -> m ()
createRadialGradient_ CanvasRenderingContext2D
self Float
x0 Float
y0 Float
r0 Float
x1 Float
y1 Float
r1
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createRadialGradient"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
r0, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
x1, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
y1,
             Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
r1]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createPattern Mozilla CanvasRenderingContext2D.createPattern documentation> 
createPattern ::
              (MonadDOM m, IsCanvasImageSource image, ToJSString repetition) =>
                CanvasRenderingContext2D ->
                  image -> repetition -> m (Maybe CanvasPattern)
createPattern :: forall (m :: * -> *) image repetition.
(MonadDOM m, IsCanvasImageSource image, ToJSString repetition) =>
CanvasRenderingContext2D
-> image -> repetition -> m (Maybe CanvasPattern)
createPattern CanvasRenderingContext2D
self image
image repetition
repetition
  = DOM (Maybe CanvasPattern) -> m (Maybe CanvasPattern)
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createPattern" [image -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal image
image, repetition -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal repetition
repetition])
         JSM JSVal
-> (JSVal -> DOM (Maybe CanvasPattern))
-> DOM (Maybe CanvasPattern)
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM (Maybe CanvasPattern)
forall a. FromJSVal a => JSVal -> JSM (Maybe a)
fromJSVal)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createPattern Mozilla CanvasRenderingContext2D.createPattern documentation> 
createPattern_ ::
               (MonadDOM m, IsCanvasImageSource image, ToJSString repetition) =>
                 CanvasRenderingContext2D -> image -> repetition -> m ()
createPattern_ :: forall (m :: * -> *) image repetition.
(MonadDOM m, IsCanvasImageSource image, ToJSString repetition) =>
CanvasRenderingContext2D -> image -> repetition -> m ()
createPattern_ CanvasRenderingContext2D
self image
image repetition
repetition
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createPattern" [image -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal image
image, repetition -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal repetition
repetition]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createPattern Mozilla CanvasRenderingContext2D.createPattern documentation> 
createPatternUnsafe ::
                    (MonadDOM m, IsCanvasImageSource image, ToJSString repetition,
                     HasCallStack) =>
                      CanvasRenderingContext2D -> image -> repetition -> m CanvasPattern
createPatternUnsafe :: forall (m :: * -> *) image repetition.
(MonadDOM m, IsCanvasImageSource image, ToJSString repetition,
 HasCallStack) =>
CanvasRenderingContext2D -> image -> repetition -> m CanvasPattern
createPatternUnsafe CanvasRenderingContext2D
self image
image repetition
repetition
  = DOM CanvasPattern -> m CanvasPattern
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createPattern" [image -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal image
image, repetition -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal repetition
repetition])
          JSM JSVal
-> (JSVal -> DOM (Maybe CanvasPattern))
-> DOM (Maybe CanvasPattern)
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM (Maybe CanvasPattern)
forall a. FromJSVal a => JSVal -> JSM (Maybe a)
fromJSVal)
         DOM (Maybe CanvasPattern)
-> (Maybe CanvasPattern -> DOM CanvasPattern) -> DOM CanvasPattern
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= DOM CanvasPattern
-> (CanvasPattern -> DOM CanvasPattern)
-> Maybe CanvasPattern
-> DOM CanvasPattern
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (String -> DOM CanvasPattern
forall a. HasCallStack => String -> a
Prelude.error String
"Nothing to return") CanvasPattern -> DOM CanvasPattern
forall a. a -> JSM a
forall (m :: * -> *) a. Monad m => a -> m a
return)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createPattern Mozilla CanvasRenderingContext2D.createPattern documentation> 
createPatternUnchecked ::
                       (MonadDOM m, IsCanvasImageSource image, ToJSString repetition) =>
                         CanvasRenderingContext2D -> image -> repetition -> m CanvasPattern
createPatternUnchecked :: forall (m :: * -> *) image repetition.
(MonadDOM m, IsCanvasImageSource image, ToJSString repetition) =>
CanvasRenderingContext2D -> image -> repetition -> m CanvasPattern
createPatternUnchecked CanvasRenderingContext2D
self image
image repetition
repetition
  = DOM CanvasPattern -> m CanvasPattern
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"createPattern" [image -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal image
image, repetition -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal repetition
repetition])
         JSM JSVal -> (JSVal -> DOM CanvasPattern) -> DOM CanvasPattern
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM CanvasPattern
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.getImageData Mozilla CanvasRenderingContext2D.getImageData documentation> 
getImageData ::
             (MonadDOM m) =>
               CanvasRenderingContext2D ->
                 Float -> Float -> Float -> Float -> m ImageData
getImageData :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ImageData
getImageData CanvasRenderingContext2D
self Float
sx Float
sy Float
sw Float
sh
  = DOM ImageData -> m ImageData
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getImageData"
          [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sh])
         JSM JSVal -> (JSVal -> DOM ImageData) -> DOM ImageData
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM ImageData
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.getImageData Mozilla CanvasRenderingContext2D.getImageData documentation> 
getImageData_ ::
              (MonadDOM m) =>
                CanvasRenderingContext2D ->
                  Float -> Float -> Float -> Float -> m ()
getImageData_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
getImageData_ CanvasRenderingContext2D
self Float
sx Float
sy Float
sw Float
sh
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"getImageData"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sh]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitGetImageDataHD Mozilla CanvasRenderingContext2D.webkitGetImageDataHD documentation> 
webkitGetImageDataHD ::
                     (MonadDOM m) =>
                       CanvasRenderingContext2D ->
                         Float -> Float -> Float -> Float -> m ImageData
webkitGetImageDataHD :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ImageData
webkitGetImageDataHD CanvasRenderingContext2D
self Float
sx Float
sy Float
sw Float
sh
  = DOM ImageData -> m ImageData
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"webkitGetImageDataHD"
          [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sh])
         JSM JSVal -> (JSVal -> DOM ImageData) -> DOM ImageData
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM ImageData
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitGetImageDataHD Mozilla CanvasRenderingContext2D.webkitGetImageDataHD documentation> 
webkitGetImageDataHD_ ::
                      (MonadDOM m) =>
                        CanvasRenderingContext2D ->
                          Float -> Float -> Float -> Float -> m ()
webkitGetImageDataHD_ :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D
-> Float -> Float -> Float -> Float -> m ()
webkitGetImageDataHD_ CanvasRenderingContext2D
self Float
sx Float
sy Float
sw Float
sh
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"webkitGetImageDataHD"
            [Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sx, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sy, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sw, Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
sh]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawFocusIfNeeded Mozilla CanvasRenderingContext2D.drawFocusIfNeeded documentation> 
drawFocusIfNeeded ::
                  (MonadDOM m, IsElement element) =>
                    CanvasRenderingContext2D -> element -> m ()
drawFocusIfNeeded :: forall (m :: * -> *) element.
(MonadDOM m, IsElement element) =>
CanvasRenderingContext2D -> element -> m ()
drawFocusIfNeeded CanvasRenderingContext2D
self element
element
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"drawFocusIfNeeded" [element -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal element
element]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawFocusIfNeeded Mozilla CanvasRenderingContext2D.drawFocusIfNeeded documentation> 
drawFocusIfNeededPath ::
                      (MonadDOM m, IsElement element) =>
                        CanvasRenderingContext2D -> Path2D -> element -> m ()
drawFocusIfNeededPath :: forall (m :: * -> *) element.
(MonadDOM m, IsElement element) =>
CanvasRenderingContext2D -> Path2D -> element -> m ()
drawFocusIfNeededPath CanvasRenderingContext2D
self Path2D
path element
element
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (JSM JSVal -> DOM ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void
         (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> [JSM JSVal] -> JSF
forall name args.
(ToJSString name, MakeArgs args) =>
name -> args -> JSF
jsf String
"drawFocusIfNeeded" [Path2D -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Path2D
path, element -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal element
element]))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.canvas Mozilla CanvasRenderingContext2D.canvas documentation> 
getCanvas ::
          (MonadDOM m) => CanvasRenderingContext2D -> m HTMLCanvasElement
getCanvas :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m HTMLCanvasElement
getCanvas CanvasRenderingContext2D
self
  = DOM HTMLCanvasElement -> m HTMLCanvasElement
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"canvas") JSM JSVal
-> (JSVal -> DOM HTMLCanvasElement) -> DOM HTMLCanvasElement
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM HTMLCanvasElement
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.globalAlpha Mozilla CanvasRenderingContext2D.globalAlpha documentation> 
setGlobalAlpha ::
               (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setGlobalAlpha :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setGlobalAlpha CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"globalAlpha" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.globalAlpha Mozilla CanvasRenderingContext2D.globalAlpha documentation> 
getGlobalAlpha ::
               (MonadDOM m) => CanvasRenderingContext2D -> m Float
getGlobalAlpha :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getGlobalAlpha CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"globalAlpha") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.globalCompositeOperation Mozilla CanvasRenderingContext2D.globalCompositeOperation documentation> 
setGlobalCompositeOperation ::
                            (MonadDOM m, ToJSString val) =>
                              CanvasRenderingContext2D -> val -> m ()
setGlobalCompositeOperation :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setGlobalCompositeOperation CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"globalCompositeOperation" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.globalCompositeOperation Mozilla CanvasRenderingContext2D.globalCompositeOperation documentation> 
getGlobalCompositeOperation ::
                            (MonadDOM m, FromJSString result) =>
                              CanvasRenderingContext2D -> m result
getGlobalCompositeOperation :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getGlobalCompositeOperation CanvasRenderingContext2D
self
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"globalCompositeOperation") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineWidth Mozilla CanvasRenderingContext2D.lineWidth documentation> 
setLineWidth ::
             (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setLineWidth :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setLineWidth CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"lineWidth" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineWidth Mozilla CanvasRenderingContext2D.lineWidth documentation> 
getLineWidth :: (MonadDOM m) => CanvasRenderingContext2D -> m Float
getLineWidth :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getLineWidth CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"lineWidth") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineCap Mozilla CanvasRenderingContext2D.lineCap documentation> 
setLineCap ::
           (MonadDOM m, ToJSString val) =>
             CanvasRenderingContext2D -> val -> m ()
setLineCap :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setLineCap CanvasRenderingContext2D
self val
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"lineCap" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineCap Mozilla CanvasRenderingContext2D.lineCap documentation> 
getLineCap ::
           (MonadDOM m, FromJSString result) =>
             CanvasRenderingContext2D -> m result
getLineCap :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getLineCap CanvasRenderingContext2D
self
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"lineCap") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineJoin Mozilla CanvasRenderingContext2D.lineJoin documentation> 
setLineJoin ::
            (MonadDOM m, ToJSString val) =>
              CanvasRenderingContext2D -> val -> m ()
setLineJoin :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setLineJoin CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"lineJoin" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineJoin Mozilla CanvasRenderingContext2D.lineJoin documentation> 
getLineJoin ::
            (MonadDOM m, FromJSString result) =>
              CanvasRenderingContext2D -> m result
getLineJoin :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getLineJoin CanvasRenderingContext2D
self
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"lineJoin") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.miterLimit Mozilla CanvasRenderingContext2D.miterLimit documentation> 
setMiterLimit ::
              (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setMiterLimit :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setMiterLimit CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"miterLimit" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.miterLimit Mozilla CanvasRenderingContext2D.miterLimit documentation> 
getMiterLimit ::
              (MonadDOM m) => CanvasRenderingContext2D -> m Float
getMiterLimit :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getMiterLimit CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"miterLimit") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowOffsetX Mozilla CanvasRenderingContext2D.shadowOffsetX documentation> 
setShadowOffsetX ::
                 (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setShadowOffsetX :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setShadowOffsetX CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"shadowOffsetX" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowOffsetX Mozilla CanvasRenderingContext2D.shadowOffsetX documentation> 
getShadowOffsetX ::
                 (MonadDOM m) => CanvasRenderingContext2D -> m Float
getShadowOffsetX :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getShadowOffsetX CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"shadowOffsetX") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowOffsetY Mozilla CanvasRenderingContext2D.shadowOffsetY documentation> 
setShadowOffsetY ::
                 (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setShadowOffsetY :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setShadowOffsetY CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"shadowOffsetY" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowOffsetY Mozilla CanvasRenderingContext2D.shadowOffsetY documentation> 
getShadowOffsetY ::
                 (MonadDOM m) => CanvasRenderingContext2D -> m Float
getShadowOffsetY :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getShadowOffsetY CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"shadowOffsetY") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowBlur Mozilla CanvasRenderingContext2D.shadowBlur documentation> 
setShadowBlur ::
              (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setShadowBlur :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setShadowBlur CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"shadowBlur" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowBlur Mozilla CanvasRenderingContext2D.shadowBlur documentation> 
getShadowBlur ::
              (MonadDOM m) => CanvasRenderingContext2D -> m Float
getShadowBlur :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getShadowBlur CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"shadowBlur") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowColor Mozilla CanvasRenderingContext2D.shadowColor documentation> 
setShadowColor ::
               (MonadDOM m, ToJSString val) =>
                 CanvasRenderingContext2D -> val -> m ()
setShadowColor :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setShadowColor CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"shadowColor" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.shadowColor Mozilla CanvasRenderingContext2D.shadowColor documentation> 
getShadowColor ::
               (MonadDOM m, FromJSString result) =>
                 CanvasRenderingContext2D -> m result
getShadowColor :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getShadowColor CanvasRenderingContext2D
self
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"shadowColor") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineDashOffset Mozilla CanvasRenderingContext2D.lineDashOffset documentation> 
setLineDashOffset ::
                  (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setLineDashOffset :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setLineDashOffset CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"lineDashOffset" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineDashOffset Mozilla CanvasRenderingContext2D.lineDashOffset documentation> 
getLineDashOffset ::
                  (MonadDOM m) => CanvasRenderingContext2D -> m Float
getLineDashOffset :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getLineDashOffset CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"lineDashOffset") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitLineDash Mozilla CanvasRenderingContext2D.webkitLineDash documentation> 
setWebkitLineDash ::
                  (MonadDOM m) => CanvasRenderingContext2D -> [Float] -> m ()
setWebkitLineDash :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> [Float] -> m ()
setWebkitLineDash CanvasRenderingContext2D
self [Float]
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"webkitLineDash" (JSM Object -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ([Float] -> JSM Object
forall args. MakeArgs args => args -> JSM Object
array [Float]
val)))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitLineDash Mozilla CanvasRenderingContext2D.webkitLineDash documentation> 
getWebkitLineDash ::
                  (MonadDOM m) => CanvasRenderingContext2D -> m [Float]
getWebkitLineDash :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m [Float]
getWebkitLineDash CanvasRenderingContext2D
self
  = DOM [Float] -> m [Float]
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"webkitLineDash") JSM JSVal -> (JSVal -> DOM [Float]) -> DOM [Float]
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM [Float]
forall o. FromJSVal o => JSVal -> JSM [o]
fromJSArrayUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitLineDashOffset Mozilla CanvasRenderingContext2D.webkitLineDashOffset documentation> 
setWebkitLineDashOffset ::
                        (MonadDOM m) => CanvasRenderingContext2D -> Float -> m ()
setWebkitLineDashOffset :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Float -> m ()
setWebkitLineDashOffset CanvasRenderingContext2D
self Float
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"webkitLineDashOffset" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitLineDashOffset Mozilla CanvasRenderingContext2D.webkitLineDashOffset documentation> 
getWebkitLineDashOffset ::
                        (MonadDOM m) => CanvasRenderingContext2D -> m Float
getWebkitLineDashOffset :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getWebkitLineDashOffset CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
         ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"webkitLineDashOffset") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.font Mozilla CanvasRenderingContext2D.font documentation> 
setFont ::
        (MonadDOM m, ToJSString val) =>
          CanvasRenderingContext2D -> val -> m ()
setFont :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setFont CanvasRenderingContext2D
self val
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"font" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.font Mozilla CanvasRenderingContext2D.font documentation> 
getFont ::
        (MonadDOM m, FromJSString result) =>
          CanvasRenderingContext2D -> m result
getFont :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getFont CanvasRenderingContext2D
self = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"font") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.textAlign Mozilla CanvasRenderingContext2D.textAlign documentation> 
setTextAlign ::
             (MonadDOM m, ToJSString val) =>
               CanvasRenderingContext2D -> val -> m ()
setTextAlign :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setTextAlign CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"textAlign" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.textAlign Mozilla CanvasRenderingContext2D.textAlign documentation> 
getTextAlign ::
             (MonadDOM m, FromJSString result) =>
               CanvasRenderingContext2D -> m result
getTextAlign :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getTextAlign CanvasRenderingContext2D
self
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"textAlign") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.textBaseline Mozilla CanvasRenderingContext2D.textBaseline documentation> 
setTextBaseline ::
                (MonadDOM m, ToJSString val) =>
                  CanvasRenderingContext2D -> val -> m ()
setTextBaseline :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setTextBaseline CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"textBaseline" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.textBaseline Mozilla CanvasRenderingContext2D.textBaseline documentation> 
getTextBaseline ::
                (MonadDOM m, FromJSString result) =>
                  CanvasRenderingContext2D -> m result
getTextBaseline :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getTextBaseline CanvasRenderingContext2D
self
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"textBaseline") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.direction Mozilla CanvasRenderingContext2D.direction documentation> 
setDirection ::
             (MonadDOM m, ToJSString val) =>
               CanvasRenderingContext2D -> val -> m ()
setDirection :: forall (m :: * -> *) text.
(MonadDOM m, ToJSString text) =>
CanvasRenderingContext2D -> text -> m ()
setDirection CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"direction" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.direction Mozilla CanvasRenderingContext2D.direction documentation> 
getDirection ::
             (MonadDOM m, FromJSString result) =>
               CanvasRenderingContext2D -> m result
getDirection :: forall (m :: * -> *) result.
(MonadDOM m, FromJSString result) =>
CanvasRenderingContext2D -> m result
getDirection CanvasRenderingContext2D
self
  = DOM result -> m result
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"direction") JSM JSVal -> (JSVal -> DOM result) -> DOM result
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM result
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.strokeStyle Mozilla CanvasRenderingContext2D.strokeStyle documentation> 
setStrokeStyle ::
               (MonadDOM m, IsCanvasStyle val) =>
                 CanvasRenderingContext2D -> val -> m ()
setStrokeStyle :: forall (m :: * -> *) val.
(MonadDOM m, IsCanvasStyle val) =>
CanvasRenderingContext2D -> val -> m ()
setStrokeStyle CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"strokeStyle" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.strokeStyle Mozilla CanvasRenderingContext2D.strokeStyle documentation> 
getStrokeStyle ::
               (MonadDOM m) => CanvasRenderingContext2D -> m CanvasStyle
getStrokeStyle :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m CanvasStyle
getStrokeStyle CanvasRenderingContext2D
self
  = DOM CanvasStyle -> m CanvasStyle
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"strokeStyle") JSM JSVal -> (JSVal -> DOM CanvasStyle) -> DOM CanvasStyle
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM CanvasStyle
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.fillStyle Mozilla CanvasRenderingContext2D.fillStyle documentation> 
setFillStyle ::
             (MonadDOM m, IsCanvasStyle val) =>
               CanvasRenderingContext2D -> val -> m ()
setFillStyle :: forall (m :: * -> *) val.
(MonadDOM m, IsCanvasStyle val) =>
CanvasRenderingContext2D -> val -> m ()
setFillStyle CanvasRenderingContext2D
self val
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"fillStyle" (val -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal val
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.fillStyle Mozilla CanvasRenderingContext2D.fillStyle documentation> 
getFillStyle ::
             (MonadDOM m) => CanvasRenderingContext2D -> m CanvasStyle
getFillStyle :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m CanvasStyle
getFillStyle CanvasRenderingContext2D
self
  = DOM CanvasStyle -> m CanvasStyle
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"fillStyle") JSM JSVal -> (JSVal -> DOM CanvasStyle) -> DOM CanvasStyle
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM CanvasStyle
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitBackingStorePixelRatio Mozilla CanvasRenderingContext2D.webkitBackingStorePixelRatio documentation> 
getWebkitBackingStorePixelRatio ::
                                (MonadDOM m) => CanvasRenderingContext2D -> m Float
getWebkitBackingStorePixelRatio :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Float
getWebkitBackingStorePixelRatio CanvasRenderingContext2D
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>
         ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"webkitBackingStorePixelRatio") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.imageSmoothingEnabled Mozilla CanvasRenderingContext2D.imageSmoothingEnabled documentation> 
setImageSmoothingEnabled ::
                         (MonadDOM m) => CanvasRenderingContext2D -> Bool -> m ()
setImageSmoothingEnabled :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Bool -> m ()
setImageSmoothingEnabled CanvasRenderingContext2D
self Bool
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"imageSmoothingEnabled" (Bool -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Bool
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.imageSmoothingEnabled Mozilla CanvasRenderingContext2D.imageSmoothingEnabled documentation> 
getImageSmoothingEnabled ::
                         (MonadDOM m) => CanvasRenderingContext2D -> m Bool
getImageSmoothingEnabled :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Bool
getImageSmoothingEnabled CanvasRenderingContext2D
self
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"imageSmoothingEnabled") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitImageSmoothingEnabled Mozilla CanvasRenderingContext2D.webkitImageSmoothingEnabled documentation> 
setWebkitImageSmoothingEnabled ::
                               (MonadDOM m) => CanvasRenderingContext2D -> Bool -> m ()
setWebkitImageSmoothingEnabled :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> Bool -> m ()
setWebkitImageSmoothingEnabled CanvasRenderingContext2D
self Bool
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"webkitImageSmoothingEnabled" (Bool -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Bool
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.webkitImageSmoothingEnabled Mozilla CanvasRenderingContext2D.webkitImageSmoothingEnabled documentation> 
getWebkitImageSmoothingEnabled ::
                               (MonadDOM m) => CanvasRenderingContext2D -> m Bool
getWebkitImageSmoothingEnabled :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m Bool
getWebkitImageSmoothingEnabled CanvasRenderingContext2D
self
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"webkitImageSmoothingEnabled") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.imageSmoothingQuality Mozilla CanvasRenderingContext2D.imageSmoothingQuality documentation> 
setImageSmoothingQuality ::
                         (MonadDOM m) =>
                           CanvasRenderingContext2D -> ImageSmoothingQuality -> m ()
setImageSmoothingQuality :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> ImageSmoothingQuality -> m ()
setImageSmoothingQuality CanvasRenderingContext2D
self ImageSmoothingQuality
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (DOM ()) CanvasRenderingContext2D (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"imageSmoothingQuality" (ImageSmoothingQuality -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal ImageSmoothingQuality
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.imageSmoothingQuality Mozilla CanvasRenderingContext2D.imageSmoothingQuality documentation> 
getImageSmoothingQuality ::
                         (MonadDOM m) => CanvasRenderingContext2D -> m ImageSmoothingQuality
getImageSmoothingQuality :: forall (m :: * -> *).
MonadDOM m =>
CanvasRenderingContext2D -> m ImageSmoothingQuality
getImageSmoothingQuality CanvasRenderingContext2D
self
  = DOM ImageSmoothingQuality -> m ImageSmoothingQuality
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM
      ((CanvasRenderingContext2D
self CanvasRenderingContext2D
-> Getting (JSM JSVal) CanvasRenderingContext2D (JSM JSVal)
-> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String
-> IndexPreservingGetter CanvasRenderingContext2D (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"imageSmoothingQuality") JSM JSVal
-> (JSVal -> DOM ImageSmoothingQuality)
-> DOM ImageSmoothingQuality
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM ImageSmoothingQuality
forall a. FromJSVal a => JSVal -> JSM a
fromJSValUnchecked)