本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
}
示例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);
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
示例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());
}
示例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);
}
}
示例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);
}