示例#1
0
        public void DrawString(IFont iFont, Skinning.Color color, UI.Rectangle target, string text)
        {
            var font = (VirtualFont)iFont;

            graphics.DrawString(
                text,
                font.Font,
                new SolidBrush(ConvertColor(color)),
                ConvertRectangle(target));
        }
示例#2
0
        public void DrawBrush(IBrush iBrush, UI.Rectangle target)
        {
            var brush = (VirtualBrush)iBrush;

            if (brush.Bitmap != null)
            {
                graphics.DrawImage(brush.Bitmap, ConvertRectangle(target));
            }
            else
            {
                graphics.FillRectangle(
                    brush.Brush,
                    ConvertRectangle(target));
            }
        }
示例#3
0
 public void SetScissor(UI.Rectangle rect)
 {
     graphics.SetClip(ConvertRectangle(rect));
 }
示例#4
0
 private static RectangleF ConvertRectangle(UI.Rectangle rect)
 {
     return(new RectangleF(rect.X, rect.Y, rect.Width, rect.Height));
 }