Category:SVG simplification by linecapping
Jump to navigation
Jump to search
Often it is possible to draw circle structures with the stroke-linecap=round
attribute, or rectangular ones with stroke-linecap=square
.
Examples how to draw a circle
[edit]There are different possibilities to draw a simple bordered circle as shown with this example.
- Bad solution: Very complicated drawing with cubic arcs (not a true trigonometric circle !)
- conventional:
<circle fill="#FEDE58" stroke="#000" stroke-width="10.5" x="175" cy="175" r="154"/>
or in relatives:<circle fill="#FEDE58" stroke="#000" stroke-width="3%" cx="50%" cy="50%" r="44%"/>
- with linecapping: needs two pathes,
outside border<path d="m175,175h0" stroke-width="318.5" stroke-linecap="round" stroke="#000"/>
and inside disk<path d="m175,175h0" stroke-width="298.5" stroke-linecap="round" stroke="#FEDE58"/>
- with the "a" element: as a true circle
<path fill="#FEDE58" stroke="#000" stroke-width="10.5" d="m175,21a154,154 0 1,0 0,308 154,154 0 1,0 0-308"/>
- or shortened (not a true trigonometric circle – but for most cases the small flat interval won't matter)
<path fill="#FEDE58" stroke="#000" stroke-width="10.5" d="m174,21a154,154 0 1,0 2,0z"/>
- or shortened (not a true trigonometric circle – but for most cases the small flat interval won't matter)
While the shortened version of (4) will be the best solution for simple drawings, linecapping as in (3) can be an advantage, esp. when used with the stroke-dasharray attribute.
Needless to say that a mere disk without the border becomes simpler.
Subcategories
This category has only the following subcategory.
Media in category "SVG simplification by linecapping"
The following 15 files are in this category, out of 15 total.
-
Anti-GeoGebra.svg 28 × 28; 463 bytes
-
Aspecto do sinal nº 9 de tempestade tropical de Macau em noite.svg 115 × 420; 255 bytes
-
Color guide flags.svg 700 × 850; 2 KB
-
Ecuador Asamblea 2021.svg 360 × 185; 2 KB
-
Equiangular pentagon 00.svg 300 × 300; 981 bytes
-
Flag of Vietnamese Republic (Beistean).svg 630 × 420; 300 bytes
-
Geogebra.svg 28 × 28; 416 bytes
-
HorizontalSeats.svg 296 × 120; 266 bytes
-
Kätzchen (inflorescence).svg 190 × 360; 724 bytes
-
Matsura mitu Hosi (No background and Black color drawing).svg 688 × 688; 191 bytes
-
Mitu Hosi (No background and Black color drawing).svg 688 × 688; 191 bytes
-
National Assembly of People's Power Cuba.svg 360 × 185; 9 KB
-
Traube (inflorescence).svg 330 × 662; 630 bytes
-
Wappen Friedensdorf.svg 544 × 614; 659 bytes