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); }
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); }
public override FontWeight GetWeight(object handle) { var d = (Font)handle; return(GdiConverter.ToXwtWeight(d.Style)); }
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); }