TechnoRobbo Posted July 12, 2013 Posted July 12, 2013 (edited) TechnoRobbo'sTiled Pixels V1.2 Pixels become Shapes! Menu: Effects->Stylize simple controls - no instructions needed Vertigo Vegas Baby The Code Really long so Click to see it Hidden Content: // Submenu: Stylize // Name: TR's Tiled Pixels // Title: TR's Tiled Pixels - v1.1 // Author: TechnoRobbo // URL: http://www.technorobbo #region UICode int Amount1 = 16; // [10,100] Size byte Amount2 = 0; // Shapes|Triangles|Envelopes|Diamonds|Stars|Hearts|Clubs(Clovers)|Spades #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); //---------------------------------- Graphics g = new RenderArgs(dst).Graphics; g.Clip =new Region(rect); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None; //BackGround------------------------------- System.Drawing.SolidBrush BBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); g.FillRectangle(BBrush , new Rectangle(sel.Top, sel.Left,sel.Width,sel.Height)); BBrush.Dispose(); g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; //=========================================================================================== System.Drawing.SolidBrush CBrush =new System.Drawing.SolidBrush(ColorBgra.Black); System.Drawing.Pen CPen = new System.Drawing.Pen(CBrush ,1); System.Drawing.Point[] pt = new System.Drawing.Point[0]; ColorBgra CP; int inc = Amount1; int shape = Amount2; //Test Variable //inc=50; //shape=6; //End Test for (int y = sel.Top; y < sel.Bottom; y +=inc) { for (int x = sel.Left; x < sel.Right; x +=inc) { for (int altx=0; altx <2;altx++){ CP = src.GetBilinearSampleClamped(x + inc/2 * altx,y); CBrush = new System.Drawing.SolidBrush(CP); switch (altx + shape * 2) { case 0://triangle pt = new System.Drawing.Point[3]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x ,y+inc); pt[2]= new System.Drawing.Point(x +inc, y + inc); break; case 1://triangle pt = new System.Drawing.Point[3]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x + inc,y ); pt[2]= new System.Drawing.Point(x +inc ,y+inc ); break; case 2://envelope pt = new System.Drawing.Point[3]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x + inc/2 ,y+inc); pt[2]= new System.Drawing.Point(x +inc, y); break; case 3://envelope pt = new System.Drawing.Point[5]; pt[0] = new System.Drawing.Point(x,y + inc); pt[1]= new System.Drawing.Point(x ,y ); pt[2]= new System.Drawing.Point(x + inc/2 ,y + inc); pt[3]= new System.Drawing.Point(x + inc ,y ); pt[4]= new System.Drawing.Point(x + inc ,y + inc); break; case 4://diamond pt = new System.Drawing.Point[4]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x+inc ,y); pt[2]= new System.Drawing.Point(x +inc, y + inc); pt[3]= new System.Drawing.Point(x , y + inc); break; case 5://diamond pt = new System.Drawing.Point[4]; pt[0] = new System.Drawing.Point(x + inc/2,y); pt[1]= new System.Drawing.Point(x + inc,y + inc/2); pt[2]= new System.Drawing.Point(x +inc/2 ,y+inc ); pt[3]= new System.Drawing.Point(x ,y+inc/2); break; case 6://star pt = new System.Drawing.Point[4]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x+inc ,y); pt[2]= new System.Drawing.Point(x +inc, y + inc); pt[3]= new System.Drawing.Point(x , y + inc); break; case 7://star pt = new System.Drawing.Point[5]; pt[0] = new System.Drawing.Point(x + inc/2,y); pt[1]= new System.Drawing.Point(x + inc,y + inc); pt[2]= new System.Drawing.Point(x ,y+inc/3 ); pt[3]= new System.Drawing.Point(x +inc,y+inc/3); pt[4]= new System.Drawing.Point(x,y+inc); break; case 8://heart pt = new System.Drawing.Point[4]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x+inc ,y); pt[2]= new System.Drawing.Point(x +inc, y + inc); pt[3]= new System.Drawing.Point(x , y + inc); break; case 9://heart pt = new System.Drawing.Point[10]; pt[0] = new System.Drawing.Point(x + inc * 2/10,y + inc/10); pt[1]= new System.Drawing.Point(x+inc*4/10 ,y+ inc/10); pt[2]= new System.Drawing.Point(x + inc/2, y + inc*2/10); pt[3]= new System.Drawing.Point(x + inc*6/10 , y + inc/10); pt[4]= new System.Drawing.Point(x + inc*8/10 , y + inc/10); pt[5] = new System.Drawing.Point(x + inc * 9/10,y + inc * 2/10); pt[6]= new System.Drawing.Point(x + inc * 9/10,y + inc * 4/10); pt[7]= new System.Drawing.Point(x + inc/2, y + inc*9/10); pt[8]= new System.Drawing.Point(x + inc/10 , y + inc*4/10); pt[9]= new System.Drawing.Point(x + inc/10 , y + inc*2/10); break; case 10://Clubs pt = new System.Drawing.Point[4]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x+inc ,y); pt[2]= new System.Drawing.Point(x +inc, y + inc); pt[3]= new System.Drawing.Point(x , y + inc); break; case 11://Clubs pt = new System.Drawing.Point[26]; pt[0] = new System.Drawing.Point(x +inc*3/10,y+inc); pt[1]= new System.Drawing.Point(x+inc*4/10 ,y +inc*9/10); pt[2]= new System.Drawing.Point(x +inc*5/10, y + inc*6/10); pt[3]= new System.Drawing.Point(x+inc*3/10 , y + inc*8/10); pt[4]= new System.Drawing.Point(x+inc*2/10 , y + inc*8/10); pt[5]= new System.Drawing.Point(x+inc/10 , y + inc*7/10); pt[6]= new System.Drawing.Point(x+inc/10 , y + inc/2); pt[7]= new System.Drawing.Point(x+inc*2/10 , y + inc*4/10); pt[8]= new System.Drawing.Point(x+inc*3/10 , y + inc*4/10); pt[9]= new System.Drawing.Point(x+inc*5/10 , y + inc*6/10); pt[10]= new System.Drawing.Point(x+inc*3/10 , y + inc*3/10); pt[11]= new System.Drawing.Point(x+inc*3/10 , y + inc*2/10); pt[12]= new System.Drawing.Point(x+inc*4/10 , y + inc/10); pt[13]= new System.Drawing.Point(x+inc*6/10 , y + inc/10); pt[14]= new System.Drawing.Point(x+inc*7/10 , y + inc*2/10); pt[15]= new System.Drawing.Point(x+inc*7/10 , y + inc*3/10); pt[16]= new System.Drawing.Point(x+inc*5/10 , y + inc*6/10); pt[17]= new System.Drawing.Point(x+inc*7/10 , y + inc*4/10); pt[18]= new System.Drawing.Point(x+inc*8/10 , y + inc*4/10); pt[19]= new System.Drawing.Point(x+inc*9/10 , y + inc*5/10); pt[20]= new System.Drawing.Point(x+inc*9/10 , y + inc*7/10); pt[21]= new System.Drawing.Point(x+inc*8/10 , y + inc*8/10); pt[22]= new System.Drawing.Point(x+inc*7/10 , y + inc*8/10); pt[23]= new System.Drawing.Point(x+inc*5/10 , y + inc*6/10); pt[24]= new System.Drawing.Point(x+inc*6/10 , y + inc*9/10); pt[25]= new System.Drawing.Point(x+inc*7/10 , y + inc); break; case 12://Spades pt = new System.Drawing.Point[4]; pt[0] = new System.Drawing.Point(x,y); pt[1]= new System.Drawing.Point(x+inc ,y); pt[2]= new System.Drawing.Point(x +inc, y + inc); pt[3]= new System.Drawing.Point(x , y + inc); break; case 13://Spades pt = new System.Drawing.Point[15]; pt[0] = new System.Drawing.Point(x +inc*3/10,y+inc); pt[1]= new System.Drawing.Point(x+inc*4/10 ,y +inc*9/10); pt[2]= new System.Drawing.Point(x +inc*5/10, y + inc*6/10); pt[3]= new System.Drawing.Point(x+inc*4/10 , y + inc*8/10); pt[4]= new System.Drawing.Point(x+inc*2/10 , y + inc*8/10); pt[5]= new System.Drawing.Point(x+inc/10 , y + inc*7/10); pt[6]= new System.Drawing.Point(x+inc/10 , y + inc/2); pt[7]= new System.Drawing.Point(x+inc/2 , y ); pt[8]= new System.Drawing.Point(x+inc*9/10 , y + inc/2); pt[9]= new System.Drawing.Point(x+inc*9/10 , y + inc*7/10); pt[10]= new System.Drawing.Point(x+inc*8/10 , y + inc*8/10); pt[11]= new System.Drawing.Point(x+inc*6/10 , y + inc*8/10); pt[12]= new System.Drawing.Point(x+inc*5/10 , y + inc*6/10); pt[13]= new System.Drawing.Point(x+inc*6/10 , y + inc*9/10); pt[14]= new System.Drawing.Point(x+inc*7/10 , y + inc); break; }//sw if ( pt.Length!=0){ g.FillPolygon(CBrush,pt);} }//altx }//x }//y CBrush.Dispose(); g.Dispose(); } TRsTiledPixels.zip Edited December 28, 2015 by TechnoRobbo 1 2 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
TechnoRobbo Posted July 12, 2013 Author Posted July 12, 2013 Ya think I would have changed the name of slider #1. It's actually "Pixel Increments" but I will probably call it "Size". Sorry. I will correct and repost. I may add more shapes too as long as I'm reposting. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
Red ochre Posted July 12, 2013 Posted July 12, 2013 Good work- nice original effect - thanks for sharing & congrats on the 'pin' Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings
TechnoRobbo Posted July 12, 2013 Author Posted July 12, 2013 OK - version 1.1 is uploaded - more shapes!!! Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
skullbonz Posted July 13, 2013 Posted July 13, 2013 Cool,nice one TR. You are making some real nice additions to PDN,Thanks Quote http://forums.getpaint.net/index.php?/topic/21233-skullbonz-art-gallery
TechnoRobbo Posted July 13, 2013 Author Posted July 13, 2013 V 1.2 is a very minor change - garbage collection in code. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
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.