public static StackBlockImgParts FromBitmap(Bitmap fullBmp) { StackBlockImgParts ret = new StackBlockImgParts(); fullBmp.MakeTransparent(fullBmp.GetPixel(0, 0)); ret.FromBitmapCutting(fullBmp, Color.Red); return(ret); }
void InitImageParts() { sb_parts = StackBlockImgParts.FromBitmap(BitmapExtensions.LoadBmp("stack_blue_small.bmp")); fib_parts = StackBlockImgParts.FromBitmap(BitmapExtensions.LoadBmp("function_green_small.bmp")); bool_parts = StackBlockImgParts.FromBitmap(BitmapExtensions.LoadBmp("boolean.bmp")); pdb_parts = StackBlockImgParts.FromBitmap(BitmapExtensions.LoadBmp("procdef_small.bmp")); varb_parts = Nine.FromBitmap(BitmapExtensions.LoadBmp("var_purple_small.bmp"), Color.Red); hatb_parts = StackBlockImgParts.FromBitmap(BitmapExtensions.LoadBmp("hat_small.bmp")); capb_parts = StackBlockImgParts.FromBitmap(BitmapExtensions.LoadBmp("cap_small.bmp")); cb_parts = new CBlockImgParts(); cb_parts.FromBitmapCutting(BitmapExtensions.LoadBmp("C_stack_full.bmp"), Color.Red); ib_parts = Nine.FromBitmap(BitmapExtensions.LoadBmp("input_controls_small.bmp"), Color.Red); specialTextBits["_flag"] = (BitmapExtensions.LoadBmp("flag_textbit.bmp")).Transparent(); }
public static StackBlockImgParts FromBitmap(Bitmap fullBmp) { StackBlockImgParts ret = new StackBlockImgParts(); fullBmp.MakeTransparent(fullBmp.GetPixel(0, 0)); ret.FromBitmapCutting(fullBmp, Color.Red); return ret; }