INblobs-0.1.1: src/SpecialSymbols.hs
module SpecialSymbols where
import Shape
import Palette
import Ports
import Colors
import Math
-- | List of Special Symbols.
specialSymbols, managementSymbols :: Palette n
specialSymbols =
Palette $ interfaceSymbol : shapes managementSymbols
managementSymbols =
Palette [ copySymbol
, duplicatorSymbol
, eraseSymbol
]
interfaceSymbol, copySymbol, duplicatorSymbol, eraseSymbol :: (ShapeName, (Shape, Ports, Maybe a))
interfaceSymbol =
( "interface"
, ( Circle { shapeStyle = ShapeStyle { styleStrokeWidth = 2
, styleStrokeColour = coconut
, styleFill = coconut
}
, shapeRadius = 0.25
}
, [("interface",DoublePoint 0.0 0.25)]
, Nothing
)
)
copySymbol =
( "copy"
, ( TextInEllipse { shapeStyle = ShapeStyle { styleStrokeWidth = 1
, styleStrokeColour = licorice
, styleFill = silver
}
, shapeText = "c"
}
, [("src",DoublePoint 0.0 0.3),("fst_target",DoublePoint (-0.3) (-0.3)),("snd_target",DoublePoint 0.3 (-0.3))]
, Nothing
)
)
duplicatorSymbol =
( "duplicator"
, ( Composite { shapeSegments = [ Circle { shapeStyle = ShapeStyle { styleStrokeWidth = 2
, styleStrokeColour = RGB 250 0 0
, styleFill = coconut
}
, shapeRadius = 0.5
}
, Arc { shapeStyle = ShapeStyle { styleStrokeWidth = 2
, styleStrokeColour = RGB 250 0 0
, styleFill = coconut
}
, shapeRadius = 0.2
, shapeStart = 70.0
, shapeEnd = 270.0
, shapeCenter = DoublePoint 0.0 (-0.18)
}
, Arc { shapeStyle = ShapeStyle { styleStrokeWidth = 2
, styleStrokeColour = RGB 250 0 0
, styleFill = coconut
}
, shapeRadius = 0.2
, shapeStart = 150.0
, shapeEnd = 90.0
, shapeCenter = DoublePoint 0.0 0.18
}
]
}
, [("down",DoublePoint 0.0 0.5),("copy1",DoublePoint (-0.3) (-0.3)),("copy2",DoublePoint 0.3 (-0.3))]
, Nothing
)
)
eraseSymbol =
( "Erase"
, ( Composite { shapeSegments = [ Circle { shapeStyle = ShapeStyle { styleStrokeWidth = 2
, styleStrokeColour = RGB 250 0 0
, styleFill = coconut
}
, shapeRadius = 0.5
}
, Arc { shapeStyle = ShapeStyle { styleStrokeWidth = 2
, styleStrokeColour = RGB 250 0 0
, styleFill = coconut
}
, shapeRadius = 0.2
, shapeStart = 90.0
, shapeEnd = 270.0
, shapeCenter = DoublePoint 0.0 (-0.18)
}
, Arc { shapeStyle = ShapeStyle { styleStrokeWidth = 2
, styleStrokeColour = RGB 250 0 0
, styleFill = coconut
}
, shapeRadius = 0.2
, shapeStart = 90.0
, shapeEnd = 270.0
, shapeCenter = DoublePoint 0.0 0.18
}
]
}
, [("down",DoublePoint 0.0 0.5)]
, Nothing
)
)