| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Dashi.Diagram
Documentation
class Shape s num | s -> num where Source #
Methods
boundingBox :: s -> Rect num Source #
Instances
| Num num => Shape (Circle num) num Source # | |
| (Num num, Ord num) => Shape (Line num) num Source # | |
| Shape (Point num) num Source # | |
| (Num num, Ord num) => Shape (Polygon num) num Source # | |
| (Num num, Ord num) => Shape (Polyline num) num Source # | |
| Ord num => Shape (Rect num) num Source # | |
| Shape (SomeShape num) num Source # | |
| Shape (Text num) num Source # | |
| (Num num, Ord num, Shape s num, Foldable f, Functor f) => Shape (f s) num Source # | |
Defined in Dashi.Diagram | |
class Shape s num => ToSVG s num | s -> num where Source #
Instances
| (Num num, ToMisoString num) => ToSVG (Circle num) num Source # | |
| (Num num, Ord num, ToMisoString num) => ToSVG (Line num) num Source # | |
| (Num num, Ord num, ToMisoString num) => ToSVG (Polygon num) num Source # | |
| (Num num, Ord num, ToMisoString num) => ToSVG (Polyline num) num Source # | |
| (Num num, Ord num, ToMisoString num) => ToSVG (Rect num) num Source # | |
| ToSVG (SomeShape num) num Source # | |
| ToMisoString num => ToSVG (Text num) num Source # | |
| (Num num, Ord num, ToSVG s num, Foldable f, Functor f) => ToSVG (f s) num Source # | |
Instances
| Generic (Point num) Source # | |||||
Defined in Dashi.Diagram Associated Types
| |||||
| Show num => Show (Point num) Source # | |||||
| Eq num => Eq (Point num) Source # | |||||
| Shape (Point num) num Source # | |||||
| type Rep (Point num) Source # | |||||
Defined in Dashi.Diagram type Rep (Point num) = D1 ('MetaData "Point" "Dashi.Diagram" "dashi-0.1.0.0-F2KenN5X5FyKVWDRDEIa4A" 'False) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "x") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 num) :*: S1 ('MetaSel ('Just "y") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 num))) | |||||
offsetPoint :: (num -> num) -> (num -> num) -> Point num -> Point num Source #
boundingBoxOfPoints :: (Foldable f, Functor f, Num num, Ord num) => f (Point num) -> Rect num Source #
Constructors
| Rect | |
Fields
| |
Instances
topRight :: forall num f. Functor f => (Point num -> f (Point num)) -> Rect num -> f (Rect num) Source #
bottomLeft :: forall num f. Functor f => (Point num -> f (Point num)) -> Rect num -> f (Rect num) Source #
Instances
| Generic (Circle num) Source # | |||||
Defined in Dashi.Diagram Associated Types
| |||||
| Num num => Shape (Circle num) num Source # | |||||
| (Num num, ToMisoString num) => ToSVG (Circle num) num Source # | |||||
| type Rep (Circle num) Source # | |||||
Defined in Dashi.Diagram type Rep (Circle num) = D1 ('MetaData "Circle" "Dashi.Diagram" "dashi-0.1.0.0-F2KenN5X5FyKVWDRDEIa4A" 'False) (C1 ('MetaCons "Circle" 'PrefixI 'True) (S1 ('MetaSel ('Just "centre") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Point num)) :*: S1 ('MetaSel ('Just "radius") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 num))) | |||||
Instances
| Generic (Line num) Source # | |||||
Defined in Dashi.Diagram Associated Types
| |||||
| (Num num, Ord num) => Shape (Line num) num Source # | |||||
| (Num num, Ord num, ToMisoString num) => ToSVG (Line num) num Source # | |||||
| type Rep (Line num) Source # | |||||
Defined in Dashi.Diagram type Rep (Line num) = D1 ('MetaData "Line" "Dashi.Diagram" "dashi-0.1.0.0-F2KenN5X5FyKVWDRDEIa4A" 'False) (C1 ('MetaCons "Line" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Point num)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Point num)))) | |||||
Instances
| Generic (Polyline num) Source # | |||||
Defined in Dashi.Diagram Associated Types
| |||||
| (Num num, Ord num) => Shape (Polyline num) num Source # | |||||
| (Num num, Ord num, ToMisoString num) => ToSVG (Polyline num) num Source # | |||||
| type Rep (Polyline num) Source # | |||||
Defined in Dashi.Diagram | |||||
Instances
| Generic (Polygon num) Source # | |||||
Defined in Dashi.Diagram Associated Types
| |||||
| (Num num, Ord num) => Shape (Polygon num) num Source # | |||||
| (Num num, Ord num, ToMisoString num) => ToSVG (Polygon num) num Source # | |||||
| type Rep (Polygon num) Source # | |||||
Defined in Dashi.Diagram | |||||
data TextAnchor Source #
Instances
| Eq TextAnchor Source # | |
Defined in Dashi.Diagram | |
| ToMisoString TextAnchor Source # | |
Defined in Dashi.Diagram Methods toMisoString :: TextAnchor -> MisoString Source # | |
Constructors
| Text | |
Fields
| |
Instances
| Generic (Text num) Source # | |||||
Defined in Dashi.Diagram Associated Types
| |||||
| Shape (Text num) num Source # | |||||
| ToMisoString num => ToSVG (Text num) num Source # | |||||
| type Rep (Text num) Source # | |||||
Defined in Dashi.Diagram type Rep (Text num) = D1 ('MetaData "Text" "Dashi.Diagram" "dashi-0.1.0.0-F2KenN5X5FyKVWDRDEIa4A" 'False) (C1 ('MetaCons "Text" 'PrefixI 'True) (S1 ('MetaSel ('Just "position") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Point num)) :*: (S1 ('MetaSel ('Just "anchor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TextAnchor) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MisoString)))) | |||||
boundingBoxOfShapes :: (Foldable f, Functor f, Num num, Ord num) => f (SomeShape num) -> Rect num Source #
svg :: (Foldable t, Functor t, Fractional num, Ord num, ToMisoString num) => Rect num -> [Attribute action] -> t (SomeShape num) -> View model action Source #
translateDomain :: (Shape s num, Eq num, Fractional num) => Rect num -> Rect num -> s -> s Source #