{-# LANGUAGE PatternSynonyms #-}
{-# 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
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" ()))
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" ()))
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" ()))
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]))
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]))
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]))
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]))
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]))
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" ()))
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)]))
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)
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" ()))
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]))
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]))
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" ()))
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]))
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]))
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]))
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]))
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" ()))
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]))
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)
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]))
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)
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]))
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)
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]))
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)
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]))
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)
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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" ()))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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]))
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)
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]))
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)
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]))
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)
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]))
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)
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]))
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)
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]))
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)
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)
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)
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]))
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)
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]))
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]))
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]))
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)
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))
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))
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))
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)
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))
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))
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))
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)
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))
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)
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))
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))
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))
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))
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))
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))
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))
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))
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))
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)
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))
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))
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)))
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)
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))
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))
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))
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)
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))
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)
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))
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)
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))
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)
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))
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)
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))
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)
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))
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))
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)
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))
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)
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))
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)