diff options
author | Joursoir <chat@joursoir.net> | 2022-05-03 22:32:18 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-05-03 22:40:32 +0300 |
commit | b64358b2306e1599f240a749dc0c5cc96694e25b (patch) | |
tree | 2f2ca45f5692bfbeeeea61eb0eec55d9b3a72e61 /UefiMonitorTest/Graphics.h | |
parent | f7cabfc989d37d595f7d809090b51b7616c590e3 (diff) | |
download | umt-b64358b2306e1599f240a749dc0c5cc96694e25b.tar.gz umt-b64358b2306e1599f240a749dc0c5cc96694e25b.tar.bz2 umt-b64358b2306e1599f240a749dc0c5cc96694e25b.zip |
graphics: improve interaction with icolor and ucolor
Diffstat (limited to 'UefiMonitorTest/Graphics.h')
-rw-r--r-- | UefiMonitorTest/Graphics.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/UefiMonitorTest/Graphics.h b/UefiMonitorTest/Graphics.h index d822e0e..37484b0 100644 --- a/UefiMonitorTest/Graphics.h +++ b/UefiMonitorTest/Graphics.h @@ -7,6 +7,8 @@ #include <Protocol/SimpleTextIn.h> #include <Protocol/SimplePointer.h> +#define GET_UCOLOR(Color) (*(UINT32 *)Color) + #define PUT_PUXEL(Graphics, X, Y, Icolor) \ Graphics->BackBuffer[X + (Y * Graphics->Pitch)] = Icolor @@ -113,6 +115,22 @@ ForgetGraphicsInfo ( ); /** + Get a color that doesn't depend on pixel format, i.e. + independent color. + + @param[in] Graphics A graphics context. + @param[in] Ucolor A GRAPHICS_PIXEL_COLOR, which is + represented as unsigned 32-bit. + + @retval UINT32 A color in independent format. +**/ +UINT32 +GetIcolor ( + IN GRAPHICS_CONTEXT *Graphics, + IN UINT32 Ucolor + ); + +/** Draw a line using Bresenham's algorithm @retval VOID |