示例#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 })));
        }
示例#2
0
文件: Legend.cs 项目: gabilic/Oplan
        private Size OutputSizeFromRenderRegion(RenderRegion renderRegion)
        {
            MapRectangleParameter mapRectangleParameter = new MapRectangleParameter(renderRegion.GetBoundingBox());

            return(mapRectangleParameter.value.SizeWithAspectRatio(this.renderedSize));
        }
示例#3
0
文件: Legend.cs 项目: mikhp/greatmaps
		private Size OutputSizeFromRenderRegion(RenderRegion renderRegion)
		{
			MapRectangleParameter mapRectangleParameter = new MapRectangleParameter(renderRegion.GetBoundingBox());
			return mapRectangleParameter.value.SizeWithAspectRatio(this.renderedSize);
		}