This is a really basic question, but this is the first time I've tried to design something from scratch in SVG, and I'm struggling… I want to reproduce this:
So a rounded rectangle perfectly divides in two by the diagonal, with a different color and border color for each part. I tried to start from a basic rounded rectangle and divide it in two using a triangle shape but:
- I have a border replacing the diagonal (logic since this is now a border of a "triangle"). - The round angle between my two parts, at the "junction part", is not really round anymore (cf screenshot in gallery).
I'll be grateful if you have any hints or tutorials on how to realize such a shape.
What I‘d try: draw one rounded rectangle and convert with Path->Object to Path. Then place nodes where you want the diagonal start respectice ends. Select these 2 nodes and hit „Break path at selected nodes“. Now go Path->Break apart. You have now 2 separate objects ready to add color to fill and stroke. If you want a single color stroke you can simply use a gradient with 2 colors and 4 stops - 2 of different colors but in the same spot as a fill color.
If you want a single color stroke you can simply use a gradient with 2 colors and 4 stops - 2 of different colors but in the same spot as a fill color.
For the second method (with one single rectangle and gradients), You can also use a two stops gradient (one red, one green) :
use snapping to guides + nodes (no need to specify one type of node) + objects rotation center
drag from rulers two (vertical and horizontal) guides on rectangle center
set a gradient as a fill using fill and stroke panel
with node tool, move the gradient handles to guides intersection. You might have to move one handle very slightly (disable snapping) if fill turns brown.
Hey!
This is a really basic question, but this is the first time I've tried to design something from scratch in SVG, and I'm struggling…
I want to reproduce this:
So a rounded rectangle perfectly divides in two by the diagonal, with a different color and border color for each part.
I tried to start from a basic rounded rectangle and divide it in two using a triangle shape but:
- I have a border replacing the diagonal (logic since this is now a border of a "triangle").
- The round angle between my two parts, at the "junction part", is not really round anymore (cf screenshot in gallery).
I'll be grateful if you have any hints or tutorials on how to realize such a shape.
Thanks!
What I‘d try: draw one rounded rectangle and convert with Path->Object to Path. Then place nodes where you want the diagonal start respectice ends. Select these 2 nodes and hit „Break path at selected nodes“. Now go Path->Break apart. You have now 2 separate objects ready to add color to fill and stroke. If you want a single color stroke you can simply use a gradient with 2 colors and 4 stops - 2 of different colors but in the same spot as a fill color.
(Wasn´t in front of Inkscape 😅)
Polygon already answered with these two smart methods. I'd just add :
You mean : (use node tool and) hit "Break path at selected nodes" button (5th button from left in tool control bar).
For the second method (with one single rectangle and gradients), You can also use a two stops gradient (one red, one green) :
Or like so:
Thanks, Polygon, a better solution.
Hey!
Thanks a lot for your help with your instruction, I managed to do what I wanted :D