flatedecodeparam.cs

来自「PDF文件格式解析库源代码」· CS 代码 · 共 92 行

CS
92
字号
using System;
using System.Collections.Generic;
using System.Text;
using AnotherPDFLib.PdfGraphics;

namespace AnotherPDFLib
{
	public partial class FlateDecodeParam : PdfDictionary
	{
		/// <summary>
		/// A code that selects the predictor algorithm, if any.
		/// </summary>
		public int Predictor
		{
			get
			{
				PdfInteger predictor = this["Predictor"] as PdfInteger;
				if (predictor != null)
				{
					return predictor.Value;
				}
				return 1;
			}
			set
			{
				this["Predictor"] = new PdfInteger(value);
			}
		}

		/// <summary>
		/// The number of interleaved color components per sample.
		/// </summary>
		public int Colors
		{
			get
			{
				PdfInteger colors = this["Colors"] as PdfInteger;
				if (colors != null)
				{
					return colors.Value;
				}
				return 1;
			}
			set
			{
				this["Colors"] = new PdfInteger(value);
			}
		}

		/// <summary>
		/// The number of bits used to represent each color component in a sample.
		/// </summary>
		public int BitsPerComponent
		{
			get
			{
				PdfInteger bitspercomponent = this["BitsPerComponent"] as PdfInteger;
				if (bitspercomponent != null)
				{
					return bitspercomponent.Value;
				}
				return 8;
			}
			set
			{
				this["BitsPerComponent"] = new PdfInteger(value);
			}
		}

		/// <summary>
		/// The number of samples in each row.
		/// </summary>
		public int Columns
		{
			get
			{
				PdfInteger columns = this["Columns"] as PdfInteger;
				if (columns != null)
				{
					return columns.Value;
				}
				return 1;
			}
			set
			{
				this["Columns"] = new PdfInteger(value);
			}
		}

	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?