GetRed() public method

public GetRed ( ) : int
return int
コード例 #1
0
        /**
         * Tests if this RtfColor is equal to another RtfColor.
         *
         * @param obj another RtfColor
         * @return <code>True</code> if red, green and blue values of the two colours match,
         *   <code>false</code> otherwise.
         */
        public override bool Equals(Object obj)
        {
            if (!(obj is RtfColor))
            {
                return(false);
            }
            RtfColor color = (RtfColor)obj;

            return(this.red == color.GetRed() && this.green == color.GetGreen() && this.blue == color.GetBlue());
        }
コード例 #2
0
 /**
  * Constructs a RtfColor as a clone of an existing RtfColor
  *
  * @param doc The RtfDocument this RtfColor belongs to
  * @param col The RtfColor to use as a base
  */
 public RtfColor(RtfDocument doc, RtfColor col) : base(doc)
 {
     if (col != null)
     {
         this.red   = col.GetRed();
         this.green = col.GetGreen();
         this.blue  = col.GetBlue();
     }
     if (this.document != null)
     {
         this.colorNumber = this.document.GetDocumentHeader().GetColorNumber(this);
     }
 }
コード例 #3
0
 /// <summary>
 /// Constructs a RtfColor as a clone of an existing RtfColor
 /// </summary>
 /// <param name="doc">The RtfDocument this RtfColor belongs to</param>
 /// <param name="col">The RtfColor to use as a base</param>
 public RtfColor(RtfDocument doc, RtfColor col) : base(doc)
 {
     if (col != null)
     {
         _red   = col.GetRed();
         _green = col.GetGreen();
         _blue  = col.GetBlue();
     }
     if (Document != null)
     {
         _colorNumber = Document.GetDocumentHeader().GetColorNumber(this);
     }
 }
コード例 #4
0
ファイル: RtfColor.cs プロジェクト: nicecai/iTextSharp-4.1.6
 /**
 * Constructs a RtfColor as a clone of an existing RtfColor
 * 
 * @param doc The RtfDocument this RtfColor belongs to
 * @param col The RtfColor to use as a base
 */
 public RtfColor(RtfDocument doc, RtfColor col) : base(doc) {
     if (col != null) {
         this.red = col.GetRed();
         this.green = col.GetGreen();
         this.blue = col.GetBlue();
     }
     if (this.document != null) {
         this.colorNumber = this.document.GetDocumentHeader().GetColorNumber(this);
     }
 }