${mapping_DrawParameter_Title}
 internal override void Draw(DrawParameter drawParameter)
 {
     if ((!ViewBounds.IsEmpty) && (base.IsVisible))
     {
         this.OnProgress(0);
         this.GetImageSource(
             delegate(ImageSource imgSrc)
             {
                 this.GetSourceCompleted(imgSrc, drawParameter.UseTransitions, ++this.requestID);
             }
         );
     }
 }
        internal override void Draw(DrawParameter drawParameter)
        {
            if ((base.IsInitialized && base.IsVisible) && (!ViewBounds.IsEmpty) && (base.Container != null))
            {
                if (GetCachedResolutions() != null)
                {
                    realResolutions = this.GetCachedResolutions();
                }
                else
                {
                    realResolutions = drawParameter.Resoluitons;
                }

                int[] span = this.GetTileSpanWithin(ViewBounds, Resolution);
                if ((span[2] >= 0) || (span[3] >= 0))
                {
                    AddTiles(Resolution, span[0], span[1], span[2], span[3], drawParameter.UseTransitions);
                    RemoveTiles(ViewBounds, Resolution);
                    base.OnProgress(this.GetProgress());
                }
            }
        }
        internal override void Draw(DrawParameter drawParameter)
        {
            if (base.Container != null)
            {
                Rectangle2D bounds = ViewBounds;
                Rectangle2D biggerBounds = bounds;
                double num = 20.0 * Resolution;
                biggerBounds.Inflate(num, num);//上下左右扩张20个像素的距离
                foreach (UIElement element in this.Children)
                {
                    if (element == null)
                    {
                        return;
                    }
                    if (!(element.GetValue(BBoxProperty) is Rectangle2D))
                    {
                        throw new ArgumentException(ExceptionStrings.BboxIsNotSet);
                    }

                    Rectangle2D rect = GetBBox(element);
                    if (rect.IntersectsWith(biggerBounds) && !base.Container.Children.Contains(element))
                    {
                        if (element is ShapeElement)
                        {
                            ShapeElement sb = element as ShapeElement;
                            sb.SetPath();
                            sb.InvalidatePath(base.Container.Resolution, base.Container.OriginX, base.Container.OriginY);
                            ElementsLayer.SetBBox(sb, sb.ClippedBounds);
                        }
                        base.Container.Children.Add(element);
                    }
                }
            }
        }
示例#4
0
 internal abstract void Draw(DrawParameter drawParameter);