libUEMF
A portable library for reading and writing WMF, EMF and EMF+ files
|
Macros | |
#define | U_BGR(r, g, b) rgbquad_set(r, g, b, 0) |
Set any BGR color with an {r,g,b} triplet. | |
#define | U_BGRA(r, g, b, a) rgbquad_set(r, g, b, a) |
Set any BGRA color with an {r,g,b,a} quad. | |
#define | U_WHITE U_BGR(255,255,255) |
Set BGR white. | |
#define | U_BLACK U_BGR(0,0,0) |
Set BGR black. | |
#define | U_BGRAGetR(rgb) (rgb.Red ) |
Color BGR Red. | |
#define | U_BGRAGetG(rgb) (rgb.Green ) |
Color BGR Green. | |
#define | U_BGRAGetB(rgb) (rgb.Blue ) |
Color BGR Blue. | |
#define | U_BGRAGetA(rgb) (rgb.Reserved) |
Color BGRA A/reserved. | |
#define | colorref_set colorref3_set |
Most frequent usage is 3 colors, so set the unqualified one to that. | |
#define | U_RGB(r, g, b) colorref3_set(r, g, b) |
Set any RGB color with an {r,g,b} triplet. | |
#define | U_RGBA(r, g, b, a) colorref4_set(r, g, b, a) |
Set any RGBA color with an {r,g,b,a} quad. | |
#define | U_RGBAGetR(rgb) (rgb.Red ) |
Color RGB Red. | |
#define | U_RGBAGetG(rgb) (rgb.Green ) |
Color RGB Green. | |
#define | U_RGBAGetB(rgb) (rgb.Blue ) |
Color RGB Blue. | |
#define | U_RGBAGetA(rgb) (rgb.Reserved) |
Color RGBA A/reserved. | |
#define | U_RGB2BGR(rgb) U_BGR(U_RGBAGetR(rgb),U_RGBAGetG(rgb),U_RGBAGetB(rgb)) |
Set any BGR color from an RGB color. | |
#define | U_BGR2RGB(rgb) U_RGB(U_BGRAGetR(rgb),U_BGRAGetG(rgb),U_BGRAGetB(rgb)) |
Set any RGB color from an BGR color. | |
#define | U_RGBA2BGRA(rgb) U_BGRA(U_RGBAGetR(rgb),U_RGBAGetG(rgb),U_RGBAGetB(rgb),U_RGBAGetA(rgb)} |
Set any BGRA color from an RGBA color. | |
#define | U_BGRA2RGBA(rgb) U_RGBA(U_BGRAGetR(rgb),U_BGRAGetG(rgb),U_BGRAGetB(rgb),U_BGRAGetA(rgb)} |
Set any RGBA color from an BGRA color. | |
#define | U_CMYK(c, m, y, k) ((COLOREF)((((uint8_t)(k)|((uint16_t)((uint8_t)(y))<<8))|(((uint32_t)(uint8_t)(m))<<16))|(((uint32_t)(uint8_t)(c))<<24))) \ |
Color CMYK Set Macro. | |
#define | U_GetKValue(cmyk) ((uint8_t) (cmyk) ) |
Color CMYK Get K Macro. | |
#define | U_GetYValue(cmyk) ((uint8_t) ((cymk) >> 8)) |
Color CMYK Get Y Macro. | |
#define | U_GetMValue(cmyk) ((uint8_t) ((cymk) >> 16)) |
Color CMYK Get M Macro. | |
#define | U_GetCValue(cmyk) ((uint8_t) ((cymk) >> 24)) |
Color CMYK Get C Macro. | |
#define | U_Gamma(A) (A < U_RGB_GAMMA_MIN ? U_RGB_GAMMA_MIN : (A > U_RGB_GAMMA_MAX ? U_RGB_GAMMA_MAX: A)) \ |
Gamma set Macro (enforce range). | |
#define | U_PM(A, B) ((A)<-(B)?-(B):((A)>(B)?(B):(A))) |
Plus/Minus Range Macro (B must be postitive!). | |
#define | U_MNMX(A, B, C) ((A)<(B)?(B):((A)>(C)?(C):(A))) |
Min/Max Range Macro (B <= A <= C). | |
#define | U_MIN(A, B) ((A)>(B)?(B):(A)) |
Minimum of A,B. | |
#define | U_MAX(A, B) ((A)>(B)?(A):(B)) |
Maximum of A,B. | |
#define | U_EMRTYPE(A) (((PU_EMR)A)->iType) |
Get iType from U_EMR* record. | |
#define | U_EMRSIZE(A) (((PU_EMR)A)->nSize) |
Get nSize from U_EMR* record. | |
#define | UP4(A) (4 * ((A + 3 ) / 4)) |
Round up to nearest multiple of 4. | |