Пример #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));
 }