News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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!

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 231 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1060KB.
Tokens: post-login.
Cache hits: 13: 0.00180s for 26,724 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]