⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graphic.h

📁 A*寻路算法, 源代码中使用的SDL库
💻 H
字号:
#ifndef GRAPHIC_HEADER#define GRAPHIC_HEADER#include <stdio.h>#include <stdlib.h>#include <SDL/SDL.h>#include <time.h>#include "define.h"#include "grind.h"#include "struct.h"//graphic functions void draw_pixel(SDL_Surface *surface, int x, int y, SDL_Color s_color);void draw_line(SDL_Surface *surface, point p0, point p1, SDL_Color color);void draw_square(SDL_Surface *surface, point p, int lato, SDL_Color color);void draw_square(SDL_Surface *surface,SDL_Rect *rect , SDL_Color border_color, SDL_Color fill_color);void fill_square(SDL_Surface *surface, SDL_Rect *rect, SDL_Color fill_color);void colour_path(cell_ind path[], int num_cells, SDL_Surface *surface, SDL_Color border_color, SDL_Color fill_color);void decolour_path(cell_ind path[], int num_cells, SDL_Surface *surface, SDL_Color border_color, SDL_Color fill_color);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -