Ejemplo n.º 1
0
 static Bitmap GetSkinImage(SimpleButton button, int width, int height, int indent)
 {
     Bitmap image = new Bitmap(width, height);
     using(Graphics g = Graphics.FromImage(image)) {
         StyleObjectInfoArgs info = new StyleObjectInfoArgs(new GraphicsCache(g));
         info.Bounds = new Rectangle(0, 0, width, height);
         button.LookAndFeel.Painter.GroupPanel.DrawObject(info);
         button.LookAndFeel.Painter.Border.DrawObject(info);
         info.Bounds = new Rectangle(indent, indent, width - indent * 2, height - indent * 2);
         button.LookAndFeel.Painter.Button.DrawObject(info);
     }
     return image;
 }
Ejemplo n.º 2
0
        private Bitmap getSkinImage(SimpleButton button, int width, int height, int indent)
        {
            Bitmap image = new Bitmap(width, height);

            using (Graphics g = Graphics.FromImage(image)) {
                StyleObjectInfoArgs info = new StyleObjectInfoArgs(new GraphicsCache(g));
                info.Bounds = new Rectangle(0, 0, width, height);
                button.LookAndFeel.Painter.GroupPanel.DrawObject(info);
                button.LookAndFeel.Painter.Border.DrawObject(info);
                info.Bounds = new Rectangle(indent, indent, width - indent * 2, height - indent * 2);
                button.LookAndFeel.Painter.Button.DrawObject(info);
            }
            return(image);
        }