示例#1
0
        public static void FillRoundedRectangle(this ID2D1RenderTarget context, D2D1_ROUNDED_RECT roundedRect, ID2D1Brush brush)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

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

            context.FillRoundedRectangle(ref roundedRect, brush);
        }
示例#2
0
        public static void DrawRoundedRectangle(this ID2D1RenderTarget context, D2D1_ROUNDED_RECT roundedRect, ID2D1Brush brush, float strokeWidth, ID2D1StrokeStyle strokeStyle = null)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

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

            context.DrawRoundedRectangle(ref roundedRect, brush, strokeWidth, strokeStyle);
        }
示例#3
0
 public static void FillRoundedRectangle(this IComObject <ID2D1RenderTarget> context, D2D1_ROUNDED_RECT roundedRect, IComObject <ID2D1Brush> brush) => FillRoundedRectangle(context?.Object, roundedRect, brush?.Object);
示例#4
0
 public static void DrawRoundedRectangle(this IComObject <ID2D1RenderTarget> context, D2D1_ROUNDED_RECT roundedRect, IComObject <ID2D1Brush> brush, float strokeWidth, IComObject <ID2D1StrokeStyle> strokeStyle = null) => DrawRoundedRectangle(context?.Object, roundedRect, brush?.Object, strokeWidth, strokeStyle?.Object);
示例#5
0
        public static IComObject <ID2D1RoundedRectangleGeometry> CreateRoundedRectangleGeometry(this ID2D1Factory factory, D2D1_ROUNDED_RECT rectangle)
        {
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            factory.CreateRoundedRectangleGeometry(ref rectangle, out var geometry).ThrowOnError();
            return(new ComObject <ID2D1RoundedRectangleGeometry>(geometry));
        }
示例#6
0
 public static IComObject <ID2D1RoundedRectangleGeometry> CreateRoundedRectangleGeometry(this IComObject <ID2D1Factory> factory, D2D1_ROUNDED_RECT rectangle) => CreateRoundedRectangleGeometry(factory?.Object, rectangle);