GetBlue() public méthode

public GetBlue ( ) : int
Résultat int
Exemple #1
0
        /// <summary>
        /// Tests if this RtfColor is equal to another RtfColor.
        ///  false  otherwise.
        /// </summary>
        /// <param name="obj">another RtfColor</param>
        /// <returns> True  if red, green and blue values of the two colours match,</returns>
        public override bool Equals(object obj)
        {
            if (!(obj is RtfColor))
            {
                return(false);
            }
            RtfColor color = (RtfColor)obj;

            return(_red == color.GetRed() && _green == color.GetGreen() && _blue == color.GetBlue());
        }
Exemple #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);
     }
 }
 /// <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);
     }
 }
Exemple #4
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);
     }
 }
Exemple #5
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;

            if (this.red == color.GetRed() && this.green == color.GetGreen() && this.blue == color.GetBlue())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }