Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data StyleAttrs
- pattern StyleAttrs :: Maybe String -> Maybe Float -> Maybe String -> StyleAttrs
- strokeColor :: StyleAttrs -> Maybe String
- strokeWidth :: StyleAttrs -> Maybe Float
- fillColor :: StyleAttrs -> Maybe String
- withStrokeColor :: String -> StyleAttrs
- defaultStyleAttrs :: StyleAttrs
- getAttrs :: StyleAttrs -> [Attribute]
- applyStyle :: StyleAttrs -> Svg -> Svg
- maybeApplyStyle :: Maybe StyleAttrs -> Svg -> Svg
Documentation
data StyleAttrs Source #
Instances
Eq StyleAttrs Source # | |
Defined in Style (==) :: StyleAttrs -> StyleAttrs -> Bool # (/=) :: StyleAttrs -> StyleAttrs -> Bool # | |
Show StyleAttrs Source # | |
Defined in Style showsPrec :: Int -> StyleAttrs -> ShowS # show :: StyleAttrs -> String # showList :: [StyleAttrs] -> ShowS # |
pattern StyleAttrs :: Maybe String -> Maybe Float -> Maybe String -> StyleAttrs Source #
strokeColor :: StyleAttrs -> Maybe String Source #
strokeWidth :: StyleAttrs -> Maybe Float Source #
withStrokeColor :: String -> StyleAttrs Source #
Shortcut constructor for a StyleAttrs instance wherre just stroke color is set.
defaultStyleAttrs :: StyleAttrs Source #
Shortcut constructor for an "empty" StyleAttrs instance (i.e. no styles are specified)
getAttrs :: StyleAttrs -> [Attribute] Source #
Return a list of Blaze.SVG attributes from a given style.
applyStyle :: StyleAttrs -> Svg -> Svg Source #
Apply the given style to an SVG element.
maybeApplyStyle :: Maybe StyleAttrs -> Svg -> Svg Source #
Apply the given style to an SVG element, if provided.