Пример #1
0
        public static void FillEllipse(this ID2D1RenderTarget context, D2D1_ELLIPSE ellipse, ID2D1Brush brush)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (brush == null)
            {
                throw new ArgumentNullException(nameof(brush));
            }

            context.FillEllipse(ref ellipse, brush);
        }
Пример #2
0
        public static void DrawEllipse(this ID2D1RenderTarget context, D2D1_ELLIPSE ellipse, ID2D1Brush brush, float strokeWidth, ID2D1StrokeStyle strokeStyle = null)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (brush == null)
            {
                throw new ArgumentNullException(nameof(brush));
            }

            context.DrawEllipse(ref ellipse, brush, strokeWidth, strokeStyle);
        }
Пример #3
0
 public static void FillEllipse(this IComObject <ID2D1RenderTarget> context, D2D1_ELLIPSE ellipse, IComObject <ID2D1Brush> brush) => FillEllipse(context?.Object, ellipse, brush?.Object);
Пример #4
0
 public static void DrawEllipse(this IComObject <ID2D1RenderTarget> context, D2D1_ELLIPSE ellipse, IComObject <ID2D1Brush> brush, float strokeWidth, IComObject <ID2D1StrokeStyle> strokeStyle = null) => DrawEllipse(context?.Object, ellipse, brush?.Object, strokeWidth, strokeStyle?.Object);
Пример #5
0
        public static IComObject <ID2D1EllipseGeometry> CreateEllipseGeometry(this ID2D1Factory factory, D2D1_ELLIPSE ellipse)
        {
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            factory.CreateEllipseGeometry(ref ellipse, out var geometry).ThrowOnError();
            return(new ComObject <ID2D1EllipseGeometry>(geometry));
        }
Пример #6
0
 public static IComObject <ID2D1EllipseGeometry> CreateEllipseGeometry(this IComObject <ID2D1Factory> factory, D2D1_ELLIPSE ellipse) => CreateEllipseGeometry(factory?.Object, ellipse);