示例#1
0
        public override object SetStyle(object handle, FontStyle style)
        {
            var d        = (Font)handle;
            var oldStyle = GdiConverter.ToXwt(d.Style);
            var w        = GdiConverter.ToXwtWeight(d.Style);

            if (oldStyle != style)
            {
                d = new Font(d.FontFamily, d.Size, GdiConverter.ToGdi(style, w));
            }
            return(d);
        }
示例#2
0
        public override object SetWeight(object handle, FontWeight weight)
        {
            var d    = (Font)handle;
            var oldW = GdiConverter.ToXwtWeight(d.Style);
            var s    = GdiConverter.ToXwt(d.Style);

            if (oldW != weight)
            {
                d = new Font(d.FontFamily, d.Size, GdiConverter.ToGdi(s, weight));
            }
            return(d);
        }
示例#3
0
        public override FontWeight GetWeight(object handle)
        {
            var d = (Font)handle;

            return(GdiConverter.ToXwtWeight(d.Style));
        }
示例#4
0
        public override FontStyle GetStyle(object handle)
        {
            var d = (Font)handle;

            return(GdiConverter.ToXwt(d.Style));
        }
        public override void SetColor(object backend, Xwt.Drawing.Color color)
        {
            var gc = (GdiContext)backend;

            gc.Color = GdiConverter.ToGdi(color);
        }