コード例 #1
0
        public RectangleF GetPathBounds(PathF path)
        {
            var nativePath = path.NativePath as CGPath;

            if (nativePath == null)
            {
                nativePath      = path.ToCGPath();
                path.NativePath = nativePath;
            }

            var bounds = nativePath.PathBoundingBox;

            return(bounds.ToRectangleF());
        }