//--------------------------------------------------------------------// // M e t h o d // // p a t t e r n D e f i n e D p i 6 0 0 // //--------------------------------------------------------------------// // // // Define 600 dots-per-inch user-defined patterns to match the // // pre-defined patterns. // // // //--------------------------------------------------------------------// private static void patternDefineDpi600(BinaryWriter prnWriter, Int32 baseID) { const UInt16 dpi = 600; for (Int32 i = 0; i < _patternsCt; i++) { UInt16 patWidth = _patternWidths[i]; UInt16 patHeight = _patternHeights[i]; UInt16 destWidth = (UInt16)((patWidth * _unitsPerInch) / dpi); UInt16 destHeight = (UInt16)((patHeight * _unitsPerInch) / dpi); PCLXLWriter.patternDefine( prnWriter, false, (Int16)(baseID + _patternIds[i]), patWidth, patHeight, destWidth, destHeight, PCLXLAttrEnums.eVal.eIndexedPixel, PCLXLAttrEnums.eVal.e1Bit, PCLXLAttrEnums.eVal.eTempPattern, PCLXLAttrEnums.eVal.eNoCompression, PCLPatternDefs.getBytes( PCLPatternDefs.eType.CrossHatch, i)); } }
//--------------------------------------------------------------------// // M e t h o d // // p a t t e r n D e f i n e D p i 6 0 0 // //--------------------------------------------------------------------// // // // Define 600 dots-per-inch user-defined pattern. // // // //--------------------------------------------------------------------// private static void patternDefineDpi600(BinaryWriter prnWriter, Int16 patternId, Boolean embedded) { const UInt16 patWidth = 16; const UInt16 patHeight = 16; const UInt16 destWidth = (UInt16)((patWidth * _unitsPerInch) / 600); const UInt16 destHeight = (UInt16)((patHeight * _unitsPerInch) / 600); Byte[] pattern = { 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00 }; PCLXLWriter.patternDefine(prnWriter, embedded, patternId, patWidth, patHeight, destWidth, destHeight, PCLXLAttrEnums.eVal.eIndexedPixel, PCLXLAttrEnums.eVal.e1Bit, PCLXLAttrEnums.eVal.eTempPattern, PCLXLAttrEnums.eVal.eNoCompression, pattern); }
//--------------------------------------------------------------------// // M e t h o d // // p a t t e r n D e f i n e D p i 3 0 0 // //--------------------------------------------------------------------// // // // Define 300 dots-per-inch user-defined patterns. // // // //--------------------------------------------------------------------// private static void patternDefineDpi300(BinaryWriter prnWriter, Boolean formAsMacro) { const UInt16 patWidth = 16; const UInt16 patHeight = 16; const UInt16 destWidth = (UInt16)((patWidth * _unitsPerInch) / 300); const UInt16 destHeight = (UInt16)((patHeight * _unitsPerInch) / 300); Byte [] pattern_LightGrey = { 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00 }; Byte [] pattern_DarkGrey = { 0xC1, 0xC1, 0xEB, 0xEB, 0xC1, 0xC1, 0x88, 0x88, 0x1C, 0x1C, 0xBE, 0xBE, 0x1C, 0x1C, 0x88, 0x88, 0xC1, 0xC1, 0xEB, 0xEB, 0xC1, 0xC1, 0x88, 0x88, 0x1C, 0x1C, 0xBE, 0xBE, 0x1C, 0x1C, 0x88, 0x88 }; PCLXLWriter.patternDefine(prnWriter, formAsMacro, _patternId_LightGrey, patWidth, patHeight, destWidth, destHeight, PCLXLAttrEnums.eVal.eIndexedPixel, PCLXLAttrEnums.eVal.e1Bit, PCLXLAttrEnums.eVal.ePagePattern, PCLXLAttrEnums.eVal.eNoCompression, pattern_LightGrey); PCLXLWriter.patternDefine(prnWriter, formAsMacro, _patternId_DarkGrey, patWidth, patHeight, destWidth, destHeight, PCLXLAttrEnums.eVal.eIndexedPixel, PCLXLAttrEnums.eVal.e1Bit, PCLXLAttrEnums.eVal.ePagePattern, PCLXLAttrEnums.eVal.eNoCompression, pattern_DarkGrey); }