# Drawing Api: Line gradients

**URL:** <https://forum.kirupa.com/t/drawing-api-line-gradients/111312>\
**Category:** Uncategorized\
**Created:** [May 25, 2004, 7:44pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312 "2004-05-25T19:44:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ordinathorreur](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ordinathorreur/32/536_2.png) [@Ordinathorreur](https://forum.kirupa.com/u/Ordinathorreur)\
**Post date:** [May 25, 2004, 7:44pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/1 "2004-05-25T19:44:47Z")

</div>

Can I apply a gradient to a line I drew with the drawing api? Or can I only use gradients on the fill? :puzzle:

I want to draw a line with the api that fades from left to right (to be a little more specific)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 25, 2004, 7:55pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/2 "2004-05-25T19:55:20Z")

</div>

youd need to do a fill.

The only way to do it with lines is a bunch of little lines drawn at varying differences of color to create the gradient (though each line itself is just a small segment of solid color - together they would give the impression of a gradient)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 2:38am UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/3 "2004-05-26T02:38:09Z")

</div>

> [@senocular](#):
>
> youd need to do a fill.
> 
> The only way to do it with lines is a bunch of little lines drawn at varying differences of color to create the gradient (though each line itself is just a small segment of solid color - together they would give the impression of a gradient)

Thanks for the idea… wil have to play around with that…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 3:01am UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/4 "2004-05-26T03:01:02Z")

</div>

or you could just make a gradient, and use a line mask ;D

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 3:40am UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/5 "2004-05-26T03:40:44Z")

</div>

there’s a ‘convert lines to fill’ function in the modify menu that allows you to change your line to a fill (hints the name) and then add a gradient

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 1:32pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/6 "2004-05-26T13:32:38Z")

</div>

how about a 1pixel width fill? 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 2:15pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/7 "2004-05-26T14:15:02Z")

</div>

> [@MissionSix](#):
>
> or you could just make a gradient, and use a line mask ;D

cant use lines as masks 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 2:15pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/8 "2004-05-26T14:15:52Z")

</div>

> [@bombingpixels](#):
>
> there’s a ‘convert lines to fill’ function in the modify menu that allows you to change your line to a fill (hints the name) and then add a gradient

he wants to use the drawing api which doesnt make that possible

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 9:42pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/9 "2004-05-26T21:42:01Z")

</div>

yeah, but he could draw the line using the drawing api and then use that function

[edit]wait a minute, what’s the drawing api lol[/edit]

[edit]oh yeah, I remember, hmmmm… you’re right, blast[/edit]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 9:43pm UTC](https://forum.kirupa.com/t/drawing-api-line-gradients/111312/10 "2004-05-26T21:43:58Z")

</div>

I’d just draw a one pixel tall rect. and fill that
