Added implicit op for SystemColorIndex to HBRUSH

pull/348/head
David Hall 2022-11-16 21:37:13 -07:00
parent 19b4ef1fdf
commit db86377954
1 changed files with 5 additions and 0 deletions

View File

@ -205,6 +205,11 @@ public struct HBRUSH : IGraphicsObjectHandle
/// <returns>The result of the conversion.</returns>
public static implicit operator HBRUSH(HGDIOBJ h) => new((IntPtr)h);
/// <summary>Performs an implicit conversion from <see cref="SystemColorIndex"/> to <see cref="HBRUSH"/>.</summary>
/// <param name="i">The color index.</param>
/// <returns>The result of the conversion.</returns>
public static implicit operator HBRUSH(SystemColorIndex i) => new((IntPtr)i);
/// <summary>Implements the operator ! which returns <see langword="true"/> if the handle is invalid.</summary>
/// <param name="hMem">The <see cref="HBRUSH"/> instance.</param>
/// <returns>The result of the operator.</returns>