public static Nine FromBitmap(Bitmap fullBmp, Color mark) { fullBmp.MakeTransparent(fullBmp.GetPixel(0, 0)); Nine ret = new Nine(); ret.FromBitmapCutting(fullBmp, mark); return(ret); }
public VariableView(IVarBlock model, Nine abc, Graphics textMetrics, Font textFont) { this._model = model; this.Changed += delegate(object source) { }; // todo: So much in common with TextView; consider abstracting into common implementation this.abc = abc; this.textMetrics = textMetrics; this.textFont = textFont; }
public TextView(TextBlock model, Nine abc, Graphics textMetrics, Font textFont) { this.model = model; this.model.TextChanged += new TextBlockTextChangedEvent(model_TextChanged); this.abc = abc; this.textMetrics = textMetrics; this.textFont = textFont; Changed += delegate(object sender) { }; }
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 Nine FromBitmap(Bitmap fullBmp, Color mark) { fullBmp.MakeTransparent(fullBmp.GetPixel(0, 0)); Nine ret = new Nine(); ret.FromBitmapCutting(fullBmp, mark); return ret; }