using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WMFConverter.Wmf { /// /// Windows Metafile - Represents WMF Font object. /// public class WmfFont : WmfObject, Gdi.IGdiFont { #region Local Variables private int _height; private int _width; private int _escapement; private int _orientation; private int _weight; private bool _italic; private bool _underline; private bool _strikeout; private int _charset; private int _outPrecision; private int _clipPrecision; private int _quality; private int _pitchAndFamily; private string _faceName; #endregion #region Properties /// /// Object Height. /// public int Height { get { return _height; } } /// /// Object Width. /// public int Width { get { return _width; } } /// /// Object Escapement. /// public int Escapement { get { return _escapement; } } /// /// Object Orientation. /// public int Orientation { get { return _orientation; } } /// /// Object Weight. /// public int Weight { get { return _weight; } } /// /// Defines whether the font is italic. /// public bool IsItalic { get { return _italic; } } /// /// Defines whether the font is underlined. /// public bool IsUnderlined { get { return _underline; } } /// /// Defines whether the font is striked. /// public bool IsStrikedOut { get { return _strikeout; } } /// /// Defines the font charset. /// public int Charset { get { return _charset; } } /// /// Defines the font out precision. /// public int OutPrecision { get { return _outPrecision; } } /// /// Defines the clip precision. /// public int ClipPrecision { get { return _clipPrecision; } } /// /// Object quality. /// public int Quality { get { return _quality; } } /// /// Defines pitch and famility font. /// public int PitchAndFamily { get { return _pitchAndFamily; } } /// /// Defines face name rules. /// public string FaceName { get { return _faceName; } } #endregion #region Constructors /// /// Default Constructor. /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// public WmfFont(int id, int height, int width, int escapement, int orientation, int weight, bool italic, bool underline, bool strikeout, int charset, int outPrecision, int clipPrecision, int quality, int pitchAndFamily, byte[] faceName) : base (id) { _height = height; _width = width; _escapement = escapement; _orientation = orientation; _weight = weight; _italic = italic; _underline = underline; _strikeout = strikeout; _charset = charset; _outPrecision = outPrecision; _clipPrecision = clipPrecision; _quality = quality; _pitchAndFamily = pitchAndFamily; _faceName = WMFConverter.Gdi.GdiUtils.ConvertString(faceName, charset); } #endregion } }