public static void Convert( FontStyle value, out sw.FontStyle fontStyle, out sw.FontWeight fontWeight) { fontStyle = sw.FontStyle.Normal; fontWeight = sw.FontWeight.Normal; if ((value & FontStyle.Italic) == FontStyle.Italic) fontStyle = sw.FontStyle.Italic; if ((value & FontStyle.Bold) == FontStyle.Bold) fontWeight = sw.FontWeight.Bold; }
public static void Convert(FontStyle value, out sw.FontStyle fontStyle, out sw.FontWeight fontWeight) { fontStyle = sw.FontStyle.Normal; fontWeight = sw.FontWeight.Normal; if (value.HasFlag(FontStyle.Italic)) fontStyle = sw.FontStyle.Italic; if (value.HasFlag(FontStyle.Bold)) fontWeight = sw.FontWeight.Bold; }
public static FontStyle Convert(sw.FontStyle fontStyle, sw.FontWeight fontWeight) { var style = FontStyle.Normal; if (fontStyle == sw.FontStyle.Italic) style |= FontStyle.Italic; if (fontStyle == sw.FontStyle.Oblique) style |= FontStyle.Italic; if (fontWeight == sw.FontWeight.Bold) style |= FontStyle.Bold; return style; }