public Present Evaluate(Present[] paramList) { D.Assert(paramList.Length == 2); MapRectangle value = ((MapRectangleParameter)paramList[0]).value; Size value2 = ((SizeParameter)paramList[1]).value; MapRectangle mapRectangle = value.Transform(imageTransformer.getDestLatLonToSourceTransformer()) .GrowFraction(0.05); Present present = warpedBoundsFuture.Realize("WarpImageVerb.Evaluate-bounds"); if (present is BoundsPresent) { MapRectangle boundingBox = ((BoundsPresent)present).GetRenderRegion().GetBoundingBox(); if (!boundingBox.intersects(value)) { return(new BeyondImageBounds()); } } Present present2 = sourceMapSupplier.Curry(new ParamDict(new object[] { TermName.ImageBounds, new MapRectangleParameter(mapRectangle) })).Realize("WarpImageVerb.Evaluate"); if (present2 is PresentFailureCode) { return(present2); } ImageRef imageRef = (ImageRef)present2; GDIBigLockedImage gDIBigLockedImage = new GDIBigLockedImage(value2, "WarpImageVerb"); imageTransformer.doTransformImage(imageRef.image, mapRectangle, gDIBigLockedImage, value); imageRef.Dispose(); return(new ImageRef(new ImageRefCounted(gDIBigLockedImage))); }
internal IPointTransformer GetDestLatLonToSourceTransformer() { return(imageTransformer.getDestLatLonToSourceTransformer()); }