예제 #1
0
int Init_graphics(void)
{
    D_full_screen();


    SCREEN_TOP = R_screen_top();
    SCREEN_BOTTOM = R_screen_bot();
    SCREEN_LEFT = R_screen_left();
    SCREEN_RIGHT = R_screen_rite();

    R_standard_color(WHITE);

    VIEW_TITLE1 = makeview(97.5, 100.0, 0.0, 50.0);
    VIEW_TITLE2 = makeview(97.5, 100.0, 50.0, 100.0);
    VIEW_MAP1 = makeview(51.0, 97.5, 0.0, 50.0);
    VIEW_MAP2 = makeview(51.0, 97.5, 50.0, 100.0);
    VIEW_TITLE1_ZOOM = makeview(47.5, 51.0, 0.0, 50.0);
    VIEW_TITLE2_ZOOM = makeview(47.5, 51.0, 50.0, 100.0);
    VIEW_MAP1_ZOOM = makeview(2.5, 47.5, 0.0, 50.0);
    VIEW_MAP2_ZOOM = makeview(2.5, 47.5, 50.0, 100.0);
    VIEW_MENU = makeview(0.0, 2.5, 0.0, 100.0);

    G_init_colors(&VIEW_MAP1->cell.colors);
    G_init_colors(&VIEW_MAP2->cell.colors);

    return 0;
}
예제 #2
0
int Init_graphics(void)
{
    D_full_screen();


    SCREEN_TOP = R_screen_top();
    SCREEN_BOTTOM = R_screen_bot();
    SCREEN_LEFT = R_screen_left();
    SCREEN_RIGHT = R_screen_rite();


    BLACK = D_translate_color("black");
    BLUE = D_translate_color("blue");
    BROWN = D_translate_color("brown");
    GREEN = D_translate_color("green");
    GREY = D_translate_color("grey");
    ORANGE = D_translate_color("orange");
    PURPLE = D_translate_color("purple");
    RED = D_translate_color("red");
    WHITE = D_translate_color("white");
    YELLOW = D_translate_color("yellow");

    R_standard_color(WHITE);

    VIEW_TITLE1 = makeview(97.5, 100.0, 0.0, 50.0);
    VIEW_TITLE2 = makeview(97.5, 100.0, 50.0, 100.0);
    VIEW_MAP1 = makeview(51.0, 97.5, 0.0, 50.0);
    VIEW_MAP2 = makeview(51.0, 97.5, 50.0, 100.0);
    VIEW_TITLE1_ZOOM = makeview(47.5, 51.0, 0.0, 50.0);
    VIEW_TITLE2_ZOOM = makeview(47.5, 51.0, 50.0, 100.0);
    VIEW_MAP1_ZOOM = makeview(2.5, 47.5, 0.0, 50.0);
    VIEW_MAP2_ZOOM = makeview(2.5, 47.5, 50.0, 100.0);
    VIEW_MENU = makeview(0.0, 2.5, 0.0, 100.0);

    Rast_init_colors(&VIEW_MAP1->cell.colors);
    Rast_init_colors(&VIEW_MAP2->cell.colors);

    return 0;
}
예제 #3
0
파일: graphics.c 프로젝트: caomw/grass
int Init_graphics(void)
{
    R_font("romans");
    R_text_size(3 * NORMAL_TEXT_SIZE / 4, NORMAL_TEXT_SIZE);

    D_full_screen();

    SCREEN_TOP = R_screen_top();
    SCREEN_BOTTOM = R_screen_bot();
    SCREEN_LEFT = R_screen_left();
    SCREEN_RIGHT = R_screen_rite();


    BLACK = D_translate_color("black");
    BLUE = D_translate_color("blue");
    BROWN = D_translate_color("brown");
    GREEN = D_translate_color("green");
    GREY = D_translate_color("grey");
    ORANGE = D_translate_color("orange");
    PURPLE = D_translate_color("purple");
    RED = D_translate_color("red");
    WHITE = D_translate_color("white");
    YELLOW = D_translate_color("yellow");

    R_standard_color(BLACK);

    VIEW_TITLE1 = makeview(97.5, 100.0, 50.0, 100.0);
    VIEW_MAP1 = makeview(51.0, 97.5, 50.0, 100.0);
    VIEW_TITLE1_ZOOM = makeview(48.5, 51.0, 50.0, 100.0);
    VIEW_MAP1_ZOOM = makeview(2.5, 48.5, 50.0, 100.0);
    VIEW_MASK1 = makeview(51.0, 97.5, 50.0, 100.0);	/*same as map1 */
    VIEW_MENU = makeview(0.0, 2.5, 0.0, 100.0);
    VIEW_HISTO = makeview(2.5, 100.0, 0.0, 50.0);

    return 0;
}