MJW Posted June 16, 2021 Share Posted June 16, 2021 Copy Selection Bounding Box copies the bounding box of the current selection to the clipboard. Paste Selection can then be used to activate the bounding-box selection. The bounding box can be expanded by adding margins to each side. It's a little confusing, since you have to press the Copy to Clipboard button to save to the clipboard. There was no easy way to make the save occur automatically when the plugin exits. I didn't mention this in the Help menu, but if there's no selection, or the selection would not produce a proper selection when clipped to the canvas (such as when the selection is entirely outside the canvas) , a selection covering entire canvas is copied to the clipboard. These are uninteresting cases, so I decided it would be simpler and better to produce valid selections rather than displaying error messages in MessageBoxes (which is the only other simple alternative). The DLL: Copy Selection Bounding Box.zip The Help Menu: Quote Copy Selection Bounding Box copies the bounding box of the current selection to the clipboard. The bounding-box selection can then be enabled using the built-in Paste Selection command. The bounding box is cropped to the canvas and is always on pixel boundaries. The controls are: Margin: The pixel distance added to each side of the bounding box when Use Individual Margins is disabled. Left Margin: The pixel distance added to the left when Use Individual Margins is enabled. Right Margin: The pixel distance added to the right when Use Individual Margins is enabled. Top Margin: The pixel distance added to the top when Use Individual Margins is enabled. Bottom Margin: The pixel distance added to the bottom when Use Individual Margins is enabled. Use Individual Margins: Specifies that the margins on each side are individually specified. Copy to Clipboard: Causes the bounding box, as currently modified, to be copied to the clipboard. The copy only occurs when this button is pressed. The User Interface: 3 4 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted June 23, 2021 Share Posted June 23, 2021 Effects > Selection I was half expecting to have the contents of the bounding box copied to the clipboard. Took me a minute to realize it was the selection geometry that was being copied. How about an option to do either? I'm not sure if this is aligned to plugin principles, but why not disable the OK button until the Copy button has been clicked? Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
MJW Posted June 23, 2021 Author Share Posted June 23, 2021 1 hour ago, Ego Eram Reputo said: but why not disable the OK button until the Copy button has been clicked? I didn't know that could be done in an IndirectUI plugin. I not aware of any control the plugin has over the OK button. What I'd much rather do is to make clicking the OK button initiate the copy to the clipboard, but there seems there's no IndirectUI mechanism to do that. Perhaps someday I'll rewrite the plugin to not use IndirectUI, but this was just sort of a quick CodeLab hack I wrote on a whim. (I wish CodeLab allowed sliders to be linked, since that would have been more elegant than two sets of controls.) Quote Link to comment Share on other sites More sharing options...
BoltBait Posted June 23, 2021 Share Posted June 23, 2021 2 hours ago, MJW said: 3 hours ago, Ego Eram Reputo said: but why not disable the OK button until the Copy button has been clicked? I didn't know that could be done in an IndirectUI plugin. It can't. 2 hours ago, MJW said: I wish CodeLab allowed sliders to be linked, since that would have been more elegant than two sets of controls. Export to a Visual Studio project and add your additional rules there. It's a piece of cake. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
MJW Posted June 23, 2021 Author Share Posted June 23, 2021 1 hour ago, BoltBait said: Export to a Visual Studio project and add your additional rules there. It's a piece of cake. Many (most) of my recent plugins have been VS projects, but this is just a quickie. It's convenient not to have anything but the CodeLab text file. If I could make it work with the OK button, I'd do what you suggest in a second, but just to link the controls for a bit more elegance doesn't seem worth it. (That is in no way intended to denigrate the CodeLab Export option, which is a wonderful feature.) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.