예제 #1
0
        /// <summary>
        /// Control を描画します。
        /// </summary>
        /// <remarks>
        /// Visible が false の場合、Draw メソッドは呼び出されません。
        /// </remarks>
        /// <param name="gameTime"></param>
        /// <param name="drawContext"></param>
        public virtual void Draw(GameTime gameTime, IDrawContext drawContext)
        {
            // Look & Feel を描画します。
            DrawLookAndFeel(gameTime, drawContext);

            if (ClipEnabled)
            {
                // TODO: Padding の考慮が必要かも?
                using (var localClipping = drawContext.BeginClip(new Rect(RenderSize)))
                {
                    DrawChildren(gameTime, drawContext);
                }
            }
            else
            {
                DrawChildren(gameTime, drawContext);
            }
        }