Fill gradient behaviour in line end styles

Started by GPriestland, April 10, 2022, 05:42:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GPriestland

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

Yacine

vojo

simple square  linear gradient of a blue - white - blue  works for me as I rotate around

GPriestland

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

You can simulate a gradient by superposing semi-transparent shapes.
Have a look at my upload.
Yacine

GPriestland

Quote from: Yacine on April 12, 2022, 01:19:51 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!