15 static IStream* CreateStreamFromMemory(
const BYTE* buffer,
size_t size);
101 int endR,
int endG,
int endB,
102 int startAlpha = 0,
int endAlpha = 0, BOOL directionVertical = TRUE,
103 const wstring& text = L
"",
int textR = 0,
int textG = 0,
int textB = 0);
Provides static methods for GDI+ initialization and image rendering.
Definition GraphicsContext.h:13
static void linearGradient(Graphics *g, Bounds rect, int startR, int startG, int startB, int endR, int endG, int endB, int startAlpha=0, int endAlpha=0, BOOL directionVertical=TRUE, const wstring &text=L"", int textR=0, int textG=0, int textB=0)
Fills a rect with a linear gradient colors.
static void terminateGdiPlus()
Terminates the GDI+ library and frees resources.
static void drawImageBytes(Graphics *g, Bounds rect, const BYTE *imageBytes, size_t size, const ImageAlignment &alignment=ImageAlignment::TOPCENTER, BOOL showBorder=FALSE)
Draws an image represented by a byte array onto a device context.
static Gdiplus::Image * imageResourceToImage(HINSTANCE hInst, int resourceID, const ImageType &imageType)
Loads a PNG, GIF, or JPG image using its resource ID from .rc file as a GDI+ Image object.
static Gdiplus::Image * imageFileToImage(const wstring &filePath)
Loads an image from a file path into a GDI+ Image object.
static Gdiplus::Image * imageBytesToImage(const BYTE *imageBytes, size_t size)
Loads an image from a byte array into a GDI+ Image object.
static void initGdiPlus()
Initializes the GDI+ library.
static void drawImageResource(Graphics *g, Bounds rect, int resourceID, const ImageType &imageType, const ImageAlignment &alignment=ImageAlignment::TOPCENTER, BOOL showBorder=FALSE)
Draws a GDI+ Image onto a device context.
static void drawImage(Graphics *g, Bounds rect, Gdiplus::Image *image, const ImageAlignment &alignment=ImageAlignment::TOPCENTER, BOOL showBorder=FALSE)
Draws a GDI+ Image onto a device context.
static void drawImageFile(Graphics *g, Bounds rect, const wstring &filePath, const ImageAlignment &alignment=ImageAlignment::TOPCENTER, BOOL showBorder=FALSE)
Draws an image loaded from a file onto a device context.