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 }))); }
private Size OutputSizeFromRenderRegion(RenderRegion renderRegion) { MapRectangleParameter mapRectangleParameter = new MapRectangleParameter(renderRegion.GetBoundingBox()); return(mapRectangleParameter.value.SizeWithAspectRatio(this.renderedSize)); }
private Size OutputSizeFromRenderRegion(RenderRegion renderRegion) { MapRectangleParameter mapRectangleParameter = new MapRectangleParameter(renderRegion.GetBoundingBox()); return mapRectangleParameter.value.SizeWithAspectRatio(this.renderedSize); }