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

            return(GdiConverter.ToXwtWeight(d.Style));
        }
Ejemplo n.º 4
0
        public override FontStyle GetStyle(object handle)
        {
            var d = (Font)handle;

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

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