mk_color_to_abgrfunction
uint32_t mk_color_to_abgr(mk_color c)Perform the color to abgr operation.
| Parameter | Type | Description |
|---|---|---|
c | mk_color | Value for c. |
Returns The resulting value.
#include <modkit/types.h>1 functions · 4 structs · 2 enums · 6 typedefs · 12 macros
Core types and definitions for modkit.
mk_color_to_abgrfunctionuint32_t mk_color_to_abgr(mk_color c)Perform the color to abgr operation.
| Parameter | Type | Description |
|---|---|---|
c | mk_color | Value for c. |
Returns The resulting value.
mk_colorstructData for color.
| Field | Type | Description |
|---|---|---|
r | uint8_t | Red channel. |
g | uint8_t | Green channel. |
b | uint8_t | Blue channel. |
a | uint8_t | Alpha channel. |
mk_insetsstructData for insets.
| Field | Type | Description |
|---|---|---|
left | int32_t | Left inset. |
top | int32_t | Top inset. |
right | int32_t | Right inset. |
bottom | int32_t | Bottom inset. |
mk_rectstructData for rect.
| Field | Type | Description |
|---|---|---|
x | int32_t | Left coordinate. |
y | int32_t | Top coordinate. |
width | int32_t | Width. |
height | int32_t | Height. |
mk_rectfstructData for rectf.
| Field | Type | Description |
|---|---|---|
x | float | Left coordinate. |
y | float | Top coordinate. |
width | float | Width. |
height | float | Height. |
mk_color_space_tenumValues for color space.
| Value | Description |
|---|---|
MK_COLOR_SPACE_AUTO | Selects auto. |
MK_COLOR_SPACE_LINEAR | Selects linear. |
MK_COLOR_SPACE_SRGB | Selects srgb. |
mk_resultenumValues for result.
| Value | Description |
|---|---|
MK_SUCCESS | Selects success. |
MK_ERROR_INIT_FAILED | Selects error init failed. |
MK_ERROR_WINDOW_FAILED | Selects error window failed. |
MK_ERROR_RENDERER_FAILED | Selects error renderer failed. |
MK_ERROR_OUT_OF_MEMORY | Selects error out of memory. |
MK_ERROR_INVALID_ARGUMENT | Selects error invalid argument. |
MK_ERROR_VIEW_EXHAUSTED | Selects error view exhausted. |
MK_ERROR_NOT_INITIALIZED | Selects error not initialized. |
MK_ERROR_MATERIAL_TABLE_CAPACITY | Selects error material table capacity. |
MK_ERROR_UNSUPPORTED_PBR_VARIANT | Selects error unsupported PBR variant. |
MK_ERROR_VIEW_BUDGET | Selects error view budget. |
MK_ERROR_UNSUPPORTED | Selects error unsupported. |
MK_ERROR_INVALID_STATE | Selects error invalid state. |
MK_ERROR_RESOURCE_PENDING | Selects error resource pending. |
MK_ERROR_RESOURCE_CYCLE | Selects error resource cycle. |
MK_ERROR_RENDER_WORLD_CONFLICT | Selects error render world conflict. |
MK_ERROR_DRAW_BINDING_CAPACITY | Selects error draw binding capacity. |
MK_ERROR_DRAW_BINDING_CONFLICT | Selects error draw binding conflict. |
MK_ERROR_DRAW_BINDING_TYPE | Selects error draw binding type. |
MK_ERROR_PERMISSION_DENIED | Selects error permission denied. |
MK_ERROR_DEVICE_UNAVAILABLE | Selects error device unavailable. |
MK_ERROR_QUEUE_FULL | Selects error queue full. |
MK_ERROR_DECODE_FAILED | Selects error decode failed. |
MK_ERROR_IO | Selects error I/O. |
MK_ERROR_SHADER_COMPILE | Selects error shader compile. |
MK_ERROR_CANCELLED | Selects error cancelled. |
MK_ERROR_MESSAGE_TOO_LARGE | Selects error message too large. |
mk_colortypedeftypedef struct mk_color mk_colorData for color.
mk_color_space_ttypedeftypedef enum mk_color_space_t mk_color_space_tValues for color space.
mk_insetstypedeftypedef struct mk_insets mk_insetsData for insets.
mk_recttypedeftypedef struct mk_rect mk_rectData for rect.
mk_rectftypedeftypedef struct mk_rectf mk_rectfData for rectf.
mk_resulttypedeftypedef enum mk_result mk_resultValues for result.
MK_ABGRdefineMK_ABGR(r, g, b, a)Pack r,g,b,a (0-255) as 0xAABBGGRR bgfx vertex-color order.
MK_COLORdefineMK_COLOR(r, g, b, a)Constant for color.
MK_COLOR_BLACKdefineMK_COLOR_BLACKConstant for color black.
MK_COLOR_BLUEdefineMK_COLOR_BLUEConstant for color blue.
MK_COLOR_CORNFLOWER_BLUEdefineMK_COLOR_CORNFLOWER_BLUEConstant for color cornflower blue.
MK_COLOR_GREENdefineMK_COLOR_GREENConstant for color green.
MK_COLOR_REDdefineMK_COLOR_REDConstant for color red.
MK_COLOR_WHITEdefineMK_COLOR_WHITEConstant for color white.
MK_DEPRECATEDdefineMK_DEPRECATED(msg)Constant for deprecated.
MK_RGBdefineMK_RGB(r, g, b)Pack r,g,b (0-255) as 0xRRGGBBFF (opaque) modkit API color order.
MK_RGBAdefineMK_RGBA(r, g, b, a)Pack r,g,b,a (0-255) as 0xRRGGBBAA modkit API color order.
MODKIT_APIdefineMODKIT_APIConstant for modkit API.