Jump to content

Selection manipulation by plugin


Recommended Posts

I'ld like the possibility to manipulate the current selection by a plugin.

I imagine the read/write bool[,]s selectedsrc and selecteddst.

The first thing I would do is to create a grow/shrink selection plugin.

Furthermore, AFAIK, there's yet no such thing as an alpha channel in the selection, is there?

int[,]s selectedsrc and selecteddst would make the implementation of "feather" possible.

"Feather" has been interpreted by some users of this forum as being the blurring of the edge of an allready pasted selection. But in my perception "feather" means that the selection itself gets blurred at the edges, meaning that the selected image part turns from opaque to transparent towards the edges of the selection. If the source layer of the selection contains semi transparent parts, the alpha values would be multiplied (as fractions of 255) upon copying of the selection. Cut or delete would mean a substraction of the selection from the source layer.

BTW, I forgot to mention in my last post:

Paint.Net is such a delight! I enjoy it a lot.

Being a great fan of C# I especially adore the CodeLab plugin.

TjV

Link to comment
Share on other sites

TjV, there is no way to edit a selection via a plugin, this is true. Selections are actually stored as a polygon, and not as an array of boolean values, or as a featherable alpha channel. When necessary, they are converted to an array of rectangles with is then basically a compressed boolean array. I'm hoping to make the selection system much more versatile for 4.0 though.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

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.

 Share

×
×
  • Create New...