public WarpImageVerb(IImageTransformer imageTransformer, IFuture warpedBoundsFuture, IFuturePrototype sourceMapSupplier) { this.imageTransformer = imageTransformer; this.warpedBoundsFuture = warpedBoundsFuture; this.sourceMapSupplier = sourceMapSupplier; }
public TransparencyPrototype(TransparencyOptions transparencyOptions, IFuturePrototype antialiasedPrototype, IFuturePrototype exactColorPrototype) { this.transparencyOptions = new TransparencyOptions(transparencyOptions); this.antialiasedPrototype = antialiasedPrototype; this.exactColorPrototype = exactColorPrototype; }
public void Flush() { this.cachedCoordSys = null; this.cachedRendererCredit = null; this.cachedUserBounds = null; this.cachedImageRequest = null; }
public void Flush() { cachedCoordSys = null; cachedRendererCredit = null; cachedUserBounds = null; cachedImageRequest = null; }
public OpenDocumentSensitivePrioritizedPrototype(OpenDocumentSensitivePrioritizer prioritizer, IFuturePrototype prototype, IFuture openDocumentFuture) { this.prioritizer = prioritizer; this.prototype = prototype; this.openDocumentFuture = openDocumentFuture; }
private IFuturePrototype GetAccessPrototype(AccessMethod accessMethod, FutureFeatures openDocFeatures, params IFuturePrototype[] methodParams) { IFuturePrototype[] array = new IFuturePrototype[2 + methodParams.Length]; array[0] = this.GetOpenDocumentFuture(openDocFeatures); array[1] = new ConstantFuture(new IntParameter((int)accessMethod)); Array.Copy(methodParams, 0, array, 2, methodParams.Length); return new ApplyPrototype(new ApplyVerbPresent(), array); }
private IFuturePrototype GetAccessPrototype(AccessMethod accessMethod, FutureFeatures openDocFeatures, params IFuturePrototype[] methodParams) { IFuturePrototype[] array = new IFuturePrototype[2 + methodParams.Length]; array[0] = this.GetOpenDocumentFuture(openDocFeatures); array[1] = new ConstantFuture(new IntParameter((int)accessMethod)); Array.Copy(methodParams, 0, array, 2, methodParams.Length); return(new ApplyPrototype(new ApplyVerbPresent(), array)); }
public ImageParameterFromTileAddress(CoordinateSystemIfc coordSys, Size outputSize) { this.boundsParameter = new ApplyPrototype(new TileAddressToImageRegion(coordSys), new IFuturePrototype[] { new UnevaluatedTerm(TermName.TileAddress) }); this.sizeParameter = new ConstantFuture(new SizeParameter(outputSize)); }
internal IFuturePrototype AddAsynchrony(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached), "should always cache async stuff, I think."); prototype = new MemCachePrototype(this.cachePackage.asyncCache, new OpenDocumentSensitivePrioritizedPrototype(this.cachePackage.openDocumentPrioritizer, new Asynchronizer(this.cachePackage.computeAsyncScheduler, prototype), this.GetOpenDocumentFuture(FutureFeatures.MemoryCached))); } return(prototype); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { if (this.cachedImageRequest == null || this.lastImageRequest_parameterType != parameterType || this.lastImageRequest_features != features) { this.lastImageRequest_parameterType = parameterType; this.lastImageRequest_features = features; this.cachedImageRequest = this.backingSource.GetImagePrototype(parameterType, features); } return this.cachedImageRequest; }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { if (this.cachedImageRequest == null || this.lastImageRequest_parameterType != parameterType || this.lastImageRequest_features != features) { this.lastImageRequest_parameterType = parameterType; this.lastImageRequest_features = features; this.cachedImageRequest = this.backingSource.GetImagePrototype(parameterType, features); } return(this.cachedImageRequest); }
internal OneLayerBoundApplier(IRenderableSource source, Layer layer, CachePackage cachePackage) { this.source = source; this.layer = layer; this.clippedImageFuture = new MemCachePrototype(cachePackage.computeCache, new ApplyPrototype(new UserClipperVerb(), new IFuturePrototype[] { source.GetImagePrototype(null, (FutureFeatures)11), new UnevaluatedTerm(TermName.TileAddress), source.GetUserBounds(null, FutureFeatures.Cached) })); }
internal IFuturePrototype AddCaching(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(this.cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(this.cachePackage.computeCache, prototype); } return(prototype); }
public IFuturePrototype GetImageDetailPrototype(FutureFeatures features) { IFuturePrototype prototype = GetAccessPrototype(AccessMethod.ImageDetail, FutureFeatures.Cached, new IFuturePrototype[] { new UnevaluatedTerm(TermName.ImageDetail) }); if (HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(cachePackage.computeCache, prototype); } return(AddAsynchrony(prototype, features)); }
internal IFuturePrototype AddCaching(IFuturePrototype prototype, FutureFeatures features) { if (HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(cachePackage.diskCache, prototype); } if (HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(cachePackage.computeCache, prototype); } return(prototype); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { if (parameterType == null) { parameterType = new ImageParameterFromTileAddress(GetDefaultCoordinateSystem()); } FutureFeatures openDocFeatures = FutureFeatures.Cached; IFuturePrototype accessPrototype = GetAccessPrototype(AccessMethod.Render, openDocFeatures, new IFuturePrototype[] { new UnevaluatedTerm(TermName.ImageBounds), new UnevaluatedTerm(TermName.OutputSize), new UnevaluatedTerm(TermName.UseDocumentTransparency), new UnevaluatedTerm(TermName.ExactColors) }); Verb verb = new SourceImageDownsamplerVerb(AddCaching(accessPrototype, FutureFeatures.Cached)); IFuturePrototype futurePrototype = new ApplyPrototype(verb, new[] { parameterType.GetBoundsParameter(), parameterType.GetSizeParameter(), new ConstantFuture( new BoolParameter(sourceMap.transparencyOptions.useDocumentTransparency)), new ConstantFuture(new BoolParameter(HasFeature(features, FutureFeatures.ExactColors))) }); if (HasFeature(features, FutureFeatures.Transparency)) { IFuturePrototype futurePrototype2 = new ApplyPrototype(verb, new[] { parameterType.GetBoundsParameter(), parameterType.GetSizeParameter(), new ConstantFuture( new BoolParameter(sourceMap.transparencyOptions.useDocumentTransparency)), new ConstantFuture(new BoolParameter(true)) }); if (HasFeature(features, FutureFeatures.MemoryCached)) { futurePrototype = AddCaching(futurePrototype, FutureFeatures.MemoryCached); futurePrototype2 = AddCaching(futurePrototype2, FutureFeatures.MemoryCached); } futurePrototype = new TransparencyPrototype(sourceMap.transparencyOptions, futurePrototype, futurePrototype2); } futurePrototype = AddCaching(futurePrototype, features); return(AddAsynchrony(futurePrototype, features)); }
public static IFuturePrototype AddFeatures(IFuturePrototype prototype, FutureFeatures features, CachePackage cachePackage) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Cached)) { prototype = new MemCachePrototype(cachePackage.networkCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { prototype = new MemCachePrototype(cachePackage.asyncCache, new Asynchronizer(cachePackage.networkAsyncScheduler, prototype)); } return prototype; }
public static IFuturePrototype AddFeatures(IFuturePrototype prototype, FutureFeatures features, CachePackage cachePackage) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Cached)) { prototype = new MemCachePrototype(cachePackage.networkCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { prototype = new MemCachePrototype(cachePackage.asyncCache, new Asynchronizer(cachePackage.networkAsyncScheduler, prototype)); } return(prototype); }
public IFuture GetRenderedLegendFuture(IDisplayableSource displayableSource, FutureFeatures features) { RenderRegion renderRegion = latentRegionHolder.renderRegion; if (renderRegion == null) { throw new RenderFailedException("Region unavailable"); } renderRegion = renderRegion.Copy(new DirtyEvent()); MapRectangleParameter mapRectangleParameter = new MapRectangleParameter(renderRegion.GetBoundingBox()); Size outputSize = OutputSizeFromRenderRegion(renderRegion); IFuturePrototype imagePrototype = displayableSource.GetImagePrototype(new ImageParameterFromRawBounds(outputSize), features); return(imagePrototype.Curry(new ParamDict(new object[] { TermName.ImageBounds, mapRectangleParameter }))); }
public MemCachePrototype(CacheBase cache, IFuturePrototype prototype) { this.cache = cache; this.prototype = prototype; }
public Asynchronizer(AsyncScheduler scheduler, IFuturePrototype innerPrototype) { this.scheduler = scheduler; this.innerPrototype = innerPrototype; }
public SourceImageDownsamplerVerb(IFuturePrototype prototype) { this.prototype = prototype; }
public DiskCachePrototype(DiskCache cache, IFuturePrototype prototype) { this.cache = cache; this.prototype = prototype; }
public VETileUpsamplerVerb(IFuturePrototype veTileFetch) { this.veTileFetch = veTileFetch; }
internal IFuturePrototype AddAsynchrony(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached), "should always cache async stuff, I think."); prototype = new MemCachePrototype(this.cachePackage.asyncCache, new OpenDocumentSensitivePrioritizedPrototype(this.cachePackage.openDocumentPrioritizer, new Asynchronizer(this.cachePackage.computeAsyncScheduler, prototype), this.GetOpenDocumentFuture(FutureFeatures.MemoryCached))); } return prototype; }
internal IFuturePrototype AddCaching(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(this.cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(this.cachePackage.computeCache, prototype); } return prototype; }