public void Bounds_Test()
        {
            PDFGraphicsPath target = new PDFGraphicsPath();

            Assert.IsTrue(target.Paths.Count == 1);
            Assert.IsTrue(target.HasCurrentPath);

            PDFPoint pos = new PDFPoint(10, 10);

            target.MoveTo(pos);

            PDFPoint end         = new PDFPoint(100, 100);
            PDFPoint handleStart = new PDFPoint(0, 50);
            PDFPoint handleEnd   = new PDFPoint(50, 100);

            target.CubicCurveForWithHandleEnd(end, handleEnd);

            end         = end.Offset(pos);
            handleEnd   = handleEnd.Offset(pos);
            handleStart = handleStart.Offset(pos);

            PDFRect bounds = target.Bounds;

            Assert.AreEqual(bounds.X, PDFUnit.Zero);
            Assert.AreEqual(bounds.Y, PDFUnit.Zero);
            Assert.AreEqual(bounds.Width, end.X);
            Assert.AreEqual(bounds.Height, end.Y);
        }
        public void CubicForWithHandleEnd_Test()
        {
            PDFGraphicsPath target = new PDFGraphicsPath();

            Assert.IsTrue(target.Paths.Count == 1);
            Assert.IsTrue(target.HasCurrentPath);

            PDFPoint pos = new PDFPoint(10, 10);

            target.MoveTo(pos);
            Assert.AreEqual(target.Cursor, pos);

            PDFPoint end         = new PDFPoint(100, 100);
            PDFPoint handleStart = new PDFPoint(0, 50);
            PDFPoint handleEnd   = new PDFPoint(50, 100);

            target.CubicCurveForWithHandleEnd(end, handleEnd);

            end         = end.Offset(pos);
            handleEnd   = handleEnd.Offset(pos);
            handleStart = handleStart.Offset(pos);

            Assert.AreEqual(target.Cursor, end);
            Assert.AreEqual(target.Paths[0].Operations.Count, 2);
            Assert.IsInstanceOfType(target.Paths[0].Operations[1], typeof(PathBezierCurveData));

            PathBezierCurveData data = (PathBezierCurveData)target.Paths[0].Operations[1];

            Assert.AreEqual(data.Points.Length, 3);
            Assert.IsFalse(data.HasStartHandle);
            Assert.IsTrue(data.HasEndHandle);
            Assert.AreEqual(data.EndPoint, end);
            Assert.AreEqual(data.StartHandle, PDFPoint.Empty);
            Assert.AreEqual(data.EndHandle, handleEnd);
        }