コード例 #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);