示例#1
0
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Widget instance from the given template.
        /// </summary>
        /// <param name="template"></param>
        protected Widget(WidgetTemplate template)
        {
            this.ScreenPosition = new Point(0, 0);
            this.Size = template.CalculateSize();
            this.Canvas = new Canvas(Size);

            this.OwnerDraw = template.OwnerDraw;

            this.PigmentOverrides = template.Pigments.Copy();
        }
示例#2
0
        // /////////////////////////////////////////////////////////////////////////////////
        #endregion
        #region Constructors
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Widget instance from the given template.
        /// </summary>
        /// <param name="template"></param>
        protected Widget(WidgetTemplate template)
        {
            this.ScreenPosition = new Point(0, 0);
            this.Size           = template.CalculateSize();
            this.Canvas         = new Canvas(Size);

            this.OwnerDraw = template.OwnerDraw;

            this.PigmentOverrides = template.Pigments.Copy();
        }