How to create Radial in XML

In this article I have describe about example of Radial in XML.
  • 2012

Read about SVG here

Create a radial in SVG

The <radialGradient> element is defining radial gradient, it is use <defs> element in gradient in SVG.

Radial is require id attributes.

Define <radialGradient> in a circle.


<?xml version="1.0" encoding="utf-8" ?>



    <svg xmlns="" version="1.1">


        <radialGradient id="grad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">

          <stop offset="0%" style="stop-color:rgb(255,255,255);

      stop-opacity:0" />

          <stop offset="100%" style="stop-color:rgb(255,o,o);stop-opacity:1" />



      <circle cx="200" cy="50" r="30" fill="url(#grad1)" />







Define the code

  • XML define the namespace and version use the program.
  • <radialGradient> is define the radial in a circle
  • stop process is define range of radian
  • <circle> is create a circle shape and style is show the color of the circle.
  • The <circle> element links the element to the (#grad1)

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.