그래픽 라이브러리 - gxLib
글 수 28
설명
Device Context를 깨끗하게 청소할 때 사용합니다. 인수로 지정한 칼라로 Device Context 내용을 모두 칠합니다.
| 헤더 | gx.h | |||||||
| 형태 | void gx_clear( dc_t *dc, color_t color) | |||||||
| 인수 |
| |||||||
| 반환 |
| |||||||
예제
#include <stdio.h>
#include <gx.h>
#include <gxbdf.h>
int main( void)
{
dc_t *dc_screen; // 화면 Device Context
if ( gx_init( "/dev/fb")) // gxLib 초기화
gx_print_error( ""); // 실행 중 에러 내용을 출력
else
{
if ( !( dc_screen = gx_get_screen_dc())) // 화면 출력을 위한 스크린 DC 구함
gx_print_error( ""); // 실행 중 에러 내용을 출력
else
{
if ( gx_set_font( "gulim.bdf")) // 폰트 설정
gx_print_error("gulim.bdf");
else
{
gx_clear( dc_screen, gx_color( 0, 0, 0, 255));
dc_screen->pen_color = gx_color( 255, 255, 255, 255);
gx_text_out( dc_screen, 20 , 40, "안녕하세요. FALINUX 포럼 입니다.");
}
gx_release_dc( dc_screen);
}
gx_close();
}
return 0;
}
지정된 좌표로 문자열이 출력됩니다.




clear 시에 특정 (x1, y1) (x2, y2) 의 값을 주어서
특정 영역만 clear 하려면 ... 어떻게 구현 해야 할까요 ?