Cornipsus Posted June 24, 2007 Share Posted June 24, 2007 I have read the source code for several plugins, scoured the internet for tutorials, and searched everywhere, but I have yet to find a decent C# tutorial. I just want someone to teach me how to convert pseudocode into a plugin. Quote The God of Judgement is not pleased... Link to comment Share on other sites More sharing options...
MadJik Posted June 24, 2007 Share Posted June 24, 2007 You've read of course this: How to Write an Effect Plugin (Part 1 of 3 - Simple) http://paintdotnet.12.forumer.com/viewtopic.php?t=5281 How to Write an Effect Plugin (Part 2 of 3 - Intermediate) http://paintdotnet.12.forumer.com/viewtopic.php?t=5308 Could you share a pseudo code we could work on and see how you could learn about coding in C#? Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Cornipsus Posted June 24, 2007 Author Share Posted June 24, 2007 Pseudocode such as: Find the alpha of a pixel. Save it as a variable. Make the variable 255-itself. Make the pixel's alpha the variable. It's a simple Invert Alpha plugin. And I have read the tutorials, but they're too cryptic and I don't learn much about C#. Quote The God of Judgement is not pleased... Link to comment Share on other sites More sharing options...
Mr Frojo Posted June 24, 2007 Share Posted June 24, 2007 I think that the best way to learn a programming language is to go get a book on it. They cost a bit, but they're worth it. Quote I'm still alive! Link to comment Share on other sites More sharing options...
MadJik Posted June 24, 2007 Share Posted June 24, 2007 Yes it's not the best way to start to learn programming! You could (as I do) learn C# if you already have a knowlegde of programming. Have you ever created your "Hello world!" program ? BTW from your pseudocode, I open the codelab, deleted the useless lines from the model then adjust one line to obtain the desired effect: void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra CurrentPixel; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; CurrentPixel.A = (byte)(255 - CurrentPixel.A); // desired effect dst[x,y] = CurrentPixel; } } } Shouldn't the true value be 256 ? Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Cornipsus Posted June 24, 2007 Author Share Posted June 24, 2007 I thought the alpha value was from 0 to 255. And yes, I have created a "Hello World" program. Thanks for the code! Try it on this picture: http://www.freewebs.com/cornipsus/Hidden Message.pdn Quote The God of Judgement is not pleased... Link to comment Share on other sites More sharing options...
MadJik Posted June 24, 2007 Share Posted June 24, 2007 I've got 10000 rubles! Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Cornipsus Posted June 24, 2007 Author Share Posted June 24, 2007 Yep, that's about 300 USD. Quote The God of Judgement is not pleased... 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.