{-# LANGUAGE OverloadedStrings #-}
module Icons.Computer where
import Text.Blaze.Svg11 ((!))
import Text.Blaze.Svg11 as S
import Text.Blaze.Svg11.Attributes as A
import Core.Utils
svgComputer :: [ (String , S.Svg) ]
svgComputer :: [(String, MarkupM ())]
svgComputer =
[ (,) String
"plus" MarkupM ()
plus
, (,) String
"cancel" MarkupM ()
cancel
, (,) String
"accept" MarkupM ()
accept
, (,) String
"warning" MarkupM ()
warning
, (,) String
"minimize" MarkupM ()
minimize
, (,) String
"maximize" MarkupM ()
maximize
, (,) String
"menuDots" MarkupM ()
menuDots
, (,) String
"menuLines" MarkupM ()
menuLines
, (,) String
"powerButton" MarkupM ()
powerButton
]
plus :: Svg
plus :: MarkupM ()
plus =
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs
where
k1 :: Double
k1 = Double
0.1
k2 :: Double
k2 = Double
0.8
dirs :: AttributeValue
dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m ( Double
k1) (-Double
k1)
forall a. Show a => a -> a -> Path
l ( Double
k1) (-Double
k2)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
k1 Double
k1 Double
0 Bool
True Bool
False (-Double
k1) (-Double
k2)
forall a. Show a => a -> a -> Path
l (-Double
k1) (-Double
k1)
forall a. Show a => a -> a -> Path
l (-Double
k2) (-Double
k1)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
k1 Double
k1 Double
0 Bool
True Bool
False (-Double
k2) ( Double
k1)
forall a. Show a => a -> a -> Path
l (-Double
k1) ( Double
k1)
forall a. Show a => a -> a -> Path
l (-Double
k1) ( Double
k2)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
k1 Double
k1 Double
0 Bool
True Bool
False ( Double
k1) ( Double
k2)
forall a. Show a => a -> a -> Path
l ( Double
k1) ( Double
k1)
forall a. Show a => a -> a -> Path
l ( Double
k2) ( Double
k1)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
k1 Double
k1 Double
0 Bool
True Bool
False ( Double
k2) (-Double
k1)
Path
S.z
cancel :: Svg
cancel :: MarkupM ()
cancel =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$
MarkupM ()
plus forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Integer
45 Integer
0 Integer
0)
accept :: Svg
accept :: MarkupM ()
accept =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinejoin AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
d AttributeValue
dirs
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.3) Double
0.3 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Integer
45 Integer
0 Integer
0)
where
k1 :: Double
k1 = Double
0.1
k2 :: Double
k2 = Double
0.5
k3 :: Double
k3 = Double
1.3
dirs :: AttributeValue
dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Double
k1) (-Double
k1)
forall a. Show a => a -> a -> Path
l (-Double
k2) (-Double
k1)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
k1 Double
k1 Double
0 Bool
True Bool
False (-Double
k2) ( Double
k1)
forall a. Show a => a -> a -> Path
l ( Double
k1) ( Double
k1)
forall a. Show a => a -> a -> Path
l ( Double
k1) (-Double
k3)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
k1 Double
k1 Double
0 Bool
True Bool
False (-Double
k1) (-Double
k3)
Path
S.z
warning :: Svg
warning :: MarkupM ()
warning =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
d AttributeValue
triangleDirs
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
strokeLinejoin AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
fillRule AttributeValue
"evenodd"
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
d AttributeValue
stickPath
MarkupM ()
S.circle
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
cx (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
cy (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0.15)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
r (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
w)
where
w :: Float
w = Float
0.1
ap1 :: Float
ap1 = Float
0.36
ap2 :: Float
ap2 = Float
ap1 forall a. Num a => a -> a -> a
+ Float
w
lm1 :: Float
lm1 = (forall a. Floating a => a -> a
sqrt Float
3) forall a. Num a => a -> a -> a
* Float
ap1
lm2 :: Float
lm2 = (forall a. Floating a => a -> a
sqrt Float
3) forall a. Num a => a -> a -> a
* Float
ap2
y1 :: Float
y1 = -Float
0.3
y2 :: Float
y2 = -Float
0.05
triangleDirs :: AttributeValue
triangleDirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Float
0 (-Float
2forall a. Num a => a -> a -> a
*Float
ap2)
forall a. Show a => a -> a -> Path
l (-Float
lm2) ( Float
ap2)
forall a. Show a => a -> a -> Path
l ( Float
lm2) ( Float
ap2)
Path
S.z
forall a. Show a => a -> a -> Path
m Float
0 (-Float
2forall a. Num a => a -> a -> a
*Float
ap1)
forall a. Show a => a -> a -> Path
l (-Float
lm1) ( Float
ap1)
forall a. Show a => a -> a -> Path
l ( Float
lm1) ( Float
ap1)
Path
S.z
stickPath :: AttributeValue
stickPath = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Float
w) Float
y1
forall a. Show a => a -> a -> Path
l (-Float
wforall a. Fractional a => a -> a -> a
/Float
2) Float
y2
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa ( Float
wforall a. Fractional a => a -> a -> a
/Float
2) (Float
wforall a. Fractional a => a -> a -> a
/Float
2) Float
0 Bool
True Bool
False (Float
wforall a. Fractional a => a -> a -> a
/Float
2) Float
y2
forall a. Show a => a -> a -> Path
l ( Float
w) Float
y1
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
w Float
w Float
0 Bool
True Bool
False (-Float
w) Float
y1
Path
S.z
minimize :: Svg
minimize :: MarkupM ()
minimize =
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs
where
w :: Double
w = Double
0.1
k :: Double
k = Double
0.7
dirs :: AttributeValue
dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Double
k) (-Double
w)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa ( Double
w) ( Double
w) Double
0 Bool
True Bool
False (-Double
k) ( Double
w)
forall a. Show a => a -> a -> Path
l ( Double
k) ( Double
w)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa ( Double
w) ( Double
w) Double
0 Bool
True Bool
False ( Double
k) (-Double
w)
Path
S.z
maximize :: Svg
maximize :: MarkupM ()
maximize =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs1
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (Double
k forall a. Num a => a -> a -> a
- Double
0.15) (Double
0.15 forall a. Num a => a -> a -> a
- Double
k))
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.opacity AttributeValue
"0.5"
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs2
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate ( - Double
0.15) Double
0.15)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs1
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.1 ) Double
0.1)
where
w :: Double
w = Double
1.4
k :: Double
k = Double
0.25
dirs1 :: AttributeValue
dirs1 = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Double
0.5 forall a. Num a => a -> a -> a
* Double
w) (-Double
0.5 forall a. Num a => a -> a -> a
* Double
w)
forall a. Show a => a -> a -> Path
l ( Double
0.5 forall a. Num a => a -> a -> a
* Double
w) (-Double
0.5 forall a. Num a => a -> a -> a
* Double
w)
forall a. Show a => a -> a -> Path
l ( Double
0.5 forall a. Num a => a -> a -> a
* Double
w) ( Double
0.5 forall a. Num a => a -> a -> a
* Double
w)
forall a. Show a => a -> a -> Path
l (-Double
0.5 forall a. Num a => a -> a -> a
* Double
w) ( Double
0.5 forall a. Num a => a -> a -> a
* Double
w)
Path
S.z
dirs2 :: AttributeValue
dirs2 = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Double
0.5forall a. Num a => a -> a -> a
*Double
w forall a. Num a => a -> a -> a
+ Double
k) (-Double
0.5forall a. Num a => a -> a -> a
*Double
w forall a. Num a => a -> a -> a
- Double
k)
forall a. Show a => a -> a -> Path
l ( Double
0.5forall a. Num a => a -> a -> a
*Double
w forall a. Num a => a -> a -> a
+ Double
k) (-Double
0.5forall a. Num a => a -> a -> a
*Double
w forall a. Num a => a -> a -> a
- Double
k)
forall a. Show a => a -> a -> Path
l ( Double
0.5forall a. Num a => a -> a -> a
*Double
w forall a. Num a => a -> a -> a
+ Double
k) ( Double
0.5forall a. Num a => a -> a -> a
*Double
w forall a. Num a => a -> a -> a
- Double
k)
menuDots :: Svg
=
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
Float -> MarkupM ()
dot (-Float
0.7)
Float -> MarkupM ()
dot ( Float
0 )
Float -> MarkupM ()
dot ( Float
0.7)
where
dot :: Float -> MarkupM ()
dot Float
y =
MarkupM ()
circle
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.cy (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
y)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cx AttributeValue
"0"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.r AttributeValue
"0.2"
menuLines :: Svg
=
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d (Double -> AttributeValue
line (-Double
0.5))
MarkupM ()
S.path forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d (Double -> AttributeValue
line ( Double
0 ))
MarkupM ()
S.path forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d (Double -> AttributeValue
line ( Double
0.5))
where
kx :: Double
kx = Double
0.7
r :: Double
r = Double
0.12
line :: Double -> AttributeValue
line Double
y = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Double
kx) (Double
y forall a. Num a => a -> a -> a
- Double
r)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r Double
r Double
0 Bool
True Bool
False (-Double
kx) (Double
y forall a. Num a => a -> a -> a
+ Double
r)
forall a. Show a => a -> a -> Path
l ( Double
kx) (Double
y forall a. Num a => a -> a -> a
+ Double
r)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r Double
r Double
0 Bool
True Bool
False ( Double
kx) (Double
y forall a. Num a => a -> a -> a
- Double
r)
Path
S.z
powerButton :: S.Svg
powerButton :: MarkupM ()
powerButton =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
d AttributeValue
innerCircle
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 Double
0.1)
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
d AttributeValue
littleStickPath
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 (-Double
0.42))
where
w :: Double
w = Double
0.08
r1 :: Double
r1 = Double
0.7
r2 :: Double
r2 = Double
r1 forall a. Num a => a -> a -> a
+ Double
2forall a. Num a => a -> a -> a
*Double
w
α :: Double
α = forall a. Floating a => a
pi forall a. Fractional a => a -> a -> a
/ Double
8
y1 :: Double
y1 = Double
0.4
innerCircle :: AttributeValue
innerCircle =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (Double
r1 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin Double
α) (-Double
r1 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
cos Double
α)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
w Double
w Double
0 Bool
True Bool
True ( Double
r2 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin Double
α) (-Double
r2 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
cos Double
α)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r2 Double
r2 Double
0 Bool
True Bool
True (-Double
r2 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin Double
α) (-Double
r2 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
cos Double
α)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
w Double
w Double
0 Bool
True Bool
True (-Double
r1 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin Double
α) (-Double
r1 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
cos Double
α)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
True Bool
False ( Double
r1 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin Double
α) (-Double
r1 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
cos Double
α)
Path
S.z
littleStickPath :: AttributeValue
littleStickPath =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
w (-Double
y1)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
w Double
w Double
0 Bool
True Bool
False (-Double
w) (-Double
y1)
forall a. Show a => a -> a -> Path
l (-Double
w) ( Double
y1)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
w Double
w Double
0 Bool
True Bool
False ( Double
w) ( Double
y1)
Path
S.z