admin管理员组

文章数量:1530842

2024年1月4日发(作者:)

private int TransparencyMode(byte[] p_FileByte, string p_Value) { m__TransparencyMode = (p_Value); return p_; } ///

/// 笔宽度类型 /// /// /// [PCLInfo(TitleCommand1 = "WU")] private void PenWidthUnitSelection(byte[] p_FileByte, string p_Value) { m__PenWidthUnitSelection = 0; if (p_ != 0) m__PenWidthUnitSelection = (p_Value); } /// /// 笔的宽度 /// /// /// [PCLInfo(TitleCommand1 = "PW")] private void PenWidth(byte[] p_FileByte, string p_Value) { if (p_Value[0] == '.') p_Value = "0" + p_Value; m__PenWidth = (p_Value); } /// /// 线的类型 /// /// /// [PCLInfo(TitleCommand1 = "LT")] private void LineType(byte[] p_FileByte, string p_Value) { m__LineType = p_Value; } /// /// 线的类型 /// /// /// [PCLInfo(TitleCommand1 = "LA")] private void LineAttributes(byte[] p_FileBytes, string p_Value) { m__LineAttributes = p_Value; } /// /// 笔号 /// /// /// [PCLInfo(TitleCommand1 = "NP")] private void NumberOfPen(byte[] p_FileBytes, string p_Value) {

/// [PCLInfo(TitleCommand1 = "MC")] private void MergeControl(byte[] p_FileBytes, string p_Value) { m__MergeControl = p_Value; } ///

/// 情节控制 清除了HPGL_PenDown的路径 /// /// /// [PCLInfo(TitleCommand1 = "PA")] private void PlotAbsolute(byte[] p_FileBytes, string p_Value) { m__PlotAbsolute = p_Value; m__(); } /// /// 多边形类型 /// /// /// [PCLInfo(TitleCommand1 = "PM")] private void PolygonModel(byte[] p_FileBytes, string p_Value) { m__PolygonModel = p_Value; } /// /// 落笔的位置 /// /// /// [PCLInfo(TitleCommand1 = "PD")] private void PenDown(byte[] p_FileBytes, string p_Value) { string[] _List = p_(','); for (int i = 0; i != _ / 2; i++) { m__(new Point((_List[i * 2]), (_List[i * 2 + 1]))); } } /// /// 绘制模式 0 1模式不做处理 /// /// /// [PCLInfo(TitleCommand1 = "FP")] private void FillPolyon(byte[] p_FileBytes, string p_Value) { Point[] _NewPoint = new Point[m__]; for (int i = 0; i != _; i++) { decimal _X = m__PenDown[i].X / (decimal)m__UnitOfMeasure * 150; decimal _Y = m__PenDown[i].Y / (decimal)m__UnitOfMeasure * 150; _NewPoint[i] = new Point((int)g(_X), (int)g(_Y)); }

#region ()命令 ///

/// 字体头命令 ///

[PCLInfo(TitleCommand1 = ")sW")] private int FontHeaderCommand(byte[] p_Command, string p_Value) { byte[] _Value = new byte[(p_Value)]; (p_Command, m_ReadIndex, _Value, 0, _); Hashtable _FontHeader = new Hashtable(); _("FontDescriptorSize", (ushort)(_Value[0] << 8 | _Value[1])); _("HeaderFormat", _Value[2]); _("FontType", _Value[3]); _("StyleMSB", _Value[4]); _("Reserved", _Value[5]); _("BaselinePosition", (short)(_Value[6] << 8 | _Value[7])); _("CellWidth", (short)(_Value[8] << 8 | _Value[9])); _("CellHeight", (short)(_Value[10] << 8 | _Value[11])); _("Orientation", _Value[12]); _("Spacing", _Value[13]); _("SymbolSet", (short)(_Value[14] << 8 | _Value[15])); _("PitchHMI", (short)(_Value[16] << 8 | _Value[17])); _("Height", (short)(_Value[18] << 8 | _Value[19])); _("x-Height", (short)(_Value[20] << 8 | _Value[21])); _("WidthType", _Value[22]); _("StyleLSB", _Value[23]); _("StrokeWeight", _Value[24]); _("TypefaceLSB", _Value[25]); _("TypefaceMSB", _Value[26]); _("SerifStyle", _Value[27]); _("Quality", _Value[28]); _("Placement", _Value[29]); _("UnderlinePosition", _Value[30]); _("UnderlineThickness", _Value[31]); _("TextHeight", (short)(_Value[32] << 8 | _Value[33])); _("TextWidth", (short)(_Value[34] << 8 | _Value[35])); _("FirstCode", (short)(_Value[36] << 8 | _Value[37])); _("LastCode", (short)(_Value[38] << 8 | _Value[39])); _("PitchExtended", _Value[40]); _("HeightExtended", _Value[41]); _("CapHeight", (short)(_Value[42] << 8 | _Value[43])); _("FontNumber", (short)(_Value[44] << 24 | _Value[45] << 16 | _Value[46] << 8 | _Value[47])); _("FontName", ing(_Value, 48, 15).Trim('/0')); switch ((ushort)_FontHeader["FontDescriptorSize"]) { case 68: //Resolution-Specified Bitmapped)

_("XResolution", (short)(_Value[64] << 8 | _Value[65])); _("YResolution", (short)(_Value[66] << 8 | _Value[67])); if (_ - 68 != 0) { byte[] _Copyight = new byte[_ - 68]; (_Value, 68, _Copyight, 0, _); _("Copyright", _Copyight); } break;

m__SelectFontID = (p_Value); } ///

/// 字体系列命令 ///

[PCLInfo(TitleCommand1 = "(st")] private void TypefaceFamily(byte[] p_Command, string p_Value) { m__TypefaceFamily = (p_Value); m__SelectFontID = -1; if (!m_Buffer.m_nsKey(m__TypefaceFamily)) { string _FontName = "Arial"; switch (m__TypefaceFamily) { case 16602: _FontName = "Arial"; break; case 16901: _FontName = "Times New Roman"; break; default: break; } //FontStyle _Style =r; //switch(m__StrokeWeight) //{ // case 3: // _Style = ; // break; // case 0: // _Style = r; // break; //} ryKey _FontPath =bKey(@"Software/Microsoft/Windows/CurrentVersion/Explorer/ShellFolders"); string _Path = _ue("Fonts").ToString(); ryKey _Key =bKey(@"SOFTWARE/Microsoft/Windows NT/CurrentVersion/Fonts"); if (_Key == null) return; object _TrueTypeFont = _ue(_FontName + " (TrueType)"); if (_TrueTypeFont == null) return; m_Buffer.m_(m__TypefaceFamily, new ImageTTF(_Path + "//" + _TrueTypeFont)); } } ///

/// 字体重量 ///

[PCLInfo(TitleCommand1 = "(sb")] private void StrokeWeight(byte[] p_Command, string p_Value) { m__StrokeWeight = (p_Value); } ///

/// 多边形类型 ///

public string HPGL_PolygonModel = ""; /// /// 落笔的位置 /// public IList HPGL_PenDown = new List();

///

/// 212 /// public string HPGL_InputRelative = ""; /// /// 308 /// public string HPGL_Scale = ""; #endregion } #endregion #region 标签 /// /// PCL标签类 /// private class PCLInfo : Attribute { private string m_TitleCommand1 = ""; public string TitleCommand1 { get { return m_TitleCommand1; } set { m_TitleCommand1 = value; } } private string m_TitleCommand2 = ""; public string TitleCommand2 { get { return m_TitleCommand2; } set { m_TitleCommand2 = value; } } } #endregion }}

本文标签: 类型字体模式