• Dan Backes's avatar
    Performance Improvement · 1b8cb43f
    Dan Backes authored
    - Because querying the Bounds property of an ISvgBoundable or
      SvgVisualElement is expensive, we introduced an ImmutableBoundable that
      is used by the SvgRenderer. This class stores the bounds of the supplied
      ISvgBoundable so that multiple queries for the bounds do not hamper
      performance when rendering.
    
    - Converted the Bounds property on ISvgBoundable and SvgVisualElement to a
      CalculateBounds method to indicate that it is an expensive operation
      that returns a new value each time it is called.
    
    - Removed redundant ISvgBoundable Location and Size properties.
    
    - Fixed a bug in SvgFragment.Path property by converting it to a method that
      indicates it returns a new GraphicsPath instance when called and by
      disposing of that instance in CalculateBounds. There are many more
      instances of GraphicsPath not being disposed in the code base but we did
      not address that here.
    1b8cb43f