Example #1
0
        /// <summary>
        /// Returns the axis-aligned bounding rectangle when stroked with a pen, after applying
        /// the supplied transform (if non-null).
        /// </summary>
        internal virtual Rect GetBoundsInternal(Pen pen, Matrix matrix, double tolerance, ToleranceType type)
        {
            if (IsObviouslyEmpty())
            {
                return(Rect.Empty);
            }

            PathGeometryData pathData = GetPathGeometryData();

            return(PathGeometry.GetPathBounds(
                       pathData,
                       pen,
                       matrix,
                       tolerance,
                       type,
                       true)); /* skip hollows */
        }