public static void DrawTextLayout(this ID2D1DeviceContext context, D2D_POINT_2F origin, IDWriteTextLayout layout, ID2D1Brush defaultFillBrush = null, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS.D2D1_DRAW_TEXT_OPTIONS_NONE) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (layout == null) { throw new ArgumentNullException(nameof(layout)); } context.DrawTextLayout(origin, layout, defaultFillBrush, options); }