]> Git — Sourcephile - tmp/julm/arpeggigon.git/blob - RMCA/GUI/Shapes.hs
Basic GUI.
[tmp/julm/arpeggigon.git] / RMCA / GUI / Shapes.hs
1 module RMCA.GUI.Shapes where
2
3 import Graphics.Rendering.Cairo
4
5 -- Draws a regular hexagon
6 --
7 -- Colors are given in RGB format, coefficient goes from 0 to 1
8 hexagon :: (Double, Double, Double) -- Background color
9 -> (Double, Double, Double) -- Frame color
10 -> Double -- Width
11 -> Render ()
12 hexagon (backR, backG, backB) (frameR, frameG, frameB) w = do
13 setSourceRGB frameR frameG frameB
14 setLineWidth (0.1 * w)
15 return ()