Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (!base.Equals(obj))
            {
                return(false);
            }
            if (!(obj is SymbolContainer))
            {
                return(false);
            }
            SymbolContainer other = (SymbolContainer)obj;

            if (this.symbol != other.symbol)
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new point container, that holds the x-y coordinates of a point, a text variable, two paint objects, and
 /// a reference on a symbolContainer, if the text is connected with a POI.
 /// </summary>
 protected internal PointTextContainer(Point point, Display display, int priority, string text, IPaint paintFront, IPaint paintBack, SymbolContainer symbolContainer, Position position, int maxTextWidth) : base(point, display, priority)
 {
     this.maxTextWidth    = maxTextWidth;
     this.text            = text;
     this.symbolContainer = symbolContainer;
     this.paintFront      = paintFront;
     this.paintBack       = paintBack;
     this.position        = position;
     if (paintBack != null)
     {
         this.textWidth  = paintBack.GetTextWidth(text);
         this.textHeight = paintBack.GetTextHeight(text);
     }
     else
     {
         this.textWidth  = paintFront.GetTextWidth(text);
         this.textHeight = paintFront.GetTextHeight(text);
     }
     this.isVisible = !this.paintFront.Transparent || (this.paintBack != null && !this.paintBack.Transparent);
 }