Exemple #1
0
        public bool Overlaps(BackgroundImage image)
        {
            // Get the first image block:
            MeshBlock block = image.FirstBlock;

            if (block == null || FirstBlock == null)
            {
                return(false);
            }

            // Check if images verts are contained within any of mine.
            MeshBlock current = FirstBlock;

            while (current != null)
            {
                if (current.Overlaps(block))
                {
                    return(true);
                }

                current = current.LocalBlockAfter;
            }

            return(false);
        }
		public bool Overlaps(BackgroundImage image){
			
			// Get the first image block:
			MeshBlock block=image.FirstBlock;
			
			if(block==null || FirstBlock==null){
				return false;
			}
			
			// Check if images verts are contained within any of mine.
			MeshBlock current=FirstBlock;
			
			while(current!=null){
				
				if(current.Overlaps(block)){
					
					return true;
				
				}
				
				current=current.LocalBlockAfter;
				
			}
			
			return false;
			
		}
		/// <summary>Call this if the current property requires a background image object.</summary>
		public BackgroundImage GetBackground(ComputedStyle style){
			
			BackgroundImage image=style.BGImage;
			
			if(image==null){
				style.BGImage=image=new BackgroundImage(style.Element);
				style.EnforceNoInline();
			}
			
			// Flag it as having a change:
			image.Changed=true;
			
			return image;
		}
        /// <summary>Call this if the current property requires a background image object.</summary>
        public BackgroundImage GetBackground(ComputedStyle style)
        {
            BackgroundImage image = style.BGImage;

            if (image == null)
            {
                style.BGImage = image = new BackgroundImage(style.Element);
                style.EnforceNoInline();
            }

            // Flag it as having a change:
            image.Changed = true;

            return(image);
        }