Inverse Round Corners on a Transparent Rectangle?

Post questions on how to use or achieve an effect in Inkscape.
boundless_84
Posts: 2
Joined: Sun Mar 17, 2013 1:55 am

Inverse Round Corners on a Transparent Rectangle?

Postby boundless_84 » Thu Mar 28, 2013 12:22 pm

So, I'm not sure if the title is even accurate to describe what I want to accomplish. I've included a screenshot below with an orange arrow showing the effect that I want to achieve. I understand a way to accomplish this by combining several basic and filled shapes, but it wouldn't work for a transparent rectangle. I need this to be a transparent rectangle, but with the quarter radius inverted corner in all 4 corners of the rectangle. Any thoughts? Thanks!

Image

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby druban » Thu Mar 28, 2013 7:03 pm

The simplest way to achieve your goal is to position a circle over the corner of the rectangle you want to trim and do a path menu difference.
rect9.png
rect9.png (60.42 KiB) Viewed 7072 times
Your mind is what you think it is.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Inverse Round Corners on a Transparent Rectangle?

Postby Xav » Thu Mar 28, 2013 9:52 pm

What Druban said.

But be aware that your "rectangle" is now a path. If you need to resize it you won't be able to use the :tool_rectangle: tool to do so, as you might with a normal rounded rectangle. Using :tool_selector: and the resize handles is likely to distort the corners into ellipses. Instead you'll have to use :tool_node: then select all the nodes at one end (or all those at the top/bottom to change the height) and use the arrow keys to move them. You'll need to do the width and height separately. It sounds harder than it is.

If you might need to edit the corners - perhaps to create even fancier versions - you could try drawing one quarter of your rectangle, then creating three clones for the other quarters. You can flip and reposition the clones to recreate the whole rectangle, but now any edits you make to the original corner will automatically be applied to the other three corners as well.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby druban » Fri Mar 29, 2013 7:26 am

What Xav said! :lol:
Once you edit your rectangle resizing and keeping your corners circular (rather than elliptical) becomes a chore. Showing and snapping to the grid makes things much easier, as does using ctrl-drag.
Here's an alternative way to achieve your object. I like this way a bit better than the circles because the nodes in the result are more precisely positioned.
Create a rectangle. Try to snap it to the grid when doing so!
Hold down ctrl and drag the little circular handles to round the corners circularly.
CTRL SHIFT C to convert to a path.
Switch to the :tool_node: tool. CTRL A to select all.
SHIFT B to break the path at each node. Now you have four straight lines and four lovely little quarter circle arcs.
Click on each arc, press V, then H. This should flip the arcs into your desired orientation.
Now CTRL ALT A to select all the nodes in all the sub-paths. SHIFT J to join them back into a path.

Note that when you want to resize this path in a non proportional way you will have to drag each PAIR of corner nodes to its new location. It's also up to you to make sure the sides are straight...
Your mind is what you think it is.

boundless_84
Posts: 2
Joined: Sun Mar 17, 2013 1:55 am

Re: Inverse Round Corners on a Transparent Rectangle?

Postby boundless_84 » Fri Mar 29, 2013 11:42 am

Thanks everyone! It worked great; exactly what I wanted!

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inverse Round Corners on a Transparent Rectangle?

Postby Lazur » Sat Mar 30, 2013 3:10 am

Seems this one is solved, but
is there a way to create such object as dynamic blocks -using this term as remembering autocad had a function with that name-?
Like word has an option to draw that kind of cornered rectangles, and it's not even a drawing program. There should be a way to add new object drawing tools like the rectangle and the ellipse tool.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Inverse Round Corners on a Transparent Rectangle?

Postby brynn » Sat Mar 30, 2013 11:13 pm

I'm not familiar with autocad features. Are you asking about adding a feature to the Rectangle tool, that would make the concave corners, in a similar way that it makes the rounded (convex) corners? You know how you an submit new feature requests at Launchpad, don't you? Or do I not understand your question?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby druban » Sun Mar 31, 2013 6:53 am

The next version of Inkscape will have a symbols panel. I suppose you could have a library of rectangles in a symbols file.
I imagine when deciding what 'tools' to include the programmers look at the space such a tool or option would take up versus the frequency with which it will be used. I suspect concave cornered rectangles are relatively low occurrence compared to rounded rectangles.
Your mind is what you think it is.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inverse Round Corners on a Transparent Rectangle?

Postby Lazur » Sun Mar 31, 2013 7:20 am

I was thinking of a way to "predefine" your own shapes. As the mentioned word has plenty of basic shapes, all with parameters. Like a simple arrow for example.
You can set the parameters by the shape's handles -as the rounded corners of the rectangle or the star's spikes. What if you could add your own designed basic shapes next to ellipse and rectangle tool, that you can later modify with such handles? How to do that?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby druban » Sun Mar 31, 2013 5:50 pm

.
Lazur URH wrote:You can set the parameters by the shape's handles -as the rounded corners of the rectangle or the star's spikes. What if you could add your own designed basic shapes next to ellipse and rectangle tool, that you can later modify with such handles? How to do that?
If you don't like the idea of using the symbols, write an extension and put it under extensions>render.
Your mind is what you think it is.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby flamingolady » Mon Apr 01, 2013 6:56 am

Would it be hard to add in an inverse feature to the rectangle? Right now if we move the little circle (top, right hand side) of the rectangle function we get a rounded corner, what if someone added the inverse to the bottom, left hand side, (where you'd get all four corners inverted at the same time)? seems easy enough.... Though I do really like the suggestions to add rounded ends to stars and such, such great ideas!

Though the inverse question has already been addressed, may I just toss in my 2 cents worth for another (artsy vs technical) way of doing this. I would have created 4 circles (duplicated ones), and used the align tool to ensure they were lined up, then did the path/difference thing. For some reason, grids, snapping and I don't get along very well, not sure why, but I usually end up getting mad at it anyway.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby druban » Mon Apr 01, 2013 7:19 pm

flamingolady wrote: Right now if we move the little circle (top, right hand side) of the rectangle function we get a rounded corner, what if someone added the inverse to the bottom, left hand side, (where you'd get all four corners inverted at the same time)? seems easy enough....


Just curious -- what do you visualize will happen when I move the both the top right and bottom left circles? :?

I think the point I was trying to make was that if you look around you, at graphics in general use, how often do you see rounded corner rectangles, and how often do you see concave corner rectangles ...
Your mind is what you think it is.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inverse Round Corners on a Transparent Rectangle?

Postby Lazur » Mon Apr 01, 2013 7:41 pm

The top right circle could do the job, if you could move it outside the bounding box.
I was not speaking in "built in" solutions for such, rarely used elements, but a way to create your own custom shape elements.
Lately I had to work on some circuit drawing, and, admittedly that's not a common use, it would have been handy to have an option for creating "clone-like grouped objects" that could be stored in inkscape's preferences for later use for example.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Inverse Round Corners on a Transparent Rectangle?

Postby brynn » Mon Apr 01, 2013 7:46 pm

Lazur URH wrote:I was thinking of a way to "predefine" your own shapes. As the mentioned word has plenty of basic shapes, all with parameters. Like a simple arrow for example.
You can set the parameters by the shape's handles -as the rounded corners of the rectangle or the star's spikes. What if you could add your own designed basic shapes next to ellipse and rectangle tool, that you can later modify with such handles? How to do that?


Word has a lot of different shapes, but I don't think you can do much with them. They're just flat shapes. You can make them larger or smaller, or maybe skew them. I don't have Word on this machine, but I've used it in the past, and I don't remember any shape having the sophistication of an Inkscape tool. I think druban's suggestion of using Symbols is more what you're thinking of (although I haven't seen that feature yet).

You want to draw a shape and have a tool magically created that would draw more of those shapes? I guess you'd pretty much have to know programming to create new tools. Most Inkscape users don't have those skills. I think that a feature that would allow someone to draw a shape, and then click a button to have a new tool automatically created, that would draw that shape, would be quite a sophisticated feature indeed. And I'm not sure if it would fall into the development goals for Inkscape. Not that I really know what those goals are.

But I just can't get past the idea of drawing any random shape, then clicking a button and automatically have a new tool that would make that shape. I don't know how any program could be written (like Inkscape) that could write a program for a tool for any random shape. Could one program ever write other programs? I guess it could, if the other program is known. But for a program (like inkscape) to write a new program which is unknown to the original program. No, I think you're asking for a god, lol.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Inverse Round Corners on a Transparent Rectangle?

Postby brynn » Mon Apr 01, 2013 7:57 pm

flamingolady, Stars already can have rounded ends! Check Rounded spinbox on control bar, or hold Shift while dragging Star handles tangentially (side to side)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inverse Round Corners on a Transparent Rectangle?

Postby Lazur » Mon Apr 01, 2013 7:59 pm

Have you tried geogebra? You can set there handles for your functions. By adding parameters to your shape that could be changed later, you could made such elements.
I don't know what's the name of such shapes, but there are circular versions of it, with the arch length as a change-able parameter, that would be handy in several design tasks. Even so it's not an every-day used shape, but it is hard to redraw it every times it is needed.
Image

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby druban » Mon Apr 01, 2013 9:56 pm

Lazur URH wrote: it would have been handy to have an option for creating "clone-like grouped objects" that could be stored


druban wrote:symbols
:?:
g2272.png
g2272.png (13.91 KiB) Viewed 6797 times
Your mind is what you think it is.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Inverse Round Corners on a Transparent Rectangle?

Postby Xav » Mon Apr 01, 2013 11:22 pm

flamingolady wrote:Would it be hard to add in an inverse feature to the rectangle?


The SVG format defines suqared and rounded rectangles as standard, but no other corner shapes. Any other variation on corners therefore couldn't be represented in the SVG file as a "rectangle", but would have to be a path. That implies that it would require additional metadata to tell Inkscape that this particular path can be edited with the rectangle tool, and what the current parameters are.

That could certainly be done, but adds significantly to the complexity of the code. It might be harder than you think to add an inverse feature to the rectangle as there's more to it than just adding some more handles, it fundamentally changes the nature of the shape from a rectangle to a path.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inverse Round Corners on a Transparent Rectangle?

Postby Lazur » Tue Apr 02, 2013 1:27 am

druban wrote:
Lazur URH wrote: it would have been handy to have an option for creating "clone-like grouped objects" that could be stored


druban wrote:symbols
:?:
The attachment g2272.png is no longer available


:arrow:

Image
Attachments
ftr1.png
ftr1.png (34.06 KiB) Viewed 6767 times

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Inverse Round Corners on a Transparent Rectangle?

Postby flamingolady » Tue Apr 02, 2013 7:56 am

Druban - I had to smile, as I guess I wasn't envisioning moving both at the same time. In thinking it through, maybe envision it more along the lines that if you move it one way, it's rounded and if you move it the other it becomes concave, kind of like moving the star's handles and you can get all sorts of different outcomes.... : )

It would be used more than you might think - at least by us artsy types, e.g., I do wedding/party invitations, flyers, stationary, backgrounds, etc, where it's fits in beautifully. Please realize that there are mostly the math types, developers, programmers, architects, CAD, blueprint, type people vs the artsy types on this particular forum.

XAV - oh, I'd be thrilled if it were ever added as a path/LPE vs a rectangle. Somehow in my head it seems so simple - if it can be pulled one way and it's round, how hard could it be to move it exactly the same way, but in (negative)/reverse... ok, so that's my thinking, obviously it's not that easy. lol!


Return to “Help with using Inkscape”