svg-icons 2.2.0.0 → 2.2.0.1
raw patch · 2 files changed
+134/−4 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ SvgIcons.Icons.Religion: crossGreek :: Svg
+ SvgIcons.Icons.Religion: dharmachakra :: Svg
+ SvgIcons.Icons.Religion: ouroboros :: Svg
Files
- src/SvgIcons/Icons/Religion.hs +133/−3
- svg-icons.cabal +1/−1
src/SvgIcons/Icons/Religion.hs view
@@ -7,10 +7,13 @@ , xp , taijitu , crossLatin - , crossOrthodox + , crossGreek , crescentAndStar , starOfDavid + , crossOrthodox + , dharmachakra , iChingHexagram + , ouroboros ) where import Data.String @@ -32,10 +35,13 @@ > [ (,) "xp" xp > , (,) "taijitu" (taijitu "black" "white") > , (,) "crossLatin" crossLatin -> , (,) "crossOrthodox" crossOrthodox +> , (,) "crossGreek" crossGreek > , (,) "crescentAndStar" crescentAndStar > , (,) "starOfDavid" starOfDavid +> , (,) "crossOrthodox" crossOrthodox +> , (,) "dharmachakra" dharmachakra > , (,) "exampleHexagram" (iChingHexagram (8,8,7,8,7,7)) +> , (,) "ouroboros" ouroboros > ] -} svgReligion :: [ (String , S.Svg) ] @@ -43,10 +49,13 @@ [ (,) "xp" xp , (,) "taijitu" (taijitu "black" "white") , (,) "crossLatin" crossLatin - , (,) "crossOrthodox" crossOrthodox + , (,) "crossGreek" crossGreek , (,) "crescentAndStar" crescentAndStar , (,) "starOfDavid" starOfDavid + , (,) "crossOrthodox" crossOrthodox + , (,) "dharmachakra" dharmachakra , (,) "exampleHexagram" (iChingHexagram (8,8,7,8,7,7)) + , (,) "ouroboros" ouroboros ] @@ -226,6 +235,37 @@ {- | + + + + + +-} +crossGreek :: Svg +crossGreek = + S.path + ! A.d dirs + where + w = 0.25 + k = 0.9 + dirs = mkPath $ do + m (-w) (-w) + l (-w) (-k) + l ( w) (-k) + l ( w) (-w) + l ( k) (-w) + l ( k) ( w) + l ( w) ( w) + l ( w) ( k) + l (-w) ( k) + l (-w) ( w) + l (-k) ( w) + l (-k) (-w) + S.z + + + +{- |   @@ -380,3 +420,93 @@ number n3 ( 1*ky) number n2 ( 3*ky) number n1 ( 5*ky) + + + +{- | + + + + + +-} +dharmachakra :: Svg +dharmachakra = + S.path + ! A.fillRule "evenodd" + ! A.strokeLinejoin "round" + ! A.d dirs + where + w = 0.07 + k = sqrt 2 + k2 = 0.5 * sqrt 2 + r1 = 0.3 + r2 = 0.8 + trapezoid β = do + m (r1 * (cos β) + (w * sqrt 2) * (cos $ β + pi/4)) + (r1 * (sin β) + (w * sqrt 2) * (sin $ β + pi/4)) + aa (r1 + w) (r1 + w) + 0 False True + (r1 * (cos $ β + pi/4) + (w * sqrt 2) * (cos β)) + (r1 * (sin $ β + pi/4) + (w * sqrt 2) * (sin β)) + l (r2 * (cos $ β + pi/4) + (w * sqrt 2) * (cos $ β - pi/2)) + (r2 * (sin $ β + pi/4) + (w * sqrt 2) * (sin $ β - pi/2)) + aa (r2 - w) (r2 - w) + 0 False False + (r2 * (cos β) + (w * sqrt 2) * (cos $ β + 3*pi/4)) + (r2 * (sin β) + (w * sqrt 2) * (sin $ β + 3*pi/4)) + S.z + outerStick β = do + aa w w 0 True True + (r2 * (cos β) + (w * sqrt 2) * (cos $ β + pi/4)) + (r2 * (sin β) + (w * sqrt 2) * (sin $ β + pi/4)) + aa (r2 + w) (r2 + w) + 0 False True + (r2 * (cos $ β + pi/4) + (w * sqrt 2) * (cos β)) + (r2 * (sin $ β + pi/4) + (w * sqrt 2) * (sin β)) + dirs = mkPath $ do + m 0.001 (r1 - w) + aa (r1 - w) (r1 - w) 0 True False 0 (r1 - w) + S.z + mapM_ (trapezoid . (pi/4 *)) [0..7] + m (r2 + w) (-w) + mapM_ (outerStick . (pi/4 *)) [0..7] + S.z + + + +{- | + + + + + +-} +ouroboros :: Svg +ouroboros = + S.g $ + S.g + ! A.transform (translate 0 0.05 <> rotateAround 30 0 0) + $ do + S.path + ! A.fillRule "evenodd" + ! A.d dirs + S.circle + ! A.cx "-0.25" + ! A.cy "-0.8" + ! A.r " 0.01" + where + w = 0.1 + r = 0.78 + β = -pi/2 - pi/6 + r1 = 0.35 + r2 = 0.26 + dirs = mkPath $ do + m 0 (- r - w) + aa w w 0 True False 0 (- r + w) + aa (r - w) (r - w) 0 True True ((r-w) * cos β) ((r-w) * sin β) + aa r1 r1 0 False False 0 (- r + w) + aa w w 0 True True 0 (- r - w) + aa r2 r2 0 False False ((r+w) * cos β) ((r+w) * sin β) + aa (r + w) (r + w) 0 True False 0 (- r - w) + S.z
svg-icons.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: svg-icons -version: 2.2.0.0 +version: 2.2.0.1 homepage: https://github.com/RamiroPastor/SvgIcons license: BSD-3-Clause license-file: LICENSE