Author Topic: Fill gradient behaviour in line end styles  (Read 1266 times)

0 Members and 1 Guest are viewing this topic.

GPriestland

  • Newbie
  • *
  • Posts: 4
Fill gradient behaviour in line end styles
« on: April 10, 2022, 12:42:11 PM »
Revisiting this after 4 years!  http://visguy.com/vgforum/index.php?topic=8628.msg37616#msg37616


I got no further last time so hopefully someone can help this time...

I created multiple electrical connectors using gradient fill with transparency shading to show a sort of 3D corner effect.  These work fine on their own but when I tried to use them as line end styles the angle of the gradients seems to refer back to the angle of the line and not the shape that creates the line end.  Is there a way to prevent this behavour? 

Hopefully the attached image shows what I mean.



Yacine

  • Hero Member
  • *****
  • Posts: 3208
Re: Fill gradient behaviour in line end styles
« Reply #1 on: April 11, 2022, 10:58:46 AM »
Can you upload the drawing?
Yacine

vojo

  • Hero Member
  • *****
  • Posts: 1710
Re: Fill gradient behaviour in line end styles
« Reply #2 on: April 11, 2022, 05:46:06 PM »
simple square  linear gradient of a blue - white - blue  works for me as I rotate around

GPriestland

  • Newbie
  • *
  • Posts: 4
Re: Fill gradient behaviour in line end styles
« Reply #3 on: April 12, 2022, 04:08:57 AM »
I simplfied the line and end styles - see the attached drawing for examples

I created 1 of the lines and ends using gradient fill and the other using overlapped shapes will solid fill and 95% transparency.  This behaves way better but is much more time consuming to draw and can be quite CPU intensive.

Yacine

  • Hero Member
  • *****
  • Posts: 3208
Re: Fill gradient behaviour in line end styles
« Reply #4 on: April 12, 2022, 08:19:51 AM »
You can simulate a gradient by superposing semi-transparent shapes.
Have a look at my upload.
Yacine

GPriestland

  • Newbie
  • *
  • Posts: 4
Re: Fill gradient behaviour in line end styles
« Reply #5 on: April 12, 2022, 02:53:24 PM »
You can simulate a gradient by superposing semi-transparent shapes.
Have a look at my upload.

Thanks.  That is how the second line and end style work in the file I uploaded.  Works pretty well for simple shapes and lines.  However for complex line shapes  this method is a bit tedious and quite difficult to do.  Looks like I might have to do it that way anyway if gradient fill does not work.

Thanks again!