当前位置: 动力学知识库 > 问答 > 编程问答 >

svg - Haskell Diagrams program draws circle but does not fill circle with colour

问题描述:

I have written the following program:

{-# LANGUAGE NoMonomorphismRestriction #-}

{-# LANGUAGE FlexibleContexts #-}

{-# LANGUAGE GADTs #-}

import Diagrams.Prelude

import Diagrams.Backend.SVG.CmdLine

main = mainWith (my_diagram :: Diagram B)

my_diagram = circle 1 # fc blue

# lw veryThick

# lc purple

# dashingG [0.2, 0.05] 0

But the program produces a white circle with black outline - no colour or dashing. Any one know what might be wrong?

I'm running in a sandbox on Haskell Platform 7.10.2 (Windows 8)

P.S. The diagrams version is 1.3 and the program generates the following SVG file:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"

"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg xmlns="http://www.w3.org/2000/svg" height="400.0000" stroke-opacity="1" viewBox="0 0 400 400" font-size="1" width="400.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1">

<defs>

</defs>

<defs>

</defs>

<g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="1.6" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0">

<path d="M 400.0000,200.0000 c 0.0000,-110.4569 -89.5431,-200.0000 -200.0000 -200.0000c -110.4569,-0.0000 -200.0000,89.5431 -200.0000 200.0000c -0.0000,110.4569 89.5431,200.0000 200.0000 200.0000c 110.4569,0.0000 200.0000,-89.5431 200.0000 -200.0000Z"/>

</g>

</svg>

分享给朋友:
您可能感兴趣的文章:
随机阅读: