public Effect(Bitmap image, Point screenpos, ImagePasteMode imagepastemode, EffectDock effectdock, Rectangle region = default(Rectangle)) : base(null, image, screenpos, imagepastemode, region) { if (effectdock != EffectDock.Screen) throw new ArgumentException("Can't handle this parameter : effectdock"); LOC = new PointD(screenpos); EFFECT_DOCK = effectdock; }
public Effect(Bitmap image, PointD worldorpod, ImagePasteMode imagepastemode, EffectDock effectdock, Rectangle region = default(Rectangle)) : base(null, image, default(Point), imagepastemode, region) { if (effectdock == EffectDock.Screen) throw new ArgumentException("Can't handle this parameter : effectdock"); LOC = worldorpod; EFFECT_DOCK = effectdock; }
public Objects(string text,Bitmap image, Point location, ImagePasteMode imagepastemode, Rectangle region = default(Rectangle)) { TEXT = text; IMAGE = image; RECT.Location = location; IMAGE_PASTE_MODE = imagepastemode; REGION = region; }
public Objects(string text, Bitmap image, Rectangle rect, ImagePasteMode imagepastemode, Rectangle region = default(Rectangle)) : this(text, image, rect.Location, imagepastemode, region) { RECT.Size = rect.Size; }
public static Bitmap Paste(this Bitmap bac, Bitmap bmp, PointD p, ImagePasteMode imagepastemode, Rectangle region = default(Rectangle)) { return bac.Paste(bmp, p.Round, imagepastemode, region); }
public static Bitmap Paste(this Bitmap bac, Bitmap bmp, Point p, ImagePasteMode imagepastemode, Rectangle region = default(Rectangle)) { int w1 = Math.Max(-p.X, 0), w2 = Math.Min(bmp.Width, bac.Width - p.X); int h1 = Math.Max(-p.Y, 0), h2 = Math.Min(bmp.Height, bac.Height - p.Y); if (w1 >= w2 || h1 >= h2) return bac; Point sp = new Point(w1 + p.X, h1 + p.Y); BitmapData data_bac = bac.GetBitmapData(new Rectangle(sp, new Size(w2 - w1, h2 - h1))); BitmapData data_bmp = bmp.GetBitmapData(new Rectangle(new Point(w1, h1), new Size(w2 - w1, h2 - h1))); if (region != default(Rectangle)) region = region.Add_Location(-sp.X, -sp.Y); data_bac.Paste(data_bmp, new Point(0, 0), imagepastemode, region); bac.UnlockBits(data_bac); bmp.UnlockBits(data_bmp); return bac; }
public static void Paste(this BitmapData data_bac, Bitmap bmp, PointD p, ImagePasteMode imagepastemode, Rectangle region = default(Rectangle)) { data_bac.Paste(bmp, p.Round, imagepastemode, region); }
public static void Paste(this BitmapData data_bac, Bitmap bmp, Point p, ImagePasteMode imagepastemode, Rectangle region = default(Rectangle)) { BitmapData data_bmp = bmp.GetBitmapData(); data_bac.Paste(data_bmp, p, imagepastemode, region); bmp.UnlockBits(data_bmp); }
public static void Paste(this BitmapData data_bac,BitmapData data_bmp,Point p,ImagePasteMode imagepastemode,Rectangle region=default(Rectangle)) { switch(imagepastemode) { case ImagePasteMode.Overwrite: data_bac.Paste_Overwrite(data_bmp, p, region); return; case ImagePasteMode.Transparent: data_bac.Paste_Transparent(data_bmp, p, region); return; case ImagePasteMode.Gradient: data_bac.Paste_Gradient(data_bmp, p, region); return; default: throw new ArgumentException("No corresponding method can be called"); } }
public static void DrawCircleOutline(this BitmapData data_bac,PointD center,double r,double breadth,Color outline_color,ImagePasteMode imagepastemode) { switch(imagepastemode) { case ImagePasteMode.Gradient: data_bac.DrawCircleOutline_Gradient(center, r, breadth, outline_color); return; case ImagePasteMode.Overwrite: data_bac.DrawCircleOutline_Overwrite(center, r, breadth, outline_color); return; default: throw new ArgumentException("Can't handle this parameter : imagepastemode"); } }
public static void DrawCircle(this BitmapData data_bac, PointD center, double r, Color backcolor, ImagePasteMode imagepastemode) { data_bac.DrawCircle(center, r, 0.0, backcolor, Default.COLOR, imagepastemode); }