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); } }
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); }