public IFuture GetImageBounds(FutureFeatures features) { IFuture future = GetAccessFuture(AccessMethod.FetchBounds, FutureFeatures.Cached, new IFuture[0]); future = new MemCacheFuture(cachePackage.boundsCache, future); return(AddAsynchrony(future, features)); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { if (parameterType == null) { parameterType = new ImageParameterFromTileAddress(this.GetDefaultCoordinateSystem()); } FutureFeatures futureFeatures = FutureFeatures.Raw; if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Transparency)) { futureFeatures |= FutureFeatures.Transparency; } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { futureFeatures |= FutureFeatures.MemoryCached; } IFuturePrototype futurePrototype = new ApplyPrototype(new WarpImageVerb(this.imageTransformer, this.GetImageBounds(FutureFeatures.Cached), this.unwarpedMapTileSource.GetImagePrototype(new ImageParameterFromRawBounds(WarpedMapTileSource.sourceImageOversampleSize), futureFeatures)), new IFuturePrototype[] { parameterType.GetBoundsParameter(), parameterType.GetSizeParameter() }); if (parameterType is ImageParameterFromTileAddress) { futurePrototype = new ApplyPrototype(new FadeVerb(this.unwarpedMapTileSource.GetTransparencyOptions().GetFadeOptions()), new IFuturePrototype[] { futurePrototype, new UnevaluatedTerm(TermName.TileAddress) }); } else { D.Say(2, "Warning: Ignoring fade options because I don't have a tile address."); } futurePrototype = this.unwarpedMapTileSource.AddCaching(futurePrototype, features); return this.unwarpedMapTileSource.AddAsynchrony(futurePrototype, features); }
internal IFuture AddAsynchrony(IFuture future, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { future = new MemCacheFuture(this.cachePackage.asyncCache, new OpenDocumentSensitivePrioritizedFuture(this.cachePackage.openDocumentPrioritizer, Asynchronizer.MakeFuture(this.cachePackage.computeAsyncScheduler, future), this.GetOpenDocumentFuture(FutureFeatures.MemoryCached))); } return(future); }
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 IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { if (latentRegionHolder == null) { latentRegionHolder = this.replacementLatentRegionHolder; } return this.underSource.GetUserBounds(latentRegionHolder, features); }
public IFuture GetImageBounds(FutureFeatures features) { IFuture future = new ApplyFuture(new WarpBoundsVerb(imageTransformer), new[] { unwarpedMapTileSource.GetImageBounds(features) }); future = new MemCacheFuture(cachePackage.boundsCache, future); return(unwarpedMapTileSource.AddAsynchrony(future, features)); }
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 IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { IFuture future = new ApplyFuture(new WarpBoundsVerb(imageTransformer), new[] { unwarpedMapTileSource.GetUserBounds(latentRegionHolder, FutureFeatures.Cached) }); future = new MemCacheFuture(cachePackage.boundsCache, future); return(unwarpedMapTileSource.AddAsynchrony(future, features)); }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { if (latentRegionHolder == null) { latentRegionHolder = this.replacementLatentRegionHolder; } return(this.underSource.GetUserBounds(latentRegionHolder, features)); }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { IFuture future = new ApplyFuture(new WarpBoundsVerb(this.imageTransformer), new IFuture[] { this.unwarpedMapTileSource.GetUserBounds(latentRegionHolder, FutureFeatures.Cached) }); future = new MemCacheFuture(this.cachePackage.boundsCache, future); return this.unwarpedMapTileSource.AddAsynchrony(future, features); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { D.Assert(parameterType == null); IFuturePrototype prototype = new ApplyPrototype(new RenderedTileFetch(this.namingScheme), new IFuturePrototype[] { new UnevaluatedTerm(TermName.TileAddress) }); return VETileSource.AddFeatures(prototype, features & (FutureFeatures)(-3), this.cachePackage); }
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); }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { if (this.cachedUserBounds == null || this.lastUserBoundsRequest_latentRegionHolder != latentRegionHolder || this.lastUserBoundsRequest_features != features) { this.lastUserBoundsRequest_latentRegionHolder = latentRegionHolder; this.lastUserBoundsRequest_features = features; this.cachedUserBounds = this.backingSource.GetUserBounds(latentRegionHolder, features); } return this.cachedUserBounds; }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Cached)); IFuture future = new MemCacheFuture(this.cachePackage.boundsCache, new ApplyFuture(new ConstantVerb(new BoundsPresent(new RenderRegion(new MapRectangle(-85.0, -5000.0, 85.0, 5000.0), new DirtyEvent()))), new IFuture[0])); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { future = new MemCacheFuture(this.cachePackage.asyncCache, Asynchronizer.MakeFuture(this.cachePackage.networkAsyncScheduler, future)); } return future; }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)); return(new MemCacheFuture(cachePackage.asyncCache, Asynchronizer.MakeFuture(cachePackage.computeAsyncScheduler, new MemCacheFuture(cachePackage.boundsCache, new ApplyFuture(new ConstantVerb(new BoundsPresent( new RenderRegion(new MapRectangle(-85.0, -5000.0, 85.0, 5000.0), new DirtyEvent()))), new IFuture[0]))))); }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { if (this.cachedUserBounds == null || this.lastUserBoundsRequest_latentRegionHolder != latentRegionHolder || this.lastUserBoundsRequest_features != features) { this.lastUserBoundsRequest_latentRegionHolder = latentRegionHolder; this.lastUserBoundsRequest_features = features; this.cachedUserBounds = this.backingSource.GetUserBounds(latentRegionHolder, features); } return(this.cachedUserBounds); }
public IFuture GetOpenDocumentFuture(FutureFeatures features) { IFuture future = new FetchDocumentFuture(this.localDocumentFuture); D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { future = new MemCacheFuture(this.cachePackage.openSourceDocumentCache, future); } D.Assert(!UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)); return future; }
public IFuturePrototype GetImageDetailPrototype(FutureFeatures features) { IFuturePrototype prototype = this.GetAccessPrototype(AccessMethod.ImageDetail, FutureFeatures.Cached, new IFuturePrototype[] { new UnevaluatedTerm(TermName.ImageDetail) }); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(this.cachePackage.computeCache, prototype); } return this.AddAsynchrony(prototype, features); }
public IFuture GetOpenDocumentFuture(FutureFeatures features) { IFuture future = new FetchDocumentFuture(this.localDocumentFuture); D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { future = new MemCacheFuture(this.cachePackage.openSourceDocumentCache, future); } D.Assert(!UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)); return(future); }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)); D.Assert(!UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Transparency)); if (latentRegionHolder == null) { latentRegionHolder = this.sourceMap.latentRegionHolder; } latentRegionHolder.RequestRenderRegion(this.GetImageBounds((FutureFeatures)7)); IFuture future = new MemCacheFuture(this.cachePackage.boundsCache, new ApplyFuture(new UserBoundsRefVerb(latentRegionHolder, this.GetImageBounds(FutureFeatures.Cached)), new IFuture[0])); return this.AddAsynchrony(future, features); }
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 IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { if (cachedUserBounds == null || lastUserBoundsRequest_latentRegionHolder != latentRegionHolder || lastUserBoundsRequest_features != features) { lastUserBoundsRequest_latentRegionHolder = latentRegionHolder; lastUserBoundsRequest_features = features; cachedUserBounds = backingSource.GetUserBounds(latentRegionHolder, features); } return(cachedUserBounds); }
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)); }
public IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)); D.Assert(!UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Transparency)); if (latentRegionHolder == null) { latentRegionHolder = this.sourceMap.latentRegionHolder; } latentRegionHolder.RequestRenderRegion(this.GetImageBounds((FutureFeatures)7)); IFuture future = new MemCacheFuture(this.cachePackage.boundsCache, new ApplyFuture(new UserBoundsRefVerb(latentRegionHolder, this.GetImageBounds(FutureFeatures.Cached)), new IFuture[0])); return(this.AddAsynchrony(future, features)); }
public IFuture GetOpenDocumentFuture(FutureFeatures features) { IFuture future = new FetchDocumentFuture(localDocumentFuture); D.Assert(HasFeature(features, FutureFeatures.MemoryCached)); if (HasFeature(features, FutureFeatures.MemoryCached)) { future = new MemCacheFuture(cachePackage.openSourceDocumentCache, future); } D.Assert(!HasFeature(features, FutureFeatures.Async)); return(future); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { D.Assert(parameterType == null); IFuturePrototype futurePrototype = new ApplyPrototype(new VETileFetch(this.veStyle), new IFuturePrototype[] { new UnevaluatedTerm(TermName.TileAddress) }); futurePrototype = VETileSource.AddFeatures(futurePrototype, FutureFeatures.Cached & features, this.cachePackage); IFuturePrototype prototype = new ApplyPrototype(new VETileUpsamplerVerb(futurePrototype), new IFuturePrototype[] { new UnevaluatedTerm(TermName.TileAddress) }); return VETileSource.AddFeatures(prototype, features, this.cachePackage); }
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 IFuture GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { List<IFuture> list = new List<IFuture>(); foreach (SourceMap current in this.layer) { if (current.ReadyToLock()) { LatentRegionHolder latentRegionHolder2 = new LatentRegionHolder(new DirtyEvent(), new DirtyEvent()); list.Add(this.mapTileSourceFactory.CreateRenderableWarpedSource(current).GetUserBounds(latentRegionHolder2, features)); } } IFuture future = new ApplyFuture(new CompositeBoundsVerb(), list.ToArray()); D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)); return new MemCacheFuture(this.mapTileSourceFactory.GetCachePackage().boundsCache, future); }
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 GetUserBounds(LatentRegionHolder latentRegionHolder, FutureFeatures features) { List <IFuture> list = new List <IFuture>(); foreach (SourceMap current in this.layer) { if (current.ReadyToLock()) { LatentRegionHolder latentRegionHolder2 = new LatentRegionHolder(new DirtyEvent(), new DirtyEvent()); list.Add(this.mapTileSourceFactory.CreateRenderableWarpedSource(current).GetUserBounds(latentRegionHolder2, features)); } } IFuture future = new ApplyFuture(new CompositeBoundsVerb(), list.ToArray()); D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)); return(new MemCacheFuture(this.mapTileSourceFactory.GetCachePackage().boundsCache, future)); }
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 IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { if (parameterType == null) { parameterType = new ImageParameterFromTileAddress(GetDefaultCoordinateSystem()); } FutureFeatures futureFeatures = FutureFeatures.Raw; if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Transparency)) { futureFeatures |= FutureFeatures.Transparency; } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { futureFeatures |= FutureFeatures.MemoryCached; } IFuturePrototype futurePrototype = new ApplyPrototype( new WarpImageVerb(imageTransformer, GetImageBounds(FutureFeatures.Cached), unwarpedMapTileSource.GetImagePrototype( new ImageParameterFromRawBounds(sourceImageOversampleSize), futureFeatures)), new[] { parameterType.GetBoundsParameter(), parameterType.GetSizeParameter() }); if (parameterType is ImageParameterFromTileAddress) { futurePrototype = new ApplyPrototype( new FadeVerb(unwarpedMapTileSource.GetTransparencyOptions().GetFadeOptions()), new[] { futurePrototype, new UnevaluatedTerm(TermName.TileAddress) }); } else { D.Say(2, "Warning: Ignoring fade options because I don't have a tile address."); } futurePrototype = unwarpedMapTileSource.AddCaching(futurePrototype, features); return(unwarpedMapTileSource.AddAsynchrony(futurePrototype, features)); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { List<IFuturePrototype> list = new List<IFuturePrototype>(); list.Add(parameterType.GetSizeParameter()); foreach (SourceMap current in this.layer) { if (current.ReadyToLock()) { IDisplayableSource displayableSource = this.mapTileSourceFactory.CreateDisplayableWarpedSource(current); list.Add(displayableSource.GetImagePrototype(parameterType, features)); } } IFuturePrototype futurePrototype = new ApplyPrototype(new CompositeImageVerb(), list.ToArray()); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { futurePrototype = new DiskCachePrototype(this.mapTileSourceFactory.GetCachePackage().diskCache, futurePrototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { futurePrototype = new MemCachePrototype(this.mapTileSourceFactory.GetCachePackage().computeCache, futurePrototype); } return futurePrototype; }
static Expression ParseAndBindExpr(string expText) { if (expText.IndexOf("::", StringComparison.Ordinal) > 0) { throw FutureFeatures.ExpressionNSSyntax(); } bool skipBind = false; if (expText.StartsWith("::", StringComparison.Ordinal)) { expText = expText.Substring(2); skipBind = true; } Expression e = Expression.Parse(expText); if (!skipBind) { e = BindVariables(e); } return(e); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { D.Assert(parameterType == null); IFuturePrototype futurePrototype = new ApplyPrototype(new VETileFetch(veStyle), new IFuturePrototype[] { new UnevaluatedTerm(TermName.TileAddress) }); futurePrototype = AddFeatures(futurePrototype, FutureFeatures.Cached & features, cachePackage); IFuturePrototype prototype = new ApplyPrototype(new VETileUpsamplerVerb(futurePrototype), new IFuturePrototype[] { new UnevaluatedTerm(TermName.TileAddress) }); return(AddFeatures(prototype, features, cachePackage)); }
public IFuture GetRenderedLegendFuture(IDisplayableSource displayableSource, FutureFeatures features) { RenderRegion renderRegion = this.latentRegionHolder.renderRegion; if (renderRegion == null) { throw new Legend.RenderFailedException("Region unavailable"); } renderRegion = renderRegion.Copy(new DirtyEvent()); MapRectangleParameter mapRectangleParameter = new MapRectangleParameter(renderRegion.GetBoundingBox()); Size outputSize = this.OutputSizeFromRenderRegion(renderRegion); IFuturePrototype imagePrototype = displayableSource.GetImagePrototype(new ImageParameterFromRawBounds(outputSize), features); return imagePrototype.Curry(new ParamDict(new object[] { TermName.ImageBounds, mapRectangleParameter })); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { D.Assert(parameterType == null); IFuturePrototype prototype = new ApplyPrototype(new RenderedTileFetch(namingScheme), new IFuturePrototype[] { new UnevaluatedTerm(TermName.TileAddress) }); return(VETileSource.AddFeatures(prototype, features & (FutureFeatures)(-3), cachePackage)); }
public IFuture GetOpenDocumentFuture(FutureFeatures features) { return this.unwarpedMapTileSource.GetOpenDocumentFuture(features); }
public IFuture GetOpenDocumentFuture(FutureFeatures features) { return(unwarpedMapTileSource.GetOpenDocumentFuture(features)); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { List <IFuturePrototype> list = new List <IFuturePrototype>(); list.Add(parameterType.GetSizeParameter()); foreach (SourceMap current in layer) { if (current.ReadyToLock()) { IDisplayableSource displayableSource = mapTileSourceFactory.CreateDisplayableWarpedSource(current); list.Add(displayableSource.GetImagePrototype(parameterType, features)); } } IFuturePrototype futurePrototype = new ApplyPrototype(new CompositeImageVerb(), list.ToArray()); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { futurePrototype = new DiskCachePrototype(mapTileSourceFactory.GetCachePackage().diskCache, futurePrototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { futurePrototype = new MemCachePrototype(mapTileSourceFactory.GetCachePackage().computeCache, futurePrototype); } return(futurePrototype); }
public IFuture GetImageBounds(FutureFeatures features) { IFuture future = new ApplyFuture(new WarpBoundsVerb(this.imageTransformer), new IFuture[] { this.unwarpedMapTileSource.GetImageBounds(features) }); future = new MemCacheFuture(this.cachePackage.boundsCache, future); return this.unwarpedMapTileSource.AddAsynchrony(future, features); }
internal IFuture AddAsynchrony(IFuture future, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { future = new MemCacheFuture(this.cachePackage.asyncCache, new OpenDocumentSensitivePrioritizedFuture(this.cachePackage.openDocumentPrioritizer, Asynchronizer.MakeFuture(this.cachePackage.computeAsyncScheduler, future), this.GetOpenDocumentFuture(FutureFeatures.MemoryCached))); } return future; }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { FutureFeatures features2 = features & (FutureFeatures)(-9); return this.underSource.GetImagePrototype(parameterType, features2); }
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 IFuture GetOpenDocumentFuture(FutureFeatures features) { return new FakeOpenDocumentFuture(); }
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 IFuture GetImageBounds(FutureFeatures features) { IFuture future = this.GetAccessFuture(AccessMethod.FetchBounds, FutureFeatures.Cached, new IFuture[0]); future = new MemCacheFuture(this.cachePackage.boundsCache, future); return this.AddAsynchrony(future, features); }
public IFuture GetOpenDocumentFuture(FutureFeatures features) { return(new FakeOpenDocumentFuture()); }
public override void Render() { throw FutureFeatures.InterpretedLanguageElements(); }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { if (parameterType == null) { parameterType = new ImageParameterFromTileAddress(this.GetDefaultCoordinateSystem()); } FutureFeatures openDocFeatures = FutureFeatures.Cached; IFuturePrototype accessPrototype = this.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(this.AddCaching(accessPrototype, FutureFeatures.Cached)); IFuturePrototype futurePrototype = new ApplyPrototype(verb, new IFuturePrototype[] { parameterType.GetBoundsParameter(), parameterType.GetSizeParameter(), new ConstantFuture(new BoolParameter(this.sourceMap.transparencyOptions.useDocumentTransparency)), new ConstantFuture(new BoolParameter(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.ExactColors))) }); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Transparency)) { IFuturePrototype futurePrototype2 = new ApplyPrototype(verb, new IFuturePrototype[] { parameterType.GetBoundsParameter(), parameterType.GetSizeParameter(), new ConstantFuture(new BoolParameter(this.sourceMap.transparencyOptions.useDocumentTransparency)), new ConstantFuture(new BoolParameter(true)) }); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { futurePrototype = this.AddCaching(futurePrototype, FutureFeatures.MemoryCached); futurePrototype2 = this.AddCaching(futurePrototype2, FutureFeatures.MemoryCached); } futurePrototype = new TransparencyPrototype(this.sourceMap.transparencyOptions, futurePrototype, futurePrototype2); } futurePrototype = this.AddCaching(futurePrototype, features); return this.AddAsynchrony(futurePrototype, features); }
public static bool HasFeature(FutureFeatures features, FutureFeatures query) { return (features & query) > FutureFeatures.Raw; }
public static bool HasFeature(FutureFeatures features, FutureFeatures query) { return((features & query) > FutureFeatures.Raw); }