Inkscape.org
Beginners' Questions Changing angle of gradient precisely
  1. #1
    Jonteemil Jonteemil @Jonteemil

    I don't like it when objects are clipped. I want them just natural. With normal nodes you can enter the x and y coordinates and change the position of the node. With "Linear gradient start" and "Linear gradient end" however this is not possible as far as I can tell. If I want to change the angle of the gradient precisly without just moving the gradient start and end with the mouse and hoping for the best.

    In the attached file I want to make the gradient of the right E (whose angle is horizontal) identical to the gradient of the left E (whose angle is diagonal).

    Example Gradient
  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    For numeric precision, I'd use snapping or direct entry via the XML editor.

  3. #3
    David248 David248 @David248
    *

    You can also (in select tool) enable this option (see screenshot) to preserve gradient orientation relative to the shape when you rotate it.

    Edit : sorry I misunderstood your question : I thought it was a png screenshot and not an svg file and your gradient isn't obvious (all stop appear grey in my PC).

    Quick answer :

    1. Enable snapping to bounding boxes corners.
    2. Place right E on top of left E (snap to upper-left corners).
    3. open xml editor : browse to path733 (left E). In the properties windows, click on style : copy its gradient informations (here fill: url(#linearGradient2558);)
    4. browse to path323-2 (right E). In the properties, click on style : replace fill: url(#linearGradient2570); by fill: url(#linearGradient2558);
    5. now you can move your E, don't forget to enable "Move gradients (in fill or stroke) along with the objects" options described above.

    Hope this helps.

    Explanations :

    1. In XML editor, you can see that left E and right E have not the same gradients : boths are derived from linear4 gradient. gradient2258 and gradient2570 can be explored in the defs section of xml editor. You can see that they are both derived from linear4 : xlink:href #linear4, with different transformations.
    2. I don't know precisely how and why but it looks as if coordinates for gradient position are not relative to the object but to the document : that's why you have to snap upper left corners of the two E.
    3. (don't know if what follows is clear) If you missed the snapping and aligning step described above, the gradient will have the right orientation, but start and end of the gradients will be far of the right E. (they will stay abdove the left E. Just disable "Move gradients (in fill or stroke) along with the objects", move your right E above left E to put both Start and End above right E (exactly place right E under Start and End) then re-enable "Move gradients (in fill or stroke) along with the objects" and place the right E at his right place.

     

    Gradients
Inkscape Inkscape.org Inkscape Forum Beginners' Questions Changing angle of gradient precisely