TechnoRobbo Posted August 21, 2015 Share Posted August 21, 2015 TechnoRobbo's Quick Outliner Like the Doctor said "Don't Blink" version 1.5 adjusts for very small selections (thanks to Midora) version 1.4 fixes a typo Version 1.3 Soft Edge*, Color Wheels and Fill suggestions by Eli *(Increasing the Softness will slow down render) Menu: Effects - Selection New features Source Code Hidden Content: // Submenu: Selection // Name: TR's QuickOutLiner // Title: TR's QuickOutLiner - V 1.5 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode ColorBgra Amount1 = ColorBgra.FromBgr(0,0,0); // Line Color ColorBgra Amount2 = ColorBgra.FromBgr(0,0,0); // Fill Color double Amount3 = 2; // [1,50] Line Thickness int Amount4 = 1; // [1,50] Softness(Can Slow Render) bool Amount5 = false; // [0,1] Fill Shape string Amount6 = ""; // [0,255] #endregion void Render(Surface dst, Surface src, Rectangle rect) { if (!Amount6.Equals(String.Empty))return; Amount6="Onepass"; dst.CopySurface(src); if (IsCancelRequested) return; PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); RectangleF sel = EnvironmentParameters.GetSelection(src.Bounds).GetBounds(); ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor; RectangleF[] baseBlocks =selectionRegion.GetRegionScans(); using (System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath()) { path.AddRectangles(baseBlocks); path.Widen(new Pen(Color.Black,2)); using (Region r = new Region(path)) { using ( Region r2 = new Region(selectionRegion.GetRegionData())) { r.Exclude(r2); } baseBlocks = r.GetRegionScans(new System.Drawing.Drawing2D.Matrix()); } } if (IsCancelRequested) return; using (Graphics g =new RenderArgs(dst).Graphics) { g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half; using (System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath()) { path.AddRectangles(baseBlocks); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; g.Clip =new Region( selectionRegion.GetRegionData()); if (Amount5) g.FillRegion(new SolidBrush(Amount2.ToColor()),g.Clip); if (IsCancelRequested) return; using (Pen p = new Pen(Amount1.ToColor())) { if (Amount4 > 1) { int alpha = (int)(255f / (float)Amount4); for (int blur = 0 ;blur < Amount4; blur++) { if (IsCancelRequested) return; using (Pen p2 = new Pen(Color.FromArgb(alpha, Amount1.ToColor()))) { p2.Width = (float)Amount3 + (Amount4 - blur); g.DrawPath(p2,path); } } } p.Width = (float)Amount3; g.DrawPath(p,path); } } } } TRsQuickOutline.zip 5 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
toe_head2001 Posted August 21, 2015 Share Posted August 21, 2015 I like it! Excuse my ignorance, but what's point of the text box? Have a return in the code if there's something typed in it....why? I think I'm missing something. Thanks for posting the source. I learned something about rending a Graphics object to the destination surface. This will help me on a effect I've been wanting to make. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 21, 2015 Author Share Posted August 21, 2015 It defeats the multi threading increasing the speed for this type of code. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Eli Posted August 21, 2015 Share Posted August 21, 2015 Thanks TR, I think it would be neat to pick colors from inside the effect. Perhaps adding some blur/gradient options as well. 1 Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 21, 2015 Author Share Posted August 21, 2015 Eli - your a hard customer. Version 1.2 Ready for Download Soft Edge*, Color Wheels and Fill suggestions by Eli *(Increasing the Softness will slow down render) 1 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 21, 2015 Author Share Posted August 21, 2015 version 1.3 adds a Softness slow render warning (nothing else) Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Eli Posted August 21, 2015 Share Posted August 21, 2015 Thanks TR! I am getting better with every request. Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 21, 2015 Author Share Posted August 21, 2015 New 1.3 features 1 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Eli Posted August 21, 2015 Share Posted August 21, 2015 Thanks TR. Love the video tutorials. 1 Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 21, 2015 Author Share Posted August 21, 2015 Eli, That's is Cool! Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
toe_head2001 Posted August 21, 2015 Share Posted August 21, 2015 I may be alone in this opinion, but I think it would be better to have the Softness default set to 1. Typo on the string for Line Color ColorBgra Amount1 = ColorBgra.FromBgr(0,0,0); // Line Thickness Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 21, 2015 Author Share Posted August 21, 2015 I may be alone in this opinion, but I think it would be better to have the Softness default set to 1. Typo on the string for Line Color Thanks will Fix Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 21, 2015 Author Share Posted August 21, 2015 Ok I fixed and made the softness default 1 Version 1.4 Ready for download Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 22, 2015 Author Share Posted August 22, 2015 Eli just pointed out thatI uploaded 1.3 again instead of 1.4 Version 1.4 Ready for download Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
Seerose Posted August 23, 2015 Share Posted August 23, 2015 TechnoRobbo! Thank you for the plugin and for your effort. 1 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
Eli Posted August 23, 2015 Share Posted August 23, 2015 TR, on very small selections is not rendering all around. The shapes on the left is what I would expect but instead I am obtaining the blue ones. Quote Link to comment Share on other sites More sharing options...
midora Posted August 23, 2015 Share Posted August 23, 2015 One solution for this may be to change the Graphics.PixeloffsetMode. Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 23, 2015 Author Share Posted August 23, 2015 One solution for this may be to change the Graphics.PixeloffsetMode. That did the trick ,Thanks Midora Version 1.5 Ready for download Adjusted for very small selections Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 24, 2015 Author Share Posted August 24, 2015 Oops I forgot, Thank you Seerose Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
ftlog666 Posted September 29, 2015 Share Posted September 29, 2015 thank you so very much for the videos here & also on the tube - much better to see it in action for me. Quote Link to comment Share on other sites More sharing options...
Cc4FuzzyHuggles Posted October 11, 2015 Share Posted October 11, 2015 (edited) I love your plugins, and I love how they always improve and so quickly too! Haven't tried this one yet, but I hope to soon. Edited October 11, 2015 by Cc4FuzzyHuggles Quote *~ Cc4FuzzyHuggles Gallery ~* Link to comment Share on other sites More sharing options...
TechnoRobbo Posted October 11, 2015 Author Share Posted October 11, 2015 Gosh Thanks Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins 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.