Esempio n. 1
0
        private void DrawBackground(BackgroundMode background)
        {
            if (background == BackgroundMode.bmNone)
            {
                return;
            }

            bool bgImage = ((BackgroundImage != null) &&
                            (background == BackgroundMode.bmAny ||
                             background == BackgroundMode.bmImage));

            if (bgImage)
            {
                /*var imgRect = new Rectangle(0, 0, fImageWidth, fImageHeight);
                 *
                 *  using (Brush textureBrush = new TextureBrush(BackgroundImage, WrapMode.Tile)) {
                 *      gfx.FillRectangle(textureBrush, imgRect);
                 *  }*/
            }
            else
            {
                bool bgFill = (background == BackgroundMode.bmAny ||
                               background == BackgroundMode.bmImage);

                if (bgFill)
                {
                    fRenderer.DrawRectangle(null, UIHelper.ConvertColor(BackColor), 0, 0, fModel.ImageWidth, fModel.ImageHeight);
                }
            }
        }