Hi,
Is there a way to apply a gradient colour to a line (without converting to editable shape or using a brush) as part of a shape ie rectangle etc?
Many thanks
Martin
Printable View
Hi,
Is there a way to apply a gradient colour to a line (without converting to editable shape or using a brush) as part of a shape ie rectangle etc?
Many thanks
Martin
Hi Martin, there seems to be now way that I know of applying a gradient to a line without converting it.
But you can apply transparency to a line once a stroke shape (in the line gallery) is applied to to it.
Regards,
Marc
Just create your gradient in a shape that is big enough to cover the line, with the line behind select both and apply clipview.
Clever!
Very clever!
its a sort of way Mark - what you get is a clipview group.
so unless I have missed something you need to remove the clipview to edit the line as a line - and then reapply - so the gradient will not therefore be edited along with the line shape
this was discussed somewhere - but I've lost the link :o
Sorry, I should have been more clear, to edit the line; CTRL select the group and press tab, the line is then selected and can be edited as normal- as long your editing doesn't move the line beyond the bounds of the shape containing the gradient everything works fine.
Am I missing something? The line was placed behind the filled rectangle before applying the ClipView.
Hey that works - knew I was missing something - Thanks Mark nice one :)
You are right Bill it doesn't work for enclosed shapes, the line would have to be broken so that defeats the object I suppose.
Thanks Mark, I'll have to remember this one!
Marc
of course the 'line' round a shape is not really a line its a 'shape outline'
here is a an unclosed line that looks closed but it isn't - with Marks cilpview applied [see xar file - done freehand so quite a few nodes - may take a while to open]
done just to see if I could do it ;)
Steve beat me to it.
Eric
no breaks - this was drawn as a line taking great care not to let the nodes join up at the ends [need to have your freehand detect taken right down in registry - mine is set at zero - or the darn thing will just join automatically :D]
Thanks for all your help.
Seems it is not a straight forward option in XaraX. The best I can muster is to simply simulate it by copy paste enlarge and subtract. As in attachment.
The problem with this is that the line thickness varies around the circumference.
I did think that I could use intersect, but the intersect function takes no account of the line thickness, ie if the intersecting shape has a line width of zero or 100pix the result is as if there was no line - so this won't work.
Many thanks again
Martin
If you want to do it that way, the take the shape, add a bevel (size to suit) - change the light elevation to 90° to flatten out the bevel and add the gradient fill to the bevel - add as many colours as you like to the gradient. You could also make the shape itself transparent to give a line effect.
Thanks Keith
That seems to be the answer - I will now experiment a bit.
The fill and the bevel (line!?) can be filled independantly as you say.
Martin
More playing and investigating:
If you add a bevel to a single line (start with external bevel so you can see what your doing) , change light elevation to 90 and add a linear gradient you can adjust the bevel internally to fill the line. The line still exhibits all the properties of a line and can still be shaped with the shape editor.
Have included the .xar for anyone interested.
Hello. I just read these posts and try things out sometimes for practice (mostly when I'm killing time at work ;) ). I don't really know what I'm doing. I was trying to do what Keith suggested - I got as far as adding the bevel, adjusting the light elevation and then it came to a screeching halt. How do I add a gradient fill? Sorry for the stupid question!
Keith thats good too - some banding on the line in your xar file - but then my
example in post #12 isn't perfect :rolleyes:
Depends what you want to do
SHERI -CHAN
You need to select the bevel only with the selection tool and then with the fill tool leftclick+drag with the mouse in the direction you want the gradient fill to go
Yes, I noticed that banding too, but given the zoom to see it, it's probably acceptable.
yes - thats what I though regarding artifacts on mine :)
What is the reason for not converting to editable shapes? It seems easier than the workarounds given here, especially if you assign a keyboard shortcut to it.
Thanks Mark for the gradient line and all the others who inputted
Great Advice.
Rupert
If you're talking about converting the line, then it would no longer be editable as a line.
Changing the "shape" of the line would then be a very different proposition. Instead of a line of nodes down the middle of the line (more or less), you'd have nodes on the perimeter. OTOH, that would enable you to make a line of variable width.
My point was that the solutions being proposed are as convoluted as just converting the line to a shape, if not more so.
but not if you want to edit the line as a line after it has been given the gradient?
In the other methods, don't you have to change the clipview object? Maybe I didn't read them well enough.
-
I hadn't read them well enough. The bevel method is pretty neat, although I seem to remember that those algorithms sometimes subtly shift the colors, so double-check for that.
post #7 ?
David - if you were to make the line a shape - give it a gradient - how then do you move it as a line - in one mouse click and drag?
Its a shape is it not - both sides of the 'line' are now independent and have to be moved separately?
And if you move the shape in that way by some means the gradient does not follow with the line either - as gradients are always masked fills in xara are they not - rather than stroked to path?
David I think what Steve is saying is how do you change the line's path after it is converted to a shape.
yes - thanks Bill:)
this is what was discussed up front in this thread - and what is good about Marks method
sorry about my lax terminology, but I thought it was pretty clear from what had gone before
I think we are talking different thing here David;)
Steve is ignoring the caveat to that method that Mark indicated. That 'gotcha,' and the fact that messing around inside clipviews is sometimes hard to do, is why I call it convoluted. Steve is also saying that fills on objects are clipped to the original outline of the object, which is wrong. He is also implying that I would edit the shape in the manner he gave. I wouldn't--I'd simply create a new line, change it to a shape, and copy/paste the attributes from the original shape. That is why I acknowledged in post 29 that the bevel method is cool. But I still think the clipview method is convoluted. And notice that I used the word "as" when comparing it to my method.
David there is no "right" or "wrong" way, only personal preferences. Which ever method is satisfactory to an individual. :)
You can use your method and Steve can use his. :)
No need for convoluted debate. ;)
Agreed, and that's why you haven't seen me say my way is the best. :)
No, you didn't hear me say my way was the best either ....... :D
what I said was they are masked fills - masked by the outline of the shape - as opposed to stroke to path - you are not reading that right sorry no mention of clipping in that respect
if you expand a shape the bits of the fill that were masked come into view - but the fill is Static - as opposed to stroke to path were it would move with the shape
Bill is right - strokes for folks :)