Safe Haskell | Safe-Inferred |
---|
A Symbol is a bit of text enclosed in ``s, such as sharp
. When
rendered, it's turned into a special graphic that may be made up of
multiple glyphs from different fonts. The intent is to be able to write
symbols in plain ascii but have them rendered in an attractive way on the
score.
Symbols are rendered at the UI level and are generally static, so instead of sending the symbol data over every time I want to draw one, the UI level maintains a mapping between symbol names and data on how to render them.
This module is split from Ui.SymbolC so importers can avoid a C dependency.
Synopsis
- symbol :: Text -> [Glyph] -> Symbol
- simple :: Text -> Text -> Symbol
- glyph :: Text -> Glyph
- size :: Int -> Glyph -> Glyph
- glyph_at :: Int -> (Double, Double) -> Glyph -> Glyph
- type Font = String
- data Symbol = Symbol {}
- data Glyph = Glyph {
- glyph_text :: Text
- glyph_font :: Maybe Font
- glyph_size :: Int
- glyph_align :: (Double, Double)
- glyph_rotate :: Int
Documentation
A Symbol has a name and a list of the Glyphs that make it up.
If the bounding box is not given, it will be inferred from the first glyph. The bounding box will be scaled by the eventual font size. Don't pass an empty glyphs list.
Glyph | |
|