public override void Draw(TextureBase texture, Renderer renderer, double elapsedGameTime, PointF position, Size renderSize, float opacity)
        {
            if (this.Resource == null)
            {
                return;
            }

            IList <TextureBlock> blocks;
            var boxOffset = this.GetBoxOffset();

            if (boxOffset >= 0)
            {
                blocks = this.Layout(this.Resource, new Point((int)renderSize.Width, (int)renderSize.Height), (int)boxOffset);
            }
            else //fallback
            {
                blocks = UIGraphics.LayoutTCB(this.Resource, new Point((int)renderSize.Width, (int)renderSize.Height));
            }

            foreach (var block in blocks)
            {
                if (block.Texture != null && block.Rectangle.Width > 0 && block.Rectangle.Height > 0)
                {
                    PointF pos   = new PointF(block.Rectangle.X + position.X, block.Rectangle.Y + position.Y);
                    Size   size  = new Size(block.Rectangle.Width, block.Rectangle.Height);
                    ColorW color = new ColorW(1f, 1f, 1f, this.Opacity);
                    renderer.Draw(block.Texture, pos, size, color, false);
                }
            }
        }
        public override void Draw(TextureBase texture, Renderer renderer, double elapsedGameTime, PointF position, Size renderSize, float opacity)
        {
            var blocks = UIGraphics.LayoutTCB(this.Resource, new Point((int)renderSize.Width, (int)renderSize.Height));

            foreach (var block in blocks)
            {
                if (block.Texture != null && block.Rectangle.Width > 0 && block.Rectangle.Height > 0)
                {
                    PointF pos   = new PointF(block.Rectangle.X + position.X, block.Rectangle.Y + position.Y);
                    Size   size  = new Size(block.Rectangle.Width, block.Rectangle.Height);
                    ColorW color = new ColorW(1f, 1f, 1f, this.Opacity);
                    renderer.Draw(block.Texture, pos, size, color, false);
                }
            }
        }