當前位置: 首頁>>代碼示例>>C#>>正文


C# BitmapData.Paste方法代碼示例

本文整理匯總了C#中System.Drawing.Imaging.BitmapData.Paste方法的典型用法代碼示例。如果您正苦於以下問題:C# BitmapData.Paste方法的具體用法?C# BitmapData.Paste怎麽用?C# BitmapData.Paste使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Drawing.Imaging.BitmapData的用法示例。


在下文中一共展示了BitmapData.Paste方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Draw_PANEL_Image

 protected override void Draw_PANEL_Image(BitmapData data_bac)
 {
     base.Draw_PANEL_Image(data_bac);
     PointD p = new PointD(225, 225);
     Bitmap bmp; ProduceGearImage(out bmp);
     data_bac.Paste(bmp, p - bmp.Half(), ImagePasteMode.Transparent);
     bmp = ProducePercentImage();
     data_bac.Paste(bmp, p - bmp.Half(), ImagePasteMode.Gradient);
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:9,代碼來源:Maintenance+Plant.cs

示例2: Draw_Info

 static void Draw_Info(Block b, BitmapData data_bac)
 {
     int column = 125;
     PointD p = new PointD(BLOCK_SIZE.Width, 0);
     data_bac.Paste(b.NAME, p, Color.Yellow);
     p.X += column;
     data_bac.Paste("$" + b.PRICE.ToString(), p);
     p.X += column;
     int v = OreStorage.Get(b.NAME);
     data_bac.Paste(v.ToString() + (v == 1 ? " pc" : " pcs"), p);
     p.X += column;
     data_bac.Paste("$" + (b.PRICE * v).ToString(), p);
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:13,代碼來源:Ore+Processing+Zone.cs

示例3: DrawImage

 public static void DrawImage(BitmapData data_bac)
 {
     Color c = Color.FromArgb(255, 255, 255);
     using (Font font = new Font("微軟正黑體", 20, FontStyle.Bold))
     {
         data_bac.Paste(CNT.ToString() + "/" + (LIMIT == int.MaxValue ? "∞" : LIMIT.ToString()), new Point(Background.Size.Width - 10, 10), c, font, StringAlign.Right);
     }
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:8,代碼來源:OreStorage.cs

示例4: DrawImage

 public static void DrawImage(BitmapData data_bac)
 {
     string s = "$" + VALUE.ToString();
     Point p=new Point(280,10);
     using (Font font = new Font("微軟正黑體", 20, FontStyle.Bold))
     {
         data_bac.Paste(s, p, Color.FromArgb(255, 255, 128), font);
     }
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:9,代碼來源:Money.cs

示例5: DrawLOCKED

 protected void DrawLOCKED(BitmapData data_bac)
 {
     if (UNLOCKED()) return;
     data_bac.Multiply_RGB(LOCK_BRIGHT_RATIO);
     using (Font font1 = new Font("微軟正黑體", 1, FontStyle.Bold))
     {
         double tilt = -Math.PI / 12.0;
         Font font2 = font1;
         "LOCKED".MaxFont(out font2, data_bac.Width, data_bac.Height, tilt, font2);
         Bitmap bmp = "LOCKED".ToBitmap(font2, Color.FromArgb(255, 255, 255)).Rotate(tilt);
         data_bac.Paste(bmp, data_bac.Half() - bmp.Half(), ImagePasteMode.Transparent);
     }
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:13,代碼來源:MyPicture.cs

示例6: Display_Gas_Gauge

 void Display_Gas_Gauge(BitmapData data_bac)
 {
     double ratio = GasGauge.VALUE / GasGauge.MAXIMUM;
     Bitmap bmp = IMAGES["Full Tank"];
     Point p = IMAGE_LOCATIONS["Empty Tank"][0];
     int h = (bmp.Height * ratio).Round();
     if (h > 0)
     {
         BitmapData data_bmp = bmp.GetBitmapData(new Rectangle(new Point(0, bmp.Height - h), new Size(bmp.Width, h)));
         data_bac.Paste(data_bmp, new Point(p.X, p.Y + (bmp.Height - h)), ImagePasteMode.Transparent);
         bmp.UnlockBits(data_bmp);
     }
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:13,代碼來源:Gas+Station.cs

示例7: Display_Number_On

 void Display_Number_On(BitmapData data_bac, Point p, long v)
 {
     Bitmap bmp = IMAGES["Numbers"];
     Size sz = new Size(bmp.Width / 10, bmp.Height);
     bool showed = false;
     while (v > 0 || !showed)
     {
         p.X -= sz.Width;
         BitmapData data_bmp = bmp.GetBitmapData(new Rectangle(new Point((int)(sz.Width * (v % 10)), 0), sz));
         data_bac.Paste(data_bmp, p, ImagePasteMode.Gradient);
         bmp.UnlockBits(data_bmp);
         v /= 10;
         showed = true;
     }
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:15,代碼來源:Gas+Station.cs

示例8: Draw_Exterior

 public void Draw_Exterior(BitmapData data_bac)
 {
     Bitmap bmp = Get_Exterior();
     BitmapData data_bmp = bmp.GetBitmapData();
     Point p = Background.WorldToClient(new PointD(LOCATION, 0));
     data_bac.Paste(data_bmp, new Point(p.X, p.Y - EXTERIOR.Height),ImagePasteMode.Transparent);
     bmp.UnlockBits(data_bmp);
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:8,代碼來源:Station.cs

示例9: Draw_Image

 public void Draw_Image(BitmapData data_bac)
 {
     if (FORM_OPEN_STATE == 0.0) return;
     double ratio = FORM_OPEN_STATE / 100.0;
     Bitmap bmp; Get_PANEL_Image(out bmp);bmp=bmp.Resize(0.3 + 0.7 * ratio);
     if (bmp == null) return;
     BitmapData data_bmp = bmp.GetBitmapData();
     if (PublicVariables.LOW_PERFORMANCE_MODE) data_bac.Paste(data_bmp, (data_bac.Half() - data_bmp.Half()).Round,ImagePasteMode.Overwrite);
     else
     {
         data_bac.Multiply_RGB(1.0 - ratio * (1.0 - Station.FORMOPEN_BRIGHTNESS));
         data_bmp.Multiply_A(ratio);
         data_bac.Paste(data_bmp, (data_bac.Half() - data_bmp.Half()).Round,ImagePasteMode.Gradient);
     }
     bmp.UnlockBits(data_bmp);
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:16,代碼來源:Station.cs

示例10: Draw_Text_Image

 static void Draw_Text_Image(BitmapData data_ans, string s, Rectangle rect)
 {
     Bitmap bmp;
     using (Font font = new Font("微軟正黑體", 1, FontStyle.Bold))
     {
         bmp = s.ToBitmap(rect.Size, font);
     }
     Point p = (rect.Size.Half() - bmp.Size.Half()).Round;
     data_ans.Paste(bmp, POINT.Add(rect.Location, p), ImagePasteMode.Transparent);
     //bmp.Dispose();
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:11,代碼來源:MyButton.cs

示例11: DrawImage

 public override void DrawImage(BitmapData data_bac)
 {
     if (!VISABLE) return;
     Bitmap bmp1; GetImage(out bmp1);
     Bitmap bmp2 = bmp1.Resize(ZOOM);
     if (UNLOCKED()) bmp2.Add_RGB(LIGHT.Round());
     PointD p = GetLocation().Add(bmp1.Half());
     data_bac.Paste(bmp2, p - bmp2.Half(), ImagePasteMode.Overwrite, REGION);
     //bmp2.Dispose();
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:10,代碼來源:MyButton.cs

示例12: Draw_Image

 public static void Draw_Image(BitmapData data_bac)
 {
     Bitmap bmp = Get_Image();
     PointD p = new PointD(200, 10);
     data_bac.Paste(bmp, p + FULL.Half() - bmp.Half(), ImagePasteMode.Gradient);
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:6,代碼來源:Health.cs

示例13: DrawImage

 public virtual void DrawImage(BitmapData data_bac)
 {
     if (!VISABLE) return;
     Bitmap bmp; GetImage(out bmp);
     data_bac.Paste(bmp, GetLocation(), IMAGE_PASTE_MODE, GetREGION());
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:6,代碼來源:Objects.cs

示例14: DrawImage

 public override void DrawImage(BitmapData data_bac)
 {
     for (int i = 0; i < WEAPON.Count; i++)
     {
         WEAPON[i].DrawImage(data_bac);
     }
     base.DrawImage(data_bac);
     Bitmap bmp = GetBloodBar();
     if (bmp != null)
     {
         PointD p = GetScreenLocation().AddY(-110).Add(-bmp.Half());
         data_bac.Paste(bmp, p, ImagePasteMode.Gradient);
     }
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:14,代碼來源:Planet.cs

示例15: DrawDescription

 void DrawDescription(BitmapData data_bac)
 {
     Point p = new Point(100, 3*BLOCK_SIZE.Height / 4);
     Bitmap bmp = ("Description: " + DESCRIPTION.ToString()).ToBitmap(TEXTSIZE, FONT, Color.FromArgb(255, 255, 255));
     data_bac.Paste(bmp, p, ImagePasteMode.Transparent);
 }
開發者ID:fsps60312,項目名稱:Digging-Game-2,代碼行數:6,代碼來源:Grocery+Store.cs


注:本文中的System.Drawing.Imaging.BitmapData.Paste方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。