خصائص الخطوط في SVG
- الصفحة السابقة نصوص SVG
- الصفحة التالية مرشحات SVG
خصائص الخطوط في SVG
يقدم SVG مجموعة واسعة من خصائص الخطوط. في هذا الفصل، سنناقش ما يلي:
stroke
stroke-width
stroke-linecap
stroke-dasharray
جميع خصائص التطريز يمكن استخدامها لأي نوع من الخطوط والنصوص وخطوط العناصر (مثل الدوائر).
خصائص stroke لـ SVG
stroke
الخصائص تعرف لون هالة الخطوط أو النصوص أو العناصر:
هذا هو رمز SVG:
<svg height="80" width="300"> <g fill="none"> <path stroke="red" d="M5 20 l215 0" /> <path stroke="black" d="M5 40 l215 0" /> <path stroke="blue" d="M5 60 l215 0" /> </g> </svg>
خصائص stroke-width لـ SVG
stroke-width
الخصائص تعرف سمك هالة الخطوط أو النصوص أو العناصر:
هذا هو رمز SVG:
<svg height="80" width="300"> <g fill="none" stroke="black"> <path stroke-width="2" d="M5 20 l215 0" /> <path stroke-width="4" d="M5 40 l215 0" /> <path stroke-width="6" d="M5 60 l215 0" /> </g> </svg>
خصائص stroke-linecap لـ SVG
stroke-linecap
الخصائص تعرف أنواع نهايات المسارات المفتوحة المختلفة:
هذا هو رمز SVG:
<svg height="80" width="300"> <g fill="none" stroke="black" stroke-width="6"> <path stroke-linecap="butt" d="M5 20 l215 0" /> <path stroke-linecap="round" d="M5 40 l215 0" /> <path stroke-linecap="square" d="M5 60 l215 0" /> </g> </svg>
خصائص stroke-dasharray لـ SVG
stroke-dasharray
الخصائص تستخدم لإنشاء خطوط شرطية:
هذا هو رمز SVG:
<svg height="80" width="300"> <g fill="none" stroke="black" stroke-width="4"> <path stroke-dasharray="5,5" d="M5 20 l215 0" /> <path stroke-dasharray="10,10" d="M5 40 l215 0" /> <path stroke-dasharray="20,10,5,5,5,10" d="M5 60 l215 0" /> </g> </svg>
- الصفحة السابقة نصوص SVG
- الصفحة التالية مرشحات SVG