Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data AttributeUniverse
- type LayerSym0 = Layer
- type MatrixSym0 = Matrix
- type PinSym0 = Pin
- type TransformationsSym0 = Transformations
- type StrokeSym0 = Stroke
- type FillSym0 = Fill
- type PenSym0 = Pen
- type SizeSym0 = Size
- type DashSym0 = Dash
- type LineCapSym0 = LineCap
- type LineJoinSym0 = LineJoin
- type FillRuleSym0 = FillRule
- type ArrowSym0 = Arrow
- type RArrowSym0 = RArrow
- type OpacitySym0 = Opacity
- type TilingSym0 = Tiling
- type GradientSym0 = Gradient
- type ClipSym0 = Clip
- type SAttributeUniverse = (Sing :: AttributeUniverse -> Type)
- type CommonAttributes = [Layer, Matrix, Pin, Transformations]
- type TextLabelAttributes = CommonAttributes
- type MiniPageAttributes = CommonAttributes
- type ImageAttributes = CommonAttributes
- type SymbolAttributes = CommonAttributes ++ [Stroke, Fill, Pen, Size]
- type PathAttributes = CommonAttributes ++ [Stroke, Fill, Dash, Pen, LineCap, LineJoin, FillRule, Arrow, RArrow, Opacity, Tiling, Gradient]
- type GroupAttributes = CommonAttributes ++ '[Clip]
- newtype Attr (f :: TyFun u * -> *) (label :: u) = GAttr {}
- getAttr :: forall f label f label. Iso (Attr f label) (Attr f label) (Maybe (Apply f label)) (Maybe (Apply f label))
- pattern Attr :: Apply f label -> Attr f label
- pattern NoAttr :: Attr f label
- newtype Attributes (f :: TyFun u * -> *) (ats :: [u]) = Attrs {}
- unAttrs :: forall f ats f ats. Iso (Attributes f ats) (Attributes f ats) (Rec (Attr f) ats) (Rec (Attr f) ats)
- zipRecsWith :: (forall a. f a -> g a -> h a) -> Rec f as -> Rec g as -> Rec h as
- attrLens :: at ∈ ats => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))
- lookupAttr :: at ∈ ats => proxy at -> Attributes f ats -> Maybe (Apply f at)
- setAttr :: forall proxy at ats f. at ∈ ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats
- takeAttr :: forall proxy at ats f. at ∈ ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats)
- unSetAttr :: forall proxy at ats f. at ∈ ats => proxy at -> Attributes f ats -> Attributes f ats
- attr :: (at ∈ ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats
- data PinType
- = No
- | Yes
- | Horizontal
- | Vertical
- data TransformationTypes
- = Affine
- | Rigid
- | Translations
- data IpeValue v
- newtype IpeSize r = IpeSize (IpeValue r)
- newtype IpePen r = IpePen (IpeValue r)
- newtype IpeColor r = IpeColor (IpeValue (RGB r))
- data IpeDash r
- = DashNamed Text
- | DashPattern [r] r
- data FillType
- type IpeOpacity = Text
- type IpeTiling = Text
- type IpeGradient = Text
- data IpeArrow r = IpeArrow {
- _arrowName :: Text
- _arrowSize :: IpeSize r
- arrowSize :: forall r r. Lens (IpeArrow r) (IpeArrow r) (IpeSize r) (IpeSize r)
- arrowName :: forall r. Lens' (IpeArrow r) Text
- normalArrow :: IpeArrow r
- class IpeAttrName (a :: AttributeUniverse) where
- type family AllSatisfy (c :: k -> Constraint) (xs :: [k]) :: Constraint where ...
- writeAttrNames :: AllSatisfy IpeAttrName rs => Rec f rs -> Rec (Const Text) rs
Documentation
data AttributeUniverse Source #
Layer | |
Matrix | |
Pin | |
Transformations | |
Stroke | |
Fill | |
Pen | |
Size | |
Dash | |
LineCap | |
LineJoin | |
FillRule | |
Arrow | |
RArrow | |
Opacity | |
Tiling | |
Gradient | |
Clip |
Instances
type MatrixSym0 = Matrix Source #
type StrokeSym0 = Stroke Source #
type LineCapSym0 = LineCap Source #
type LineJoinSym0 = LineJoin Source #
type FillRuleSym0 = FillRule Source #
type RArrowSym0 = RArrow Source #
type OpacitySym0 = Opacity Source #
type TilingSym0 = Tiling Source #
type GradientSym0 = Gradient Source #
type SAttributeUniverse = (Sing :: AttributeUniverse -> Type) Source #
type CommonAttributes = [Layer, Matrix, Pin, Transformations] Source #
type ImageAttributes = CommonAttributes Source #
type SymbolAttributes = CommonAttributes ++ [Stroke, Fill, Pen, Size] Source #
type PathAttributes = CommonAttributes ++ [Stroke, Fill, Dash, Pen, LineCap, LineJoin, FillRule, Arrow, RArrow, Opacity, Tiling, Gradient] Source #
type GroupAttributes = CommonAttributes ++ '[Clip] Source #
newtype Attr (f :: TyFun u * -> *) (label :: u) Source #
Attr implements the mapping from labels to types as specified by the
(symbol representing) the type family f
Instances
Eq (Apply f label) => Eq (Attr f label) Source # | |
Ord (Apply f label) => Ord (Attr f label) Source # | |
Defined in Data.Geometry.Ipe.Attributes | |
Read (Apply f label) => Read (Attr f label) Source # | |
Show (Apply f label) => Show (Attr f label) Source # | |
Semigroup (Attr f l) Source # | Give pref. to the *RIGHT* |
Monoid (Attr f l) Source # | |
IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
IpeReadText (Apply f at) => IpeReadAttr (Attr f at) Source # | |
Defined in Data.Geometry.Ipe.Reader ipeReadAttr :: Text -> Node Text Text -> Either ConversionError (Attr f at) Source # |
getAttr :: forall f label f label. Iso (Attr f label) (Attr f label) (Maybe (Apply f label)) (Maybe (Apply f label)) Source #
newtype Attributes (f :: TyFun u * -> *) (ats :: [u]) Source #
Instances
unAttrs :: forall f ats f ats. Iso (Attributes f ats) (Attributes f ats) (Rec (Attr f) ats) (Rec (Attr f) ats) Source #
lookupAttr :: at ∈ ats => proxy at -> Attributes f ats -> Maybe (Apply f at) Source #
setAttr :: forall proxy at ats f. at ∈ ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats Source #
takeAttr :: forall proxy at ats f. at ∈ ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats) Source #
gets and removes the attribute from Attributes
unSetAttr :: forall proxy at ats f. at ∈ ats => proxy at -> Attributes f ats -> Attributes f ats Source #
unsets/Removes an attribute
attr :: (at ∈ ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats Source #
Common Attributes
Possible values for Pin
data TransformationTypes Source #
Possible values for Transformation
Instances
Eq TransformationTypes Source # | |
Defined in Data.Geometry.Ipe.Attributes (==) :: TransformationTypes -> TransformationTypes -> Bool # (/=) :: TransformationTypes -> TransformationTypes -> Bool # | |
Read TransformationTypes Source # | |
Defined in Data.Geometry.Ipe.Attributes | |
Show TransformationTypes Source # | |
Defined in Data.Geometry.Ipe.Attributes showsPrec :: Int -> TransformationTypes -> ShowS # show :: TransformationTypes -> String # showList :: [TransformationTypes] -> ShowS # | |
IpeWriteText TransformationTypes Source # | |
Defined in Data.Geometry.Ipe.Writer | |
IpeReadText TransformationTypes Source # | |
Defined in Data.Geometry.Ipe.Reader |
TODO
Symbol Attributes
The optional Attributes for a symbol data SymbolAttributeUniverse = SymbolStroke | SymbolFill | SymbolPen | Size deriving (Show,Eq)
Many types either consist of a symbolc value, or a value of type v
Instances
Functor IpeValue Source # | |
Foldable IpeValue Source # | |
Defined in Data.Geometry.Ipe.Attributes fold :: Monoid m => IpeValue m -> m # foldMap :: Monoid m => (a -> m) -> IpeValue a -> m # foldr :: (a -> b -> b) -> b -> IpeValue a -> b # foldr' :: (a -> b -> b) -> b -> IpeValue a -> b # foldl :: (b -> a -> b) -> b -> IpeValue a -> b # foldl' :: (b -> a -> b) -> b -> IpeValue a -> b # foldr1 :: (a -> a -> a) -> IpeValue a -> a # foldl1 :: (a -> a -> a) -> IpeValue a -> a # elem :: Eq a => a -> IpeValue a -> Bool # maximum :: Ord a => IpeValue a -> a # minimum :: Ord a => IpeValue a -> a # | |
Traversable IpeValue Source # | |
Eq v => Eq (IpeValue v) Source # | |
Ord v => Ord (IpeValue v) Source # | |
Defined in Data.Geometry.Ipe.Attributes | |
Show v => Show (IpeValue v) Source # | |
IsString (IpeValue v) Source # | |
Defined in Data.Geometry.Ipe.Attributes fromString :: String -> IpeValue v # | |
IpeWriteText v => IpeWriteText (IpeValue v) Source # | |
Defined in Data.Geometry.Ipe.Writer |
Instances
Eq r => Eq (IpeSize r) Source # | |
Ord r => Ord (IpeSize r) Source # | |
Defined in Data.Geometry.Ipe.Attributes | |
Show r => Show (IpeSize r) Source # | |
IpeWriteText r => IpeWriteText (IpeSize r) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
Coordinate r => IpeReadText (IpeSize r) Source # | |
Defined in Data.Geometry.Ipe.Reader ipeReadText :: Text -> Either ConversionError (IpeSize r) Source # |
Instances
Eq r => Eq (IpePen r) Source # | |
Ord r => Ord (IpePen r) Source # | |
Defined in Data.Geometry.Ipe.Attributes | |
Show r => Show (IpePen r) Source # | |
IpeWriteText r => IpeWriteText (IpePen r) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
Coordinate r => IpeReadText (IpePen r) Source # | |
Defined in Data.Geometry.Ipe.Reader ipeReadText :: Text -> Either ConversionError (IpePen r) Source # |
Instances
Eq r => Eq (IpeColor r) Source # | |
Ord r => Ord (IpeColor r) Source # | |
Defined in Data.Geometry.Ipe.Attributes | |
Show r => Show (IpeColor r) Source # | |
IpeWriteText r => IpeWriteText (IpeColor r) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
Coordinate r => IpeReadText (IpeColor r) Source # | |
Defined in Data.Geometry.Ipe.Reader ipeReadText :: Text -> Either ConversionError (IpeColor r) Source # |
Path Attributes
Possible attributes for a path data PathAttributeUniverse = Stroke | Fill | Dash | Pen | LineCap | LineJoin | FillRule | Arrow | RArrow | Opacity | Tiling | Gradient deriving (Show,Eq)
Possible values for Dash
DashNamed Text | |
DashPattern [r] r |
Instances
Eq r => Eq (IpeDash r) Source # | |
Show r => Show (IpeDash r) Source # | |
IpeWriteText r => IpeWriteText (IpeDash r) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
Coordinate r => IpeReadText (IpeDash r) Source # | |
Defined in Data.Geometry.Ipe.Reader ipeReadText :: Text -> Either ConversionError (IpeDash r) Source # |
Allowed Fill types
type IpeOpacity = Text Source #
IpeOpacity, IpeTyling, and IpeGradient are all symbolic values
type IpeGradient = Text Source #
Possible values for an ipe arrow
IpeArrow | |
|
Instances
Eq r => Eq (IpeArrow r) Source # | |
Show r => Show (IpeArrow r) Source # | |
IpeWriteText r => IpeWriteText (IpeArrow r) Source # | |
Defined in Data.Geometry.Ipe.Writer | |
Coordinate r => IpeReadText (IpeArrow r) Source # | |
Defined in Data.Geometry.Ipe.Reader ipeReadText :: Text -> Either ConversionError (IpeArrow r) Source # |
normalArrow :: IpeArrow r Source #
Attribute names in Ipe
class IpeAttrName (a :: AttributeUniverse) where Source #
For the types representing attribute values we can get the name/key to use when serializing to ipe.
Instances
type family AllSatisfy (c :: k -> Constraint) (xs :: [k]) :: Constraint where ... Source #
Function that states that all elements in xs satisfy a given constraint c
AllSatisfy c '[] = () | |
AllSatisfy c (x ': xs) = (c x, AllSatisfy c xs) |
writeAttrNames :: AllSatisfy IpeAttrName rs => Rec f rs -> Rec (Const Text) rs Source #
Writing Attribute names