Gma.QrCodeNet.Encoder/Windows/Render/EncapsulatedPostScriptRenderer.cs
/// <summary>
/// Renders the matrix in an Encapsuled PostScript format.
/// </summary>
/// <param name="matrix">The matrix to be rendered</param>
/// <param name="moduleSize">Size in points (1 inch contains 72 point in PostScript) of a module</param>
/// <param name="stream">Output stream that must be writable</param>
Renders the matrix in an Encapsuled PostScript format.
Renders the matrix in an Encapsuled PostScript format .
public void WriteToStream(BitMatrix matrix, Stream stream)
		{
			using (var writer = new StreamWriter(stream))
			{
				int width = matrix == null ? 21 : matrix.Width;
				DrawingSize drawingSize = m_iSize.GetSize(width);
				OutputHeader(drawingSize, writer);
				OutputBackground(writer);
				if (matrix != null)
				{
					switch (m_DrawingTechnique)
					{
						case EpsModuleDrawingTechnique.Squares:
							DrawSquares(matrix, writer);
							break;
						case EpsModuleDrawingTechnique.Image:
							DrawImage(matrix, writer);
							break;
						default:
							throw new ArgumentOutOfRangeException("DrawingTechnique");
					}
				}
				OutputFooter(writer);
			}
		}
public void WriteToStream ( BitMatrix matrix , Stream stream ) { using ( var writer = new StreamWriter ( stream ) ) { int width = matrix == null ? 21 : matrix . Width ; DrawingSize drawingSize = m_iSize . GetSize ( width ) ; OutputHeader ( drawingSize , writer ) ; OutputBackground ( writer ) ; if ( matrix != null ) { switch ( m_DrawingTechnique ) { case EpsModuleDrawingTechnique . Squares : DrawSquares ( matrix , writer ) ; break ; case EpsModuleDrawingTechnique . Image : DrawImage ( matrix , writer ) ; break ; default : throw new ArgumentOutOfRangeException ( " " ) ; } } OutputFooter ( writer ) ; } }
Renders the matrix in an Encapsuled PostScript format.
Renders the matrix in an Encapsuled PostScript format .
matrix
BitMatrix
The matrix to be rendered
The matrix to be rendered
stream
Stream
Output stream that must be writable
Output stream that must be writable
moduleSize
Size in points (1 inch contains 72 point in PostScript) of a module
Size in points ( 1 inch contains 72 point in PostScript ) of a module