How can I draw a circular arc segment with a gradient fill?

Asked by Charles Brauer

Suppose I create a long thin rectangle.
I then want to fill the rectangle with a linear gradient where the starting color is red and the ending color is green.
I want to bend the rectangle around the edge of a circle.
This is like a border of an arc circle with a gradient fill.

Thanks in advance.

Charles

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
Best su_v (suv-lp) said :
#1

> I want to bend the rectangle around the edge of a circle.
> This is like a border of an arc circle with a gradient fill.

You can't bend a linear gradient in Inkscape (SVG restriction), so you'd better create your radially shaded object (rectangle bent around circle) by actually using an arc segment (created with the ellipse tool) with the stroke width set corresponding to to the height of your "long thin rectangle" and a radial gradient for the stroke color (centered on the midpoint of the circle). You can precisely adjust the angles of start and end point of the arc segment on the controls bar of the ellipse tool.

You can then use 'Path > Stroke to Path' if you only want the outline of the 'bent rectangle' defined as path and no longer need to edit the initial ellipse parameters.

example file:
<http://imgh.us/bent-rectangle-with-gradient-1.svg>

Revision history for this message
Charles Brauer (cbrauer) said :
#2

Thanks ~suv, that solved my question.