Exemple #1
0
        public static IComObject <T> CreateStrokeStyle <T>(this ID2D1Factory factory, D2D1_STROKE_STYLE_PROPERTIES properties, IEnumerable <float> dashes = null) where T : ID2D1StrokeStyle
        {
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            factory.CreateStrokeStyle(ref properties, dashes?.ToArray(), (dashes?.Count()).GetValueOrDefault(), out var style).ThrowOnError();
            return(new ComObject <T>((T)style));
        }
Exemple #2
0
 public static IComObject <T> CreateStrokeStyle <T>(this IComObject <ID2D1Factory> factory, D2D1_STROKE_STYLE_PROPERTIES properties, IEnumerable <float> dashes            = null) where T : ID2D1StrokeStyle => CreateStrokeStyle <T>(factory?.Object, properties, dashes);