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); }
public override bool Equals(object obj) { if (obj is ImageParameterFromTileAddress) { ImageParameterFromTileAddress imageParameterFromTileAddress = (ImageParameterFromTileAddress)obj; return(this.boundsParameter.Equals(imageParameterFromTileAddress.boundsParameter) && this.sizeParameter.Equals(imageParameterFromTileAddress.sizeParameter)); } return(false); }
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 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) { 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); }