uLib  User mode C/C++ extended API library for Win32 programmers.
GdiUtil.cpp File Reference
#include <uLib/Common.h>
#include <uLib/UtilFunc.h>
#include <uLib/Debug.h>
#include <uLib/StrFunc.h>

Go to the source code of this file.

Macros

#define USE_GRADIENTCOLOR_ASM   1
 
#define USE_SCALECOLOR_ASM   0
 

Functions

HFONT WINAPI CreateFontEx (CSTR Typeface, int Points, int Weight, DWORD Charset, DWORD Quality)
 
int WINAPI FontHeight (HDC hdc, int Points)
 
int WINAPI ScreenFontHeight (WORD Points)
 
HFONT WINAPI GetWndFont (HWND hWnd, LOGFONT *pLogFont)
 
POINT WINAPI WhereXY (HDC dc)
 
HDC WINAPI ReleaseWndDC (HDC dc)
 
HDC WINAPI GetDesktopDC ()
 
void WINAPI ReleaseDesktopDC (HDC hDeskDC)
 
HDC WINAPI CreateMemoryDC (UINT cx, UINT cy, HBITMAP *pOldBmp)
 
HBITMAP WINAPI DeleteMemoryDC (HDC hMemDC, HBITMAP oldBmp)
 
void WINAPI GetScreenLPI (PPOINT pLpi)
 
HBITMAP WINAPI CreateIconBitmap (HICON hIcon, HBRUSH hbrBkg, UINT cx, UINT cy)
 
HBITMAP WINAPI CreateMaskBitmap (HBITMAP img, COLORREF transp)
 
HBITMAP WINAPI CreateAntialiasedBitmap (UINT cx, UINT cy, UINT mu, PFnPaintBitmap PaintBitmap, PVOID Ctx)
 
HGDIOBJ WINAPI DeleteObjectEx (HGDIOBJ hObj)
 
HGDIOBJ WINAPI GetCurrentObjectEx (HDC hdc, UINT ObjType, PVOID pObjData)
 
bool WINAPI DrawMaskedBitmap (HDC hdc, int x, int y, HBITMAP hBmp, HBITMAP hMask)
 
bool WINAPI DrawTransparentBitmap (HDC hdc, int x, int y, int w, int h, HBITMAP hBmp, COLORREF cTrans)
 
void WINAPI DrawBitmap (HDC hdc, int x, int y, HBITMAP hBmp)
 
void WINAPI DrawBitmapEx (HDC hdc, int x, int y, int cx, int cy, HBITMAP hBmp, int imx, int imy, int imw, int imh, DWORD rasterOp)
 
void WINAPI DrawGradientRect (HDC hdc, PRECT pRc, COLORREF c1, COLORREF c2, UINT opt)
 
void WINAPI SetTriVertex (PTRIVERTEX pVtx, int x, int y, COLORREF cr, BYTE Alpha)
 
void WINAPI SetTriMesh (PGRADIENT_TRIANGLE pTri, UINT Vtx1, UINT Vtx2, UINT Vtx3)
 
void WINAPI SetRectMesh (PGRADIENT_RECT pRect, UINT TopLeft, UINT BotRight)
 
void WINAPI SetRedraw (HWND hwnd, bool on)
 
void WINAPI Line (HDC hdc, int x1, int y1, int x2, int y2)
 
void WINAPI GetIsoTriangleVertices (POINT *Vtx, int xOrg, int yOrg, int Radius, double Orientation)
 
void WINAPI DrawIsoTriangle (HDC hdc, int xOrg, int yOrg, int Radius, double Orientation)
 
COLORREF WINAPI ScaleColorRef (COLORREF color, BYTE mul, BYTE div)
 
COLORREF WINAPI GrayScaleColor (COLORREF rgb)
 
int WINAPI MapRegionToWindow (HRGN hRgn, HWND hWnd)
 
RGNDATA *WINAPI AllocAndGetRegionData (HRGN hRgn, RECT **ppRc)
 
RGNDATA *WINAPI FreeRegionData (RGNDATA *pRgn)
 
void WINAPI DumpRegionData (CSTR Title, HRGN hRgn)
 
bool WINAPI GetGdiPathData (HDC hdc, OUT PGdiPathData pData)
 
void WINAPI FreeGdiPathData (PGdiPathData pData)
 
bool WINAPI GetGdiPathBounds (HDC hdc, PRECT pBounds)
 
HRGN WINAPI GetGdiPathRgn (HDC hdc, OUT RGNDATA **pRgnData, OPTOUT RECT **pRgnRects)
 
HRGN WINAPI GetGdiPathRgnBounds (HDC hdc, OUT PRECT pBounds)
 
void OffsetPoints (POINT *Pts, UINT nPts, int dx, int dy)
 
void OffsetRgnData (PRGNDATA prd, int dx, int dy)
 
void SetIdentityMat2 (MAT2 *pm)
 

Macro Definition Documentation

◆ USE_GRADIENTCOLOR_ASM

#define USE_GRADIENTCOLOR_ASM   1

Definition at line 17 of file GdiUtil.cpp.

◆ USE_SCALECOLOR_ASM

#define USE_SCALECOLOR_ASM   0

Definition at line 18 of file GdiUtil.cpp.

Function Documentation

◆ GetWndFont()

HFONT WINAPI GetWndFont ( HWND  hWnd,
LOGFONT *  pLogFont 
)

Definition at line 66 of file GdiUtil.cpp.

◆ CreateMemoryDC()

HDC WINAPI CreateMemoryDC ( UINT  cx,
UINT  cy,
HBITMAP *  pOldBmp 
)

Definition at line 109 of file GdiUtil.cpp.

◆ DeleteMemoryDC()

HBITMAP WINAPI DeleteMemoryDC ( HDC  hMemDC,
HBITMAP  oldBmp 
)

Definition at line 126 of file GdiUtil.cpp.

◆ AllocAndGetRegionData()

RGNDATA* WINAPI AllocAndGetRegionData ( HRGN  hRgn,
RECT **  ppRc 
)

Definition at line 617 of file GdiUtil.cpp.

◆ GetGdiPathRgnBounds()

HRGN WINAPI GetGdiPathRgnBounds ( HDC  hdc,
OUT PRECT  pBounds 
)

Definition at line 743 of file GdiUtil.cpp.