新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论SVG, GML, X3D, VRML, VML, XAML, AVALON, Batik等基于XML的图形技术,以及有关GIS的应用。
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - 高级XML应用『 SVG/GML/VRML/X3D/XAML 』 → 请各位高手帮忙看一道SVG的题目 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 19934 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 请各位高手帮忙看一道SVG的题目 举报  打印  推荐  IE收藏夹 
       本主题类别: DOM    
     claireni 美女呀,离线,快来找我吧!
      
      
      等级:大一新生
      文章:3
      积分:63
      门派:XML.ORG.CN
      注册:2009/2/4

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给claireni发送一个短消息 把claireni加入好友 查看claireni的个人资料 搜索claireni在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看claireni的博客楼主
    发贴心情 请各位高手帮忙看一道SVG的题目

    一个正方形,边是红色的,里面有4个三角形,2个蓝色左边的角上,2个绿色在右边的角上。中间是一个黄色的圆,半径为50.

    1. 第3秒的时候,在正方形里。所有的三角形往相反的方向移动,正好移动到圆的里面,正方形的中心位置。同时圆的半径变大为100

    2.第6秒的时候,在正方形里。所有三角形继续往相反方向移动到完全相反的位置。同时圆的半径变大为150.

    下面是我写的。圆可以变大,但是三角形移动的很不正常。。。。。

    <?xml version="1.0" standalone="no"?>

    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

    <svg width="100%" height="100%" version="1.1"
    xmlns="http://www.w3.org/2000/svg">

    <rect id="rec" x="300" y="100" width="500" height="500" style="fill:white;stroke-width:1;stroke:red"/>

    <g>
    <circle cx="550" cy="350" r="50" style="fill:yellow">
    <animate attributeName="r" from="50" to="100" begin="0s" dur="3s"/>
    </circle>
    <animate attributeName="r" from="100" to="150" begin="3s" dur="3s"/>
    </g>

    <g>
    <polygon id="up_left" points="300,200 350,100 400,200" style="fill:blue">
    <animatMotion path="M0 0 L200 200" begin="0s" dur="3s"/>
    </polygon>
    <animateMotion path="M0 0 L200 200" begin="3s" dur="3s"/>
    </g>

    <g>
    <polygon id="up_right" points="700,200 750,100 800,200" style="fill:green">
    <animatMotion path="M0 0 L-200 200" begin="0s" dur="3s"/>
    </polygon>
    <animateMotion path="M0 0 L-200 200" begin="3s" dur="3s"/>
    </g>

    <g>
    <polygon id="down_left" points="300,600 350,500 400,600" style="fill:blue">
    <animatMotion path="M0 0 L200 -200" begin="0s" dur="3s"/>
    </polygon>
    <animateMotion path="M0 0 L200 -200" begin="3s" dur="3s"/>
    </g>

    <g>
    <polygon id="down_left" points="700,600 750,500 800,600" style="fill:green">
    <animatMotion path="M0 0 L-200 -200" begin="0s" dur="3s"/>
    </polygon>
    <animateMotion path="M0 0 L-200 -200" begin="3s" dur="3s"/>
    </g>

    </svg>


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/6/8 23:07:00
     
     vachin 帅哥哟,离线,有人找我吗?
      
      
      等级:大二期末(汇编考了97分!)
      文章:62
      积分:423
      门派:XML.ORG.CN
      注册:2006/6/9

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给vachin发送一个短消息 把vachin加入好友 查看vachin的个人资料 搜索vachin在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看vachin的博客2
    发贴心情 
    <?xml version="1.0" standalone="no"?>

    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

    <svg width="100%" height="100%" version="1.1"
    xmlns="http://www.w3.org/2000/svg">

    <rect id="rec" x="300" y="100" width="500" height="500" style="fill:white;stroke-width:1;stroke:red"/>

    <g>
    <circle cx="550" cy="350" r="50" style="fill:yellow">
    <animate attributeName="r" from="50" to="150" begin="0s" dur="6s"/>
    </circle>
    </g>

    <g>
    <polygon id="up_left" points="300,200 350,100 400,200" style="fill:blue">
    <animateMotion path="M0 0 L400 400" begin="0s" dur="6s"/>
    </polygon>
    </g>

    <g>
    <polygon id="up_right" points="700,200 750,100 800,200" style="fill:green">
    </polygon>
    <animateMotion path="M0 0 L-400 400" begin="0s" dur="6s"/>
    </g>

    <g>
    <polygon id="down_left" points="300,600 350,500 400,600" style="fill:blue">
    </polygon>
    <animateMotion path="M0 0 L400 -400" begin="0s" dur="6s"/>
    </g>

    <g>
    <polygon id="down_left" points="700,600 750,500 800,600" style="fill:green">
    </polygon>
    <animateMotion path="M0 0 L-400 -400" begin="0s" dur="6s"/>
    </g>

    </svg>

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/6/10 12:45:00
     
     claireni 美女呀,离线,快来找我吧!
      
      
      等级:大一新生
      文章:3
      积分:63
      门派:XML.ORG.CN
      注册:2009/2/4

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给claireni发送一个短消息 把claireni加入好友 查看claireni的个人资料 搜索claireni在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看claireni的博客3
    发贴心情 
    谢谢谢谢!!!!!

    以下是引用vachin在2009-6-10 12:45:00的发言:
    <?xml version="1.0" standalone="no"?>

    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

    <svg width="100%" height="100%" version="1.1"
    xmlns="http://www.w3.org/2000/svg">

    <rect id="rec" x="300" y="100" width="500" height="500" style="fill:white;stroke-width:1;stroke:red"/>

    <g>
    <circle cx="550" cy="350" r="50" style="fill:yellow">
    <animate attributeName="r" from="50" to="150" begin="0s" dur="6s"/>
    </circle>
    </g>

    <g>
    <polygon id="up_left" points="300,200 350,100 400,200" style="fill:blue">
    <animateMotion path="M0 0 L400 400" begin="0s" dur="6s"/>
    </polygon>
    </g>

    <g>
    <polygon id="up_right" points="700,200 750,100 800,200" style="fill:green">
    </polygon>
    <animateMotion path="M0 0 L-400 400" begin="0s" dur="6s"/>
    </g>

    <g>
    <polygon id="down_left" points="300,600 350,500 400,600" style="fill:blue">
    </polygon>
    <animateMotion path="M0 0 L400 -400" begin="0s" dur="6s"/>
    </g>

    <g>
    <polygon id="down_left" points="700,600 750,500 800,600" style="fill:green">
    </polygon>
    <animateMotion path="M0 0 L-400 -400" begin="0s" dur="6s"/>
    </g>

    </svg>


    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/6/10 17:27:00
     
     猫哥猫哥 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:7
      积分:68
      门派:XML.ORG.CN
      注册:2008/4/8

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给猫哥猫哥发送一个短消息 把猫哥猫哥加入好友 查看猫哥猫哥的个人资料 搜索猫哥猫哥在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看猫哥猫哥的博客4
    发贴心情 
    精华啊   不过我已经看过了 哈哈 还是顶下  *^__^*
                
       
         
           
        
        
      
         
          
    ------------------------------------------------------------
    林心如[url=http://www.gw365.com/bjp/qianer/3779.asp]终极瘦身[/url]夜晚,夜晚,发亮的血癌,红野鸡嗉子在火光中溅出烈焰
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/7/6 23:42:00
     
     suki8130 美女呀,离线,快来找我吧!
      
      
      等级:大一新生
      文章:5
      积分:80
      门派:XML.ORG.CN
      注册:2009/4/27

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给suki8130发送一个短消息 把suki8130加入好友 查看suki8130的个人资料 搜索suki8130在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看suki8130的博客5
    发贴心情 
    我是一个刚刚接触svg的初学者,我想问一下你们编写这些代码时直接在文本文档里编写的吗?还是有其他的工具?   还有就是我要编写一个一个柱状图,如何把它弄到正中央显示?希望前辈可以指教一下,谢谢!!
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">


    <svg version="1.1" id="chart1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
      width="80.566px" height="130.478px" viewBox="0 0 80.566 130.478" enable-background="new 0 0 80.566 130.478"
      xml:space="preserve">


    <g>
     <g>
      <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="55.783" y2="119.239"/>
      <g>
       <g>
        <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="6.783" y2="116.764"/>
        <line fill="none" stroke="#000000" x1="55.783" y1="119.239" x2="55.783" y2="116.764"/>
       </g>
      </g>
     </g>
     <g>
      <g>
       <text transform="matrix(1 0 0 1 2.572 120.1003)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">100</text>
       <text transform="matrix(1 0 0 1 3.7205 100.3005)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">80</text>
       <text transform="matrix(1 0 0 1 3.7205 80.5007)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">60</text>
       <text transform="matrix(1 0 0 1 3.7205 60.7)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">40</text>
       <text transform="matrix(1 0 0 1 3.7205 40.9001)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">20</text>
       <text transform="matrix(1 0 0 1 4.8689 21.1003)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">0</text>
      </g>
      <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="6.783" y2="20.239"/>
       <g>
        <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="8.008" y2="119.239"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="99.439" x2="8.008" y2="99.439"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="79.639" x2="8.008" y2="79.639"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="59.839" x2="8.008" y2="59.839"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="40.039" x2="8.008" y2="40.039"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="20.239" x2="8.008" y2="20.239"/>
       </g>
      </g>
     <g>

    <rect x="13.643" y="20.239" stroke="#000000" stroke-width="0.5" width="35.28" height="99" id = "bar1"/>
       </g>
     </g>


    <text transform="matrix(1 0 0 1 6.03 127.8806)" font-family="'ArialMT'" font-size="8" id="text0">Number</text>
    <text transform="matrix(1 0 0 1 73.616 129.24)" font-family="'ArialMT'" font-size="8" id="text1">0</text>
    </svg>

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/9/21 16:26:00
     
     tamefox 美女呀,离线,快来找我吧!魔羯座1980-1-1
      
      
      威望:1
      等级:大四(每天看1小时莱昂氏)
      文章:129
      积分:1236
      门派:XML.ORG.CN
      注册:2005/7/6

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给tamefox发送一个短消息 把tamefox加入好友 查看tamefox的个人资料 搜索tamefox在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看tamefox的博客6
    发贴心情 改动了一点,不知是否满足你的要求
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg version="1.1" id="chart1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
    <g transform="translate(400,100) scale(2)">
    <g>
    <g>
      <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="55.783" y2="119.239"/>
      <g>
       <g>
        <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="6.783" y2="116.764"/>
        <line fill="none" stroke="#000000" x1="55.783" y1="119.239" x2="55.783" y2="116.764"/>
       </g>
      </g>
    </g>
    <g>
      <g>
       <text transform="matrix(1 0 0 1 2.572 120.1003)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">100</text>
       <text transform="matrix(1 0 0 1 3.7205 100.3005)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">80</text>
       <text transform="matrix(1 0 0 1 3.7205 80.5007)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">60</text>
       <text transform="matrix(1 0 0 1 3.7205 60.7)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">40</text>
       <text transform="matrix(1 0 0 1 3.7205 40.9001)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">20</text>
       <text transform="matrix(1 0 0 1 4.8689 21.1003)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="2.2969">0</text>
      </g>
      <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="6.783" y2="20.239"/>
       <g>
        <line fill="none" stroke="#000000" x1="6.783" y1="119.239" x2="8.008" y2="119.239"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="99.439" x2="8.008" y2="99.439"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="79.639" x2="8.008" y2="79.639"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="59.839" x2="8.008" y2="59.839"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="40.039" x2="8.008" y2="40.039"/>
        <line fill="none" stroke="#000000" x1="6.783" y1="20.239" x2="8.008" y2="20.239"/>
       </g>
      </g>
    <g>
    <rect x="13.643" y="20.239" stroke="#000000" stroke-width="0.5" width="35.28" height="99" id = "bar1"/>
       </g>
    </g>
    <text transform="matrix(1 0 0 1 6.03 127.8806)" font-family="'ArialMT'" font-size="8" id="text0">Number</text>
    <text transform="matrix(1 0 0 1 73.616 129.24)" font-family="'ArialMT'" font-size="8" id="text1">0</text>
    </g>
    </svg>

    ----------------------------------------------
    无为而无所不为
    有为而有所不为

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/9/24 23:01:00
     
     suki8130 美女呀,离线,快来找我吧!
      
      
      等级:大一新生
      文章:5
      积分:80
      门派:XML.ORG.CN
      注册:2009/4/27

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给suki8130发送一个短消息 把suki8130加入好友 查看suki8130的个人资料 搜索suki8130在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看suki8130的博客7
    发贴心情 
    非常感谢啊,我想问一下你用什么对SVG进行编写,还有就是可不可以介绍一下你学习SVG的心得啊??
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/9/28 23:37:00
     
     suki8130 美女呀,离线,快来找我吧!
      
      
      等级:大一新生
      文章:5
      积分:80
      门派:XML.ORG.CN
      注册:2009/4/27

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给suki8130发送一个短消息 把suki8130加入好友 查看suki8130的个人资料 搜索suki8130在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看suki8130的博客8
    发贴心情 请教
    非常感谢啊,我想问一下你用什么对SVG进行编写,我用文本文档进行编写,每次修改代码都要另存很麻烦?还有就是可不可以介绍一下你学习SVG的心得啊??
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/10/12 10:44:00
     
     tamefox 美女呀,离线,快来找我吧!魔羯座1980-1-1
      
      
      威望:1
      等级:大四(每天看1小时莱昂氏)
      文章:129
      积分:1236
      门派:XML.ORG.CN
      注册:2005/7/6

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给tamefox发送一个短消息 把tamefox加入好友 查看tamefox的个人资料 搜索tamefox在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看tamefox的博客9
    发贴心情 
    实在谈不上请教,我之所以没回答就是怕自己班门弄斧。。
    我编辑svg都用xmlspy,本站就有,你可以下载
    http://bbs.xml.org.cn/dispbbs.asp?boardID=35&ID=6191
    学习SVG主要是看别人的作品,需要什么,就从别人的作品中抠出来,为己所用。其实不光是SVG,学习计算机编程基本都是这样。如果有什么问题可以单独发帖~毕竟这个话题和一楼求助的内容不太搭~

    ----------------------------------------------
    无为而无所不为
    有为而有所不为

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2009/10/15 9:18:00
     
     karmib 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:1
      积分:55
      门派:XML.ORG.CN
      注册:2010/5/20

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给karmib发送一个短消息 把karmib加入好友 查看karmib的个人资料 搜索karmib在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看karmib的博客10
    发贴心情 How to write a XSLT for this XML?
    hi friend i have a code as follows:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <svg width="100%" height="100%" viewBox="0 0 214.819 278.002">
     <g id="Standard_x0020_layer">
    <g id="Catalog">
      <line stroke-width="0.353" stroke-linecap="butt" x1="5.839" y1="262.185" x2="209.039" y2="262.185"/>
      <text transform="matrix(0.984 0 0 0.93 183.515 265.271)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174"/>
      <text transform="matrix(0.994 0 0 0.93 7.235 265.3)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">087156-8-</text>
    <g>
       <path stroke="none" fill="#000000" d="M26.507 12.628L26.507 4.977 28.599 4.977 28.599 10.673 30.946 10.673 30.946 12.628 26.507 12.628z"/>
       <path stroke="none" fill="#000000" d="M19.693 12.628L19.693 4.977 21.785 4.977 21.785 7.66 23.893 7.66 23.893 4.977 25.986 4.977 25.986 12.628 23.893 12.628 23.893 9.782 21.785 9.782 21.785 12.628 19.693 12.628z"/>
       <path stroke="none" fill="#000000" d="M12.587 4.977L9.566 8.621 13.019 12.631 10.25 12.63 7.905 9.9 7.9 9.9 7.9 12.628 5.81 12.628 5.81 4.977 7.9 4.977 7.9 7.267 7.884 7.27 9.875 4.977 12.587 4.977z"/>
    </g>
    <line stroke-width="0.353" stroke-linecap="butt" x1="5.839" y1="20.455" x2="209.039" y2="20.455"/>
      <g>
       <text transform="matrix(0.996 0 0 0.93 71.95 255.181)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="2.822" font-weight="bold">**Finish/color code must be specified when ordering.</text>
    </g>
    </g>
    </svg>

    how can i generate xsl-fo style sheet for the above xml file please help me..please mail me kart_5555@co.in  please help me

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2010/5/20 12:47:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/4/28 7:41:03

    本主题贴数10,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    125.000ms