2016-12-24 8 views
0

私はSVGでロゴを作成しようとしています。そのために、ミラーリングを行う必要があります。イムここで...SVG上の負のスケールベジェ曲線が機能しない

<svg width="1024" height="1024">\ 
    <g transform="scale(.5)"> 
      <defs> 
       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%"> 
        <stop offset="0%" style="stop-color:#FDDAC2;stop-opacity:1" /> 
        <stop offset="100%" style="stop-color:#F7984F;stop-opacity:1" /> 
       </linearGradient> 
       <linearGradient id="grad2" x1="0%" y1="0%" x2="0%" y2="100%"> 
        <stop offset="10%" style="stop-color:#e8e8e8;stop-opacity:1" /> 
        <stop offset="100%" style="stop-color:white;stop-opacity:1" /> 
       </linearGradient> 
      </defs> 
      <path d="M220 130 C 570 190, 530 250, 430 620 C 500 270, 420 190, 220 130 Z" fill="url(#grad2)" stroke="#89898C" stroke-width="4" /> 

      <path d="M220 130 C 570 190, 530 250, 430 620, C 500 270, 420 190, 220 130 Z" stroke="#89898C" stroke-width="4" fill="url(#grad2)" transform="translate(200, 0) scale(-1, 1)" /> 
     </g> 
    </svg> 

を私のパス上の負のスケール変換を使用して、私はそれが単に消え行う際にJSフィドル:https://jsfiddle.net/5bbd4r12/

私はいくつかの他の例を試してみました、非立方曲線で動作するようです。 ..助けを

おかげで、私はちょっとこの1に私の髪を引っ張ってる

答えて

1

それは(あまりにも遠くに左へ)キャンバスオフですので、あなたがそれを見ることはできません(笑)。私はあなたがそれを見ることができるように翻訳を増やしました。

<svg width="1024" height="1024"> 
 
    <g transform="scale(.5)"> 
 
      <defs> 
 
       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%"> 
 
        <stop offset="0%" style="stop-color:#FDDAC2;stop-opacity:1" /> 
 
        <stop offset="100%" style="stop-color:#F7984F;stop-opacity:1" /> 
 
       </linearGradient> 
 
       <linearGradient id="grad2" x1="0%" y1="0%" x2="0%" y2="100%"> 
 
        <stop offset="10%" style="stop-color:#e8e8e8;stop-opacity:1" /> 
 
        <stop offset="100%" style="stop-color:white;stop-opacity:1" /> 
 
       </linearGradient> 
 
      </defs> 
 
      <path d="M220 130 C 570 190, 530 250, 430 620 C 500 270, 420 190, 220 130 Z" fill="url(#grad2)" stroke="#89898C" stroke-width="4" /> 
 

 
      <path d="M220 130 C 570 190, 530 250, 430 620, C 500 270, 420 190, 220 130 Z" stroke="#89898C" stroke-width="4" fill="url(#grad2)" transform="translate(450, 0) scale(-1, 1)" /> 
 
     </g> 
 
    </svg>

+0

まあ...私は今愚かな感じ、私は...対称ポイントが何らかの理由で右側になります非常に多くの まあおかげで思いました! –

関連する問題