Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        public override FontWeight GetWeight(object handle)
        {
            var d = (Font)handle;

            return(GdiConverter.ToXwtWeight(d.Style));
        }