denverpotsmoker Posted August 7, 2015 Share Posted August 7, 2015 From reading, I'm guess there is no way to create a new layer via CodeLab for an Effect? I'd like to: 01. Copy SRC (Layer1 Selection) to new layer (Called Layer2). 02. Run effect code on Layer2. 03. Output DST to Layer2. That way, the original image and effect image will both be present for comparison by the user. Can this even be done with compiled C# code? Just wondering, THX - DPS Quote The Rise of the Creative Class by: Richard Florida Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 7, 2015 Share Posted August 7, 2015 BoltBait has written a new tutorial on the subject of extra surfaces: http://forums.getpaint.net/index.php?/topic/32107-how-to-write-an-effect-plugin-part-7-extra-surface/ Think of a 'surface' as a temporary layer/work space. With your process you would be much better doing step 1 in the paint.net environment then processing the layer with your plugin. This is because new permanent pdn layers cannot be created by plugins. So any pixel output (excepting the clipboard) will be output to the layer from which the plugin was called. 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...
Ego Eram Reputo Posted August 7, 2015 Share Posted August 7, 2015 Try making the selection then Ctrl + C to copy it and Ctrl + Shift + V to paste in to a new layer. Now you can run your effect on the new layer. 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...
denverpotsmoker Posted August 7, 2015 Author Share Posted August 7, 2015 Yeah, that's too bad that layer creation can't be handled via script (only through user action). For example, I'm creating a plugin to put a "label" (text) to identify parts of a program skin. For example, it will draw a box around the part of the skin graphic where a button is located and put a label that says something like "Open Button" next to it. It'd be nice if at least the labels could be on a separate layer. I guess I could: 01. Have users make a copy of the skin and put it in a new layer. 02. Have users pick a layer to run my plugin on. 03. Have the plugin delete the skin graphic. 04. Have plugin output the boxes and text. Be nice if you could just script a new layer tho... THX! Quote The Rise of the Creative Class by: Richard Florida Link to comment Share on other sites More sharing options...
denverpotsmoker Posted August 8, 2015 Author Share Posted August 8, 2015 Also, I'm guessing that since the "Paste in to New Layer" isn't available via the script language, that the "Paste in to New Image" is also not available. THXDPS .:.::...:..::::OFF TOPIC::::..:.::.::.:: It's weird, as I'm working on an MS-DOS BATCH program and I noticed there's no PASTE command either. Yeah, just COPY <source> <destination>. Maybe it's an "industry" thing? Quote The Rise of the Creative Class by: Richard Florida Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 8, 2015 Share Posted August 8, 2015 Also, I'm guessing that since the "Paste in to New Layer" isn't available via the script language, that the "Paste in to New Image" is also not available. Correct. This list of limitations might be worth reading through http://forums.getpaint.net/index.php?/topic/14566-what-is-and-isnt-possible-when-writing-plugins/ 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...
denverpotsmoker Posted August 11, 2015 Author Share Posted August 11, 2015 Interesting read. This has given me a "new" idea for BATCH programming...MENU BATCH! All commands are menu commands! All programs (with menus) are batch programmable (somehow). Cool! Here's my codelab COPY rewrite...V=Vertical (Y), H=Horizontal(X) (H,V)=point, TOP/BOT/LFT/RIT ...I hate X,Y, to me it's HVD thanks! Quote The Rise of the Creative Class by: Richard Florida Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 11, 2015 Share Posted August 11, 2015 uhh ... what? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
denverpotsmoker Posted August 12, 2015 Author Share Posted August 12, 2015 uhh ... what? Sorry, must have been (what we in Denver call) "wax typing" on that one. You, know, why Is "X" Horizontal when graphing? That just makes it difficult to figure out. X=H,Y=V, and I say "D" for Density ... now everyone knows what your talking about... I tried some 3D modeling and all I can say is the "Z" axis really got me confused. That said, when I program, I first do things manually. Then, I try to write some code that does the same things I did manually (which is why MS-DOS BATCH missing the PASTE command is soooo upsetting). That said, I think the real test of a programming language is how much I can program the steps to accomplish the algorithm in the same way I would perform the steps manually. Witch is the genius of MENU BATCH! Anywayz...I can work with CodeLab (no prob ...keep up the good work yall, I'll send you some shatter in the mail. Quote The Rise of the Creative Class by: Richard Florida Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 13, 2015 Share Posted August 13, 2015 ... You, know, why Is "X" Horizontal when graphing? That just makes it difficult to figure out.... X and Y are standard Cartesian graphing coordinates taken from algebra. See here under Two Dimensions and also Notation https://en.wikipedia.org/wiki/Cartesian_coordinate_system. It's a VERY COMMON system. We use it in programming to reference a 2D grid - like a screen. Every programmer will tell you instantly that (0,0) denotes the top left corner of the grid for example. It's just second nature. If you're going to mess with these conventions, get used to answers like Rick's when you share code. 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...
Red ochre Posted August 13, 2015 Share Posted August 13, 2015 I guess television CRT is responsible for reversing the Y direction? if X = H = height = Y; X==Y/==confusion! Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
MJW Posted August 13, 2015 Share Posted August 13, 2015 (edited) Red ochre, I'm pretty sure that's the origin (ha, ha! an unintentional sort-of-pun) of y-down coordinates. I've gotten used to it, but I wish the standard were y-up, like in math. I find it makes such things as describing algorithms more difficult. When you say "as the height increases," do you mean "as you go higher," or "as the y coordinate increases"? It requires considerable care (and increased wordiness) to avoid that type of ambiguity. Edited August 13, 2015 by MJW Quote Link to comment Share on other sites More sharing options...
Red ochre Posted August 13, 2015 Share Posted August 13, 2015 I blame Yogi bear! (John Logie Baird) Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
denverpotsmoker Posted August 13, 2015 Author Share Posted August 13, 2015 (edited) I think the X/Y thing is a left over from that whole NASA-50s-United Nations "one world" thing. You know, one advantage it has is it's "readable" by all languages. I think most languages have an "x" and a "y" in the language, and thus the meaninglessness of the variable names is important (Vertical and Horizontal are probably different in most languages) as when they all get together they can point at it and say "the X trajectory of the nuclear warhead makes me sad."...and EVERYONE in the room will know what he/she is talking about. Still, I like variables that make sense. Strange that X/Y hasn't changed with OOP languages currently prevailing. You know, most OOP programmers like very verbose variables like: number_of_cupcakes = 500 Mine would be NOC = 500 Like that "UP" idea for movement from points tho. H/V = [10,1] UP 5 = [10,6] DN 5 = [10/1] ...good stuff! THX! PS: Somehow using variables in MS-DOS BATCH now seems more reliable to me... %PEACE% + %OUT% Edited August 13, 2015 by denverpotsmoker Quote The Rise of the Creative Class by: Richard Florida Link to comment Share on other sites More sharing options...
MJW Posted August 13, 2015 Share Posted August 13, 2015 According to Merriam Webster's Collegiate Dictionary, the first recorded use of the term "x-axis" was 1886. A bit before NASA. That's what I'd expect, since the independent variable has been been placed along the horizontal axis pretty much since Cartesian coordinates began, and X has long been the usual symbol for the independent variable, with Y for the dependent variable. Interestingly, the first recorded use of "y-axis" was even earlier; it was 1875. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 13, 2015 Share Posted August 13, 2015 Its bound to be far older than that. Geometry is ancient. http://www.todayifoundout.com/index.php/2014/11/origins-mathematical-convention-using-x-unknown/ 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...
Rick Brewster Posted August 14, 2015 Share Posted August 14, 2015 I think the X/Y thing is a left over from that whole NASA-50s-United Nations "one world" thing. wut Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
BoltBait Posted August 14, 2015 Share Posted August 14, 2015 Trying to make sense of someone with that name seems pointless. 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 14, 2015 Share Posted August 14, 2015 Yeah I was about to say, "ohhhh ... user name." Now I understand more Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
denverpotsmoker Posted August 14, 2015 Author Share Posted August 14, 2015 Wow, I didn't know you guys liked the XY so much that you would denigrate someone like that. Not cool! But to get back on topic (since you guys derailed it pretty bad for admins).... I think the whole 2D array for XY/HV is bad. Some people like counting up, then over (VH) and this could easily be fixed by using single variables. I prefer HV (most of the time). .... So fix it already. What's your problem homebrew? Quote The Rise of the Creative Class by: Richard Florida Link to comment Share on other sites More sharing options...
BoltBait Posted August 14, 2015 Share Posted August 14, 2015 So fix it already. Can't fix something that isn't broken. What's your problem homebrew? I don't have a problem... banning you for being a detriment to this message board. Do yourself a favor and give up the pot. It's not doing you any good. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game 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.