示例#1
0
        public static Nine FromBitmap(Bitmap fullBmp, Color mark)
        {
            fullBmp.MakeTransparent(fullBmp.GetPixel(0, 0));
            Nine ret = new Nine();

            ret.FromBitmapCutting(fullBmp, mark);
            return(ret);
        }
示例#2
0
        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;
        }
示例#3
0
        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;
        }
示例#4
0
        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) { };
        }
示例#5
0
        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) { };
        }
示例#6
0
        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();
        }
示例#7
0
 public static Nine FromBitmap(Bitmap fullBmp, Color mark)
 {
     fullBmp.MakeTransparent(fullBmp.GetPixel(0, 0));
     Nine ret = new Nine();
     ret.FromBitmapCutting(fullBmp, mark);
     return ret;
 }
示例#8
0
        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();
        }