Toli Posted November 5, 2007 Posted November 5, 2007 I noticed that Paint.NET does not have an option to Mirror or Rotate a Selection, only the whole Image. You can Rotate a Selection by using the Right Mouse Button with or without Shift, but the operation is done with trigonometric functions and, implicitely, rounding, generating far from perfect results for 90, 180 and 270 degrees, the only values where it is actually possible to get perfect results. So I decided to implement these functions: - Horizontal Mirror (Vertical Flip) - Vertical Mirror (Horizontal Flip) - 90 Degrees Clockwise Rotate - 180 Degrees Rotate - 270 Degrees Clockwise Rotate (90 Degrees Counter Clockwise Rotate) While coding, I discovered two more interesting Mirrors and I added them too: - First Diagonal Mirror - Second Diagonal Mirror I updated the Plugin! 1. Now it remembers the last choice. 2. The OK and Cancel Buttons are gone. "None" is now Cancel and all the others are OK. The preview is automated on Button_MouseHover and Button_Enter. This way, you save a click! 3. Try to right-click! You'll see the UI change. Use the UI you like from three choices. The plugin will remember it too. 4. It supports Localization. You can get this and other plugins plus the source code from here Toli Cuturicu Quote
barkbark00 Posted November 5, 2007 Posted November 5, 2007 This is very similar to Illnab1024's "Flip" plugin. (See also MadJik's fork) I do like your UI though. However, I don't see any effect when I select the "First Diagonal Mirror" and "Second Diagonal Mirror" options. Quote Take responsibility for your own intelligence. 😉 -Rick Brewster
Toli Posted November 5, 2007 Author Posted November 5, 2007 > This is very similar to Illnab1024's "Flip" plugin. (See also MadJik's fork) Well, the Flip Plugin has only two options: Horizontal and Vertical Mirrors (Flips) This one has seven. > I do like the UI though. It may be better... Thanks anyway. > However, I don't see any effect when I select the "First Diagonal Mirror" and "Second Diagonal Mirror" options. First Diagonal Mirror, Second Diagonal Mirror, Rotate 90 Degrees and Rotate 270 Degrees only work when the Selection is a square. Otherwise the result would "get out" of the Selection. Give it a try, please and tell me if there is any method to get the Selection outside the Render Method (for example in the Effect Constructor) Quote
barkbark00 Posted November 5, 2007 Posted November 5, 2007 Well, the Flip Plugin has only two options: Horizontal and Vertical Mirrors (Flips)This one has seven. Madjik's has 3 options...First Diagonal Mirror, Second Diagonal Mirror, Rotate 90 Degrees and Rotate 270 Degrees only work when the Selection is a square. Otherwise the result would "get out" of the Selection.Give it a try, please and tell me if there is any method to get the Selection outside the Render Method (for example in the Effect Constructor) I see now...Thanks for the response. Quote Take responsibility for your own intelligence. 😉 -Rick Brewster
shootingstarswishingheart Posted November 5, 2007 Posted November 5, 2007 Personally I would like to see examples of the plug-in... I guess I am still but a hesitant little noob :oops: Quote http://shootingstars.wishinghearts.googlepages.com
Toli Posted November 5, 2007 Author Posted November 5, 2007 The examples are on the Buttons of the Plugin itself. Take a look... Quote
Toli Posted November 6, 2007 Author Posted November 6, 2007 Instead of doing nothing, the Buttons that work only when the Selection is Square, are disabled otherwise. I replaced the original with this update. You can find it at the begining of the post. Quote
Toli Posted November 6, 2007 Author Posted November 6, 2007 The Default and Cancel Buttons were not properly set. This was fixed. The UI now remembers its position. I also shrunk the UI a little. Quote
MadJik Posted November 6, 2007 Posted November 6, 2007 Great! I'm going to replace my flip version by this plugin! Source? I would like to see how to remember the position! Thanks! Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal
Ash Posted November 6, 2007 Posted November 6, 2007 Nice, and please put it in "Distort". Thanks. Quote All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]
Toli Posted November 6, 2007 Author Posted November 6, 2007 > Great! > I'm going to replace my flip version by this plugin! Thank you. I will try to make it better. > Source? I would like to see how to remember the position! > Thanks! I feel quite ashamed of releasing the source code, because everybody will then see my mistakes and bad coding practises. If you think I will not make a fool of myself, probably I will post it after editing it a bit for clarity. The position is remembered in an *.ini file created in the same directory. Open it with a text editor and look at it. Form.Left and Form.Top are written there at Form.FormClosing and read from there at Form.Load. The whole Ini File stuff is wrapped by me in a class IniFile, which I use in many of my projects. It is extremely large, so I stripped all the unnecessary code out of it and added the remaining to this project. Quote
Toli Posted November 6, 2007 Author Posted November 6, 2007 > Nice, and please put it in "Distort". > Thanks. Thank you too. I am not sure if my plugin performs any distorsion at all. In my point of view, the result is either identical or enantiomorphic with the original, so it is tehnically not distorted. But I will take it into consideration further. Quote
DaveD Posted November 6, 2007 Posted November 6, 2007 Toli, Fantastic job! I really like the UI how it shows what the result will be with the buttons. This plugin is essential and will especially be easy to use for newer users. Keep up the great work. Dave Quote
Toli Posted November 6, 2007 Author Posted November 6, 2007 > Toli, > Fantastic job! I really like the UI how it shows what the result will be with the buttons. This plugin is essential and will > especially be easy to use for newer users. > Keep up the great work. > Dave Thank you for your compliments. Everybody who knows my programs appreciates especially the UI. I will keep coding, of course. Quote
Bob Posted November 6, 2007 Posted November 6, 2007 Could you use a thumbnail of the current picture instead of a Paint.NET icon? Just throwing it here... Quote No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio
Toli Posted November 6, 2007 Author Posted November 6, 2007 > Could you use a thumbnail of the current picture instead of a Paint.NET icon? > Just throwing it here... Sorry, I don't think this would be feasable. 1. Thumbnail of what? The picture? The selection? The Selection Bounds? 2. If it does not have Transparency near the edges it will not look nice on a Button. 3. You see the Effect on the fly on the Canvas anyway. 4. I do not have an algorhythm to save a part of an Image as a *.png / I don't know how to do it. 5. What about the Disabled Buttons. They should display something, shouldn't they? Quote
Myrddin Posted November 6, 2007 Posted November 6, 2007 Great!I'm going to replace my flip version by this plugin! Same here (still keeping Flip installed, though). This rolls up a few functions into one parcel. However, would it be possibly to have all the functions available all of the time? Because virtually all my images are rectangular in shape, yet the need to rotate 90 degrees is still required. I know I could use the built-in one, but I regularly veer to the Effects menu . Perhaps emulate the built-in Rotate when no selection is active - i.e. rotate the entire canvas - and when there is one active still rotate what is in the selection within the selection. What do you think? Example: ^^Click for larger. See how it was rotated within the selection? Therefore this would enable all the functions afforded to us available all the time. Is something like my suggestion feasible? I am not sure if my plugin performs any distorsion at all. I agree, it suits better in the main Effects menu than any of the submenus. Quote How to Save Your Images under Different File Types My dA Gallery
Toli Posted November 6, 2007 Author Posted November 6, 2007 > Perhaps emulate the built-in Rotate when no selection is active - i.e. rotate the entire canvas I am not sure I am able to do that (actually change the Dimensions of the Canvas). > and when there is one active still rotate what is in the selection within the selection. What do you think? > See how it was rotated within the selection? Therefore this would enable all the functions afforded to us available > all the time. Is something like my suggestion feasible? This would be feasible, but will take some time, because I have some other work to do right now. Quote
Bob Posted November 6, 2007 Posted November 6, 2007 *hides in shame* 1. Thumbnail of what? The picture? The selection? The Selection Bounds? Yeah, I was thinking about the new bundled effects' dialogs, and in fact they copy the all canvas, disregarding the selection (in the button). 3. You see the Effect on the fly on the Canvas anyway. True. But you've to click on the buttons to see it. 4.I don't know how to do it. That's what I've thought. I agree, it suits better in the main Effects menu than any of the submenus. Agreed. Quote No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio
Myrddin Posted November 6, 2007 Posted November 6, 2007 I am not sure I am able to do that (actually change the Dimensions of the Canvas).... This would be feasible, but will take some time, because I have some other work to do right now. Not a problem. Like I said, I can always use the built-in one, that is what it's there for. ... No need to rush, just putting the idea out there. Quote How to Save Your Images under Different File Types My dA Gallery
MattBlackLamb Posted November 6, 2007 Posted November 6, 2007 I feel it'd fit better in the Adjustments menu, but that's just me, I dunno how anyone else feels about it. Quote dA Son, someday you will make a girl happy for a short period of time. Then she'll leave you & be with men that are ten times better than you can imagine. These men are called musicians.
Toli Posted November 9, 2007 Author Posted November 9, 2007 I added the new version of my plugin and also the source code. You can find both of them at the beggining of the thread. Feel free to ask questions about or to criticize the source code (or binary) Toli Cuturicu Quote
Toli Posted November 9, 2007 Author Posted November 9, 2007 I updated it again! Look at the beggining of the thread. 1. Now it remembers the last choice. 2. The OK and Cancel Buttons are gone. "None" is now Cancel and all the others are OK. The preview is automated on Button_MouseHover and Button_Enter. This way, you save a click! 3. Try to right-click! You'll see the UI change. Use the UI you like from three choices. The plugin will remember it too. Comments? Quote
Pantaleao Posted November 9, 2007 Posted November 9, 2007 Hum... I don't know... I don't think changing the LaF (look and feel) is a good thing even if one has had the cleverest idea ever. It's always a new thing users must learn and be aware of, and this is not a good thing... believe me, I'm software architect for more than 23 years now (geeeeee! :shock:) Btw, thanks for this really great plugin! Quote "Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." ~Dr. Seuss
Bob Posted November 10, 2007 Posted November 10, 2007 Nice! It's even usable with the keyboard! Thanks for sharing the source. Quote No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio
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.