Exemplo n.º 1
0
        private void RecreateDocumentCanvasLayerView(CanvasView canvasView)
        {
            DocumentCanvasLayerView view;

            if (this.documentCanvasLayerViews.TryGetValue(canvasView, out view))
            {
                view.Dispose();
                this.documentCanvasLayerViews.Remove(canvasView);
            }
            bool isHighQualityScalingEnabled = GetIsHighQualityScalingEnabled(canvasView);
            DocumentCanvasLayerView view2    = new DocumentCanvasLayerView(this, canvasView, isHighQualityScalingEnabled ? this.tileCachesHQRO : this.tileCachesRO);

            this.documentCanvasLayerViews.Add(canvasView, view2);
        }
 public DocumentCanvasLayerViewMipLayer(DocumentCanvasLayerView owner, int canvasTileEdgeLog2, int mipLevel, DocumentCanvasTileCache tileCache)
 {
     Validate.Begin().IsNotNull <DocumentCanvasLayerView>(owner, "owner").IsNotNull <DocumentCanvasTileCache>(tileCache, "tileCache").Check().IsGreaterThanOrEqualTo(canvasTileEdgeLog2, 1, "canvasTileEdgeLog2").Check();
     owner.VerifyAccess();
     this.owner      = owner;
     this.tileCache  = tileCache;
     this.canvasView = this.owner.CanvasView;
     this.canvasView.ViewportCanvasBoundsChanged += new ValueChangedEventHandler <RectDouble>(this.OnCanvasViewViewportCanvasBoundsChanged);
     this.mipLevel              = mipLevel;
     this.tileMathHelper        = this.tileCache.TileMathHelper;
     this.deviceBitmapTickets   = ArrayUtil.Create2D <ObjectPoolTicket <IDeviceBitmap> >(this.tileMathHelper.TileRows, this.tileMathHelper.TileColumns);
     this.deviceBitmaps         = ArrayUtil.Create2D <IDeviceBitmap>(this.tileMathHelper.TileRows, this.tileMathHelper.TileColumns);
     this.tileBuffers           = ArrayUtil.Create2D <IBitmap <ColorPbgra32> >(this.tileMathHelper.TileRows, this.tileMathHelper.TileColumns);
     this.isDeviceBitmapCurrent = ArrayUtil.Create2D <bool>(this.tileMathHelper.TileRows, this.tileMathHelper.TileColumns);
 }