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);
		}
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
		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);
		}
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        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));
        }
Esempio n. 6
0
		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);
		}
Esempio n. 7
0
        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));
        }
Esempio n. 8
0
        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;
		}
		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);
		}