그래픽 & 멀티미디어
글 수 111
2009.02.10 19:27:02 (*.138.143.83)
28325
gxLib 사용하다보니 칼라값 사용하기가 어려움이 있어 칼라값을 미리 정의해 보았습니다.
헤더파일에 추가하면 어떨까요 ?
// 칼라값 정의 gx_color( red, green, blue )
#define CL_BLACK_ALPHA(a) gx_color( 0, 0, 0, (a) )
#define CL_MAROON_ALPHA(a) gx_color( 128, 0, 0, (a) )
#define CL_GREEN_ALPHA(a) gx_color( 0, 128, 0, (a) )
#define CL_OLIVE_ALPHA(a) gx_color( 128, 128, 0, (a) )
#define CL_NAVY_ALPHA(a) gx_color( 0, 0, 128, (a) )
#define CL_PURPLE_ALPHA(a) gx_color( 128, 0, 128, (a) )
#define CL_TEAL_ALPHA(a) gx_color( 0, 128, 128, (a) )
#define CL_GRAY_ALPHA(a) gx_color( 128, 128, 128, (a) )
#define CL_SILVER_ALPHA(a) gx_color( 192, 192, 192, (a) )
#define CL_RED_ALPHA(a) gx_color( 255, 0, 0, (a) )
#define CL_LIME_ALPHA(a) gx_color( 0, 255, 0, (a) )
#define CL_YELLOW_ALPHA(a) gx_color( 255, 255, 0, (a) )
#define CL_BLUE_ALPHA(a) gx_color( 0 , 0, 255, (a) )
#define CL_FUCHSIA_ALPHA(a) gx_color( 255, 0, 255, (a) )
#define CL_AQUA_ALPHA(a) gx_color( 0, 255, 255, (a) )
#define CL_WHITE_ALPHA(a) gx_color( 255, 255, 255, (a) )
#define CL_MONEYGREEN_ALPHA(a) gx_color( 192, 220, 192, (a) )
#define CL_SKYBLUE_ALPHA(a) gx_color( 166, 202, 240, (a) )
#define CL_CREAM_ALPHA(a) gx_color( 255, 251, 240, (a) )
#define CL_MEDGRAY_ALPHA(a) gx_color( 160, 160, 164, (a) )
#define CL_BLACK CL_BLACK_ALPHA(255)
#define CL_MAROON CL_MAROON_ALPHA(255)
#define CL_GREEN CL_GREEN_ALPHA(255)
#define CL_OLIVE CL_OLIVE_ALPHA(255)
#define CL_NAVY CL_NAVY_ALPHA(255)
#define CL_PURPLE CL_PURPLE_ALPHA(255)
#define CL_TEAL CL_TEAL_ALPHA(255)
#define CL_GRAY CL_GRAY_ALPHA(255)
#define CL_SILVER CL_SILVER_ALPHA(255)
#define CL_RED CL_RED_ALPHA(255)
#define CL_LIME CL_LIME_ALPHA(255)
#define CL_YELLOW CL_YELLOW_ALPHA(255)
#define CL_BLUE CL_BLUE_ALPHA(255)
#define CL_FUCHSIA CL_FUCHSIA_ALPHA(255)
#define CL_AQUA CL_AQUA_ALPHA(255)
#define CL_WHITE CL_WHITE_ALPHA(255)
#define CL_MONEYGREEN CL_MONEYGREEN_ALPHA(255)
#define CL_SKYBLUE CL_SKYBLUE_ALPHA(255)
#define CL_CREAM CL_CREAM_ALPHA(255)
#define CL_MEDGRAY CL_MEDGRAY_ALPHA(255)
헤더파일에 추가하면 어떨까요 ?
// 칼라값 정의 gx_color( red, green, blue )
#define CL_BLACK_ALPHA(a) gx_color( 0, 0, 0, (a) )
#define CL_MAROON_ALPHA(a) gx_color( 128, 0, 0, (a) )
#define CL_GREEN_ALPHA(a) gx_color( 0, 128, 0, (a) )
#define CL_OLIVE_ALPHA(a) gx_color( 128, 128, 0, (a) )
#define CL_NAVY_ALPHA(a) gx_color( 0, 0, 128, (a) )
#define CL_PURPLE_ALPHA(a) gx_color( 128, 0, 128, (a) )
#define CL_TEAL_ALPHA(a) gx_color( 0, 128, 128, (a) )
#define CL_GRAY_ALPHA(a) gx_color( 128, 128, 128, (a) )
#define CL_SILVER_ALPHA(a) gx_color( 192, 192, 192, (a) )
#define CL_RED_ALPHA(a) gx_color( 255, 0, 0, (a) )
#define CL_LIME_ALPHA(a) gx_color( 0, 255, 0, (a) )
#define CL_YELLOW_ALPHA(a) gx_color( 255, 255, 0, (a) )
#define CL_BLUE_ALPHA(a) gx_color( 0 , 0, 255, (a) )
#define CL_FUCHSIA_ALPHA(a) gx_color( 255, 0, 255, (a) )
#define CL_AQUA_ALPHA(a) gx_color( 0, 255, 255, (a) )
#define CL_WHITE_ALPHA(a) gx_color( 255, 255, 255, (a) )
#define CL_MONEYGREEN_ALPHA(a) gx_color( 192, 220, 192, (a) )
#define CL_SKYBLUE_ALPHA(a) gx_color( 166, 202, 240, (a) )
#define CL_CREAM_ALPHA(a) gx_color( 255, 251, 240, (a) )
#define CL_MEDGRAY_ALPHA(a) gx_color( 160, 160, 164, (a) )
#define CL_BLACK CL_BLACK_ALPHA(255)
#define CL_MAROON CL_MAROON_ALPHA(255)
#define CL_GREEN CL_GREEN_ALPHA(255)
#define CL_OLIVE CL_OLIVE_ALPHA(255)
#define CL_NAVY CL_NAVY_ALPHA(255)
#define CL_PURPLE CL_PURPLE_ALPHA(255)
#define CL_TEAL CL_TEAL_ALPHA(255)
#define CL_GRAY CL_GRAY_ALPHA(255)
#define CL_SILVER CL_SILVER_ALPHA(255)
#define CL_RED CL_RED_ALPHA(255)
#define CL_LIME CL_LIME_ALPHA(255)
#define CL_YELLOW CL_YELLOW_ALPHA(255)
#define CL_BLUE CL_BLUE_ALPHA(255)
#define CL_FUCHSIA CL_FUCHSIA_ALPHA(255)
#define CL_AQUA CL_AQUA_ALPHA(255)
#define CL_WHITE CL_WHITE_ALPHA(255)
#define CL_MONEYGREEN CL_MONEYGREEN_ALPHA(255)
#define CL_SKYBLUE CL_SKYBLUE_ALPHA(255)
#define CL_CREAM CL_CREAM_ALPHA(255)
#define CL_MEDGRAY CL_MEDGRAY_ALPHA(255)