コード例 #1
0
ファイル: Binarizer.cs プロジェクト: CareyGit/jx
		protected internal Binarizer(LuminanceSource source)
		{
			if (source == null)
			{
				throw new System.ArgumentException("Source must be non-null.");
			}
			this.source = source;
		}
コード例 #2
0
ファイル: Binarizer.cs プロジェクト: 1907931256/jx
 protected internal Binarizer(LuminanceSource source)
 {
     if (source == null)
     {
         throw new System.ArgumentException("Source must be non-null.");
     }
     this.source = source;
 }
コード例 #3
0
ファイル: Binarizer.cs プロジェクト: CareyGit/jx
		/// <summary> Creates a new object with the same type as this Binarizer implementation, but with pristine
		/// state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache
		/// of 1 bit data. See Effective Java for why we can't use Java's clone() method.
		/// 
		/// </summary>
		/// <param name="source">The LuminanceSource this Binarizer will operate on.
		/// </param>
		/// <returns> A new concrete Binarizer implementation object.
		/// </returns>
		public abstract Binarizer createBinarizer(LuminanceSource source);
コード例 #4
0
        /// <summary> Returns a new object with rotated image data. Only callable if isRotateSupported() is true.
        ///
        /// </summary>
        /// <returns> A rotated version of this object.
        /// </returns>
        public BinaryBitmap rotateCounterClockwise()
        {
            LuminanceSource newSource = binarizer.LuminanceSource.rotateCounterClockwise();

            return(new BinaryBitmap(binarizer.createBinarizer(newSource)));
        }
コード例 #5
0
        /// <summary> Returns a new object with cropped image data. Implementations may keep a reference to the
        /// original data rather than a copy. Only callable if isCropSupported() is true.
        ///
        /// </summary>
        /// <param name="left">The left coordinate, 0 <= left < getWidth().
        /// </param>
        /// <param name="top">The top coordinate, 0 <= top <= getHeight().
        /// </param>
        /// <param name="width">The width of the rectangle to crop.
        /// </param>
        /// <param name="height">The height of the rectangle to crop.
        /// </param>
        /// <returns> A cropped version of this object.
        /// </returns>
        public BinaryBitmap crop(int left, int top, int width, int height)
        {
            LuminanceSource newSource = binarizer.LuminanceSource.crop(left, top, width, height);

            return(new BinaryBitmap(binarizer.createBinarizer(newSource)));
        }
コード例 #6
0
ファイル: Binarizer.cs プロジェクト: 1907931256/jx
 /// <summary> Creates a new object with the same type as this Binarizer implementation, but with pristine
 /// state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache
 /// of 1 bit data. See Effective Java for why we can't use Java's clone() method.
 ///
 /// </summary>
 /// <param name="source">The LuminanceSource this Binarizer will operate on.
 /// </param>
 /// <returns> A new concrete Binarizer implementation object.
 /// </returns>
 public abstract Binarizer createBinarizer(LuminanceSource source);