Beispiel #1
0
        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 })));
        }