Wednesday, April 17, 2013

SVG - Fixed the white dot/pixel in corner between lines/ rectangle or path


Change values of the stroke-linecap property



Figure 1-15<line x1="10" y1="15" x2="50" y2="15"
    style="stroke-linecap: butt; stroke-width: 15;"/>

<line x1="10" y1="45" x2="50" y2="45"
    style="stroke-linecap: round; stroke-width: 15;"/> 

<line x1="10" y1="75" x2="50" y2="75"
    style="stroke-linecap: square; stroke-width: 15;"/>  
Figure 1-16Or change values of the stroke-linejoin attribute
<polyline
    style="stroke-linejoin: miter; stroke: black; stroke-width: 12;
    fill: none;"
    points="30 30, 45 15, 60 30"/> 

<polyline
    style="stroke-linejoin: round; stroke: black; stroke-width: 12;
    fill: none;"
    points="90 30, 105 15, 120 30"/> 

<polyline
    style="stroke-linejoin: bevel; stroke-width: 12; stroke: black;
    fill: none;"
    points="150 30, 165 15, 180 30"/> 

 Reference

https://developer.mozilla.org/en-US/docs/SVG/Tutorial/Fills_and_Strokes
http://oreilly.com/catalog/svgess/chapter/ch03.html#t7
5:27 PMtech-mashup

Related Posts:

  • SVG - Draw Arrow SVG  Sample 1 <svg xmlns="http://www.w3.org/2000/svg" viewBox="-50 -100 200 200"> <defs> <marker id='mid' orient="auto" markerWidth='2' markerHeight='4' refX='0.1' refY='1'> <!-- tr… Read More
  • SVG - Gradient in XSL with FOP graidient.svg <svg xmlns="http://www.w3.org/2000/svg" version="1.1">  <defs>    <linearGradient id="linearGradient" x1="0%" y1="0%" x2="100%" y2="0%">      <… Read More
  • SVG - Coordinate SystemsMost ProjectedCRS (Map Projection) have the north direction represented by positive values of the second axis and conversely SVG has a y-down coordinate system That's why, in order to follow the usual way to represent… Read More
  • SVG - Fixed the white dot/pixel in corner between lines/ rectangle or path Change values of the stroke-linecap property <line x1="10" y1="15" x2="50" y2="15" style="stroke-linecap: butt; stroke-width: 15;"/> <line x1="10" y1="45" x2="50" y2="45" style="stroke-linecap: roun… Read More
  • SVG Transform TranslateTranslate The translation is an elementary displacement transformation. Syntax: translate(tx, ty) tx x-coordinate of displacement ty y-coordinate of displacement Here we apply the translate transformation to the screw gro… Read More