Jump to content

Rounded Rectangle (BETA)


Tim!

Recommended Posts

Hi,

I've just written my first Pdn plugin.

It uses the Primary and Secondary colours to draw a rectangle with round corners into the current selection. You can have multiple selections (Ctrl key). If there's no selection, it uses the entire canvas. The selection can be any shape (rectangular, lasso, ellipse).

I've obtained the selection and the colours from EnviromentParameters. I'm thinking about adding a border outline using EnviromentParameters.BrushWidth. How do you obtain the "Draw Shape Outline", "Draw Filled Shape" and "Draw Filled Shape With Outline" parameters, and the other parameters for Fill, Antialiasing and Blend mode?

EDIT 1: Removed development plugin zip file. I've now published it here. Thanks for all your comments.

EDIT 2: Version 1.2.0.0

  • Added a supplementary brush width to the config dialog.
  • NOTE: It defaults to the brush width set in the Paint.NET toolbar every time the dialog opens.
  • Added a fill overlap slider. It controls by how much the fill colour overlaps the outline colour. It's useful for removing gaps that sometimes appear due to antialiasing. The overlap ranges from zero to half the brush width.
  • Added a Reset Radii button.
  • Added a Show Original checkbox.
  • Improved slider performance.
  • Improved radii UI logic.

EDIT 3: Removed beta effect zip file because I've published it here (and here).

EDIT 4: Updated hyperlinks for new forum.

Example

post-54726-130479797162_thumb.png

Edited by Tim!
Link to comment
Share on other sites

Uh, sorry, but I'm getting the impression this is exactly the same as the tool that comes with PDN v3.36, which is the most current one.

You've said that before downloading it and trying it out, so an "impression" it certainly is... :wink:

Any chance you could address my question?

Link to comment
Share on other sites

Hi All,

I'v updated my plugin. It now has options for an outline border and antialiasing. I've also improved the rendering speed. I'm now thinking about publishing it so your comments would be welcome.

Thanks.

EDIT: Removed plugin zip file. I've put the latest version in my original post.

Link to comment
Share on other sites

its not too bad so far. I like the ability to adjust the edges would work good on making those wine bottle pictures. saves fiddling with the bezer curves. think there should be some upper and lower limits to the curvature though, or some more info there as it stands now its just type in some numbers by chance and hope you get the correct curve.

I'm not likely to use this myself in my work as it stands now. I can possibly do the things just as quickly in a matter of one or two steps .....

but I think it can develop further and be pretty good.

ciao and thanks for sharing your efforts with us.

OMA

Link to comment
Share on other sites

And correct the spelling mistake "Linear gadient brush"

A less tooltip-ed (yes, that word doesn't exists, but you see what I mean.) UI would be great :)

(Here's an UI example, made quickly in VS, if you want :wink: )

Apart from that, it's good :D

Link to comment
Share on other sites

so I'm back with some more comments. as this is your first plug in I'm sure you need feedback.

things that would make this more useable would be if the top round corner was independant from the bottom round corner.

say you want the top of the rectangle to bow in at 44 44 and the bottom 85 68

magnificent plug in status would be if you could bow the middle of eachside of the rectangle and make that variable. with a slider up and down the length of the rectangle for placement of the side bow.

(hope I explained that correctly )

ciao

.

Link to comment
Share on other sites

  • 2 weeks later...

The new UI is good, but 1) It doesn't have a "Reset" button and 2) Writing the same number 8 times can be tiring.

And please, don't create a new submenu for only one effect...Put it in Render....

Link to comment
Share on other sites

That's a good idea to draw rounded rectangle, leaves and potatoes.

I haven't the answer to your question to get parameters from environment... :?

Some few remarks about this plugin.

-Could you add a checkbox a each corner so when check the value is the same for the two sides of this corner.

-Could you also add a checkbox for a unique value (instead 8).

-Fields for the values accept negative values and text...

Sooner or later I will be interested by the sources, to add a square/rectangle shape to my button plugin...

Good work and thanks.

Link to comment
Share on other sites

I've updated it again in response to your feedback. It's now looking more professional and more like the finished article so thanks for your ideas.

Link to comment
Share on other sites

Tim check which one you've attached.

this one comes up test in the effects menu

do you not need this to be in a render

also I'm unable to move any of the sliders at all unless I clik that independant radius box Is that the way you intend it to work?

"_test": I'll change it when I finally publish it.

Disabled sliders until Independent Radii checked: That's by design, but I was wondering whether it would be best to keep the sliders enabled and then automatically uncheck check (EDIT 1) Independent Radii when the sliders are scrolled, or hide the sliders when Independent Radii is not checked.

Link to comment
Share on other sites

  • 2 weeks later...

I definitely like the plugin.

Couple things though....

-Not sure if this is just me but I can not use the Numberpad on the side of my keyboard when I try in input numbers. I had tried both with the Numlock on and off.

-This could be an OCD thing but I think that if you have the Independent Radii checkbox checked, make changes to the corners and sliders and then uncheck the Independent Radii, then the values should be set to the top left enabled textfield and should also reset the sliders back to the defaults.

Just a couple minor GUI fixes. :P

Link to comment
Share on other sites

> Not sure if this is just me but I can not use the Numberpad on the side of my keyboard when I try in input numbers. I had tried both with the Numlock on and off.

Thanks for spotting that. That was an oversight. I've fixed it for version 1.1.

> This could be an OCD thing but I think that if you have the Independent Radii checkbox checked, make changes to the corners and sliders and then uncheck the Independent Radii, then the values should be set to the top left enabled textfield and should also reset the sliders back to the defaults.

I've thought about various implementations in an OCD way but I was too lazy actually implement any of them ;-) . One of my ideas was to have two sets of radii values; one for independent radii and another for non-independent radii. And perhaps a separate Reset button and an Apply Same or Apply to All button for the radii. I haven't received any complaints on my effects thread yet, so I'll leave it be for now.

Edited by Tim!
Link to comment
Share on other sites

  • 2 weeks later...
Tim actually those changes (#2 above) sound like what I was hoping for. I just didn't know how to word it. Not being a programmer the reasoning and wording is what gets most of us end users when asking for improvements.

I've re-done the UI logic. All those multiple inter-dependencies is quite tricky. I've also added a few other things (see my original post).

Link to comment
Share on other sites

  • 1 year later...

Why I try to download, I keep getting a login prompt and a request for authentication.... Am I missing something here? I'm obviously logged in, as I'm posting...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...