ImmutableBoundable.cs 382 Bytes
Newer Older
Dan Backes's avatar
Dan Backes committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System.Drawing;

namespace Svg
{
    internal sealed class ImmutableBoundable : ISvgBoundable
    {
        private readonly RectangleF bounds;

        public ImmutableBoundable(ISvgBoundable boundable)
        {
            bounds = boundable.CalculateBounds();
        }

        public RectangleF CalculateBounds()
        {
            return bounds;
        }
    }
}