コード例 #1
0
        public Dialog(Image image, Drawable drawable, VariableSet variables) :
            base("Ministeck", drawable, variables, () => new DrawablePreview(drawable))
        {
            _image = image;

            var table = new GimpTable(2, 2)
            {
                ColumnSpacing = 6, RowSpacing = 6
            };

            Vbox.PackStart(table, false, false, 0);

            var size = new GimpSpinButton(3, 100, 1, GetVariable <int>("size"));

            table.AttachAligned(0, 0, _("_Size:"), 0.0, 0.5, size, 2, true);

            var limit = new GimpCheckButton(_("_Limit Shapes"),
                                            GetVariable <bool>("limit"));

            table.Attach(limit, 2, 3, 0, 1);

            var colorButton = new GimpColorButton("", 16, 16, GetVariable <RGB>("color"),
                                                  ColorAreaType.Flat)
            {
                Update = true
            };

            table.AttachAligned(0, 1, _("C_olor:"), 0.0, 0.5, colorButton, 1, true);
        }
コード例 #2
0
ファイル: Dialog.cs プロジェクト: unhammer/gimp-sharp
        public Dialog(Image image, Drawable drawable, VariableSet variables)
            : base("Ministeck", drawable, variables, () => new DrawablePreview(drawable))
        {
            _image = image;

              var table = new GimpTable(2, 2)
            {ColumnSpacing = 6, RowSpacing = 6};
              Vbox.PackStart(table, false, false, 0);

              var size = new GimpSpinButton(3, 100, 1, GetVariable<int>("size"));
              table.AttachAligned(0, 0, _("_Size:"), 0.0, 0.5, size, 2, true);

              var limit = new GimpCheckButton(_("_Limit Shapes"),
                      GetVariable<bool>("limit"));
              table.Attach(limit, 2, 3, 0, 1);

              var colorButton = new GimpColorButton("", 16, 16, GetVariable<RGB>("color"),
                        ColorAreaType.Flat)
            {Update = true};

              table.AttachAligned(0, 1, _("C_olor:"), 0.0, 0.5, colorButton, 1, true);
        }