├── .head
├── 1.png
├── 2.png
├── colors.xpm
└── imgs.xpm
├── SRC_IMG
└── Screen Shot 2023-01-25 at 7.48.16 PM.png
├── inc
├── src.h
├── events.h
├── lib.h
├── tools.h
├── structs.h
├── Editor.h
└── KeyMap.h
├── events
├── KeyOnRelease.c
├── events.c
├── MouseOnRelease.c
├── KeyPress.c
├── Rendring.c
├── MouseMove.c
└── MouseOnClick.c
├── Makefile
├── LICENSE
├── README.md
├── colors
└── get_colors.c
├── lib
└── rectangle.c
├── src
└── CanvasClick.c
├── tools
├── BrushAndBucket.c
└── img_list.c
└── main.c
/.head/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ael-bekk/rPainter/HEAD/.head/1.png
--------------------------------------------------------------------------------
/.head/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ael-bekk/rPainter/HEAD/.head/2.png
--------------------------------------------------------------------------------
/SRC_IMG/Screen Shot 2023-01-25 at 7.48.16 PM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ael-bekk/rPainter/HEAD/SRC_IMG/Screen Shot 2023-01-25 at 7.48.16 PM.png
--------------------------------------------------------------------------------
/inc/src.h:
--------------------------------------------------------------------------------
1 | #ifndef __SRC_H__
2 | #define __SRC_H__
3 |
4 | void CanvasRightClick();
5 | void CanvasLeftClick();
6 | void CanvasScrollUp();
7 | void CanvasScrollDown();
8 | void CanvasMidClick();
9 |
10 | #endif
--------------------------------------------------------------------------------
/events/KeyOnRelease.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | int KeyOnRelease(int key, void *param)
4 | {
5 | (void)param;
6 |
7 | switch(key) {
8 |
9 | case KEY_CNTRL:
10 | keys.cntrl = 0;
11 | break;
12 |
13 | default:
14 | break;
15 | }
16 | return (0);
17 | }
--------------------------------------------------------------------------------
/events/events.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | int OnHover(int x, int y, int w, int h) {
4 |
5 | return (mouse.x >= x && mouse.x <= w && mouse.y >= y && mouse.y <= h);
6 | }
7 |
8 | int OnClick(int x, int y, int w, int h) {
9 |
10 | return (mouse_OnClick.x >= x && mouse_OnClick.x <= w && mouse_OnClick.y >= y && mouse_OnClick.y <= h && mouse_OnClick.event);
11 | }
--------------------------------------------------------------------------------
/inc/events.h:
--------------------------------------------------------------------------------
1 | #ifndef __EVENTS_H__
2 | #define __EVENTS_H__
3 |
4 | int OnHover(int x, int y, int w, int h);
5 | int OnClick(int x, int y, int w, int h);
6 | int CloseWin(void *param);
7 | int KeyPress(int key, void *param);
8 | int KeyOnRelease(int key, void *param);
9 | int MouseOnClick(int button, int x, int y, void *param);
10 | int MouseOnRelease(int button, int x, int y, void *param);
11 | int MouseMove(int x, int y, void *param);
12 | int rendering(void *param);
13 |
14 | #endif
--------------------------------------------------------------------------------
/events/MouseOnRelease.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | int MouseOnRelease(int button, int x, int y, void *param)
4 | {
5 | (void)param;
6 | (void)button;
7 | (void)x;
8 | (void)y;
9 | (button == 1) && (screen_info.middle_OnClick = FALSE);
10 | (button == 1) && (screen_info.bare_OnClick = FALSE);
11 | (button == 1) && (rgb.r_OnClick = FALSE);
12 | (button == 1) && (rgb.g_OnClick = FALSE);
13 | (button == 1) && (rgb.b_OnClick = FALSE);
14 | (button == 1) && (rgb.shade_OnClick = FALSE);
15 | (button == 1) && (mouse_OnClick.event = FALSE);
16 | (button == 1) && (screen_info.canvas_OnClick = FALSE);
17 | return (0);
18 | }
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | NAME = rPainter
2 |
3 | SRCS = main.c \
4 | lib/rectangle.c \
5 | events/Rendring.c events/KeyOnRelease.c events/KeyPress.c events/MouseMove.c events/MouseOnClick.c events/MouseOnRelease.c events/events.c \
6 | colors/get_colors.c \
7 | tools/img_list.c tools/BrushAndBucket.c \
8 | src/CanvasClick.c
9 |
10 |
11 | FLGS = gcc
12 |
13 | RM = rm -f
14 |
15 | all: $(NAME) $(SRCS)
16 |
17 | $(NAME): $(SRCS)
18 | @$(FLGS) -lmlx -framework OpenGL -framework AppKit $(SRCS) -o $(NAME) -fsanitize=address -g
19 | @echo "\033[0;32mrPainter is ready"
20 |
21 | clean:
22 | @$(RM) $(NAME)
23 |
24 | fclean: clean
25 |
26 | re: fclean all
27 |
28 | .PHONY: all clean fclean re
--------------------------------------------------------------------------------
/events/KeyPress.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | int KeyPress(int key, void *param)
4 | {
5 | (void)param;
6 |
7 | switch(key) {
8 |
9 | case KEY_ESC:
10 | exit(0);
11 | break;
12 |
13 | case KEY_G:
14 | keys.g = !keys.g;
15 | break;
16 |
17 | case KEY_B:
18 | keys.f = 0;
19 | keys.b = 1;
20 | break;
21 |
22 | case KEY_F:
23 | keys.b = 0;
24 | keys.f = 1;
25 | break;
26 |
27 | case KEY_CNTRL:
28 | keys.cntrl = 1;
29 | break;
30 |
31 | default:
32 | break;
33 | }
34 | return (0);
35 | }
--------------------------------------------------------------------------------
/inc/lib.h:
--------------------------------------------------------------------------------
1 | #ifndef __LIB_H__
2 | #define __LIB_H__
3 |
4 | #include "structs.h"
5 |
6 | void draw_rect(t_img *img, int x, int y, int width, int height, unsigned int color);
7 | void draw_rect_gradient(t_img *img, int x, int y, int width, int height, int color);
8 | void draw_border(t_img *img, int x, int y, int width, int height, int boarder, int boarder_size);
9 | void draw_rect_bordered(int x, int y, int w, int h, int color, int max_colored_x, int boarder, int boarder_size);
10 | void draw_rect_bordered_in(int x, int y, int w, int h, int color, int max_colored_x, int boarder, int boarder_size);
11 | void draw_rect_bordered_gradient(int x, int y, int w, int h, int color, int max_colored_x, int boarder, int boarder_size);
12 |
13 | #endif
--------------------------------------------------------------------------------
/inc/tools.h:
--------------------------------------------------------------------------------
1 | #ifndef __TOOLS_H__
2 | #define __TOOLS_H__
3 |
4 | // ------------------------ img_list.c ------------------------
5 | t_img *new_img(void *mlx, char *path_img, int width, int height);
6 | void push_back(t_imgs **head, t_img *img);
7 | int lst_img_size(t_imgs *tmp);
8 | int already_in_list(char *d);
9 | void clear_list();
10 | void color_to_img(t_img *img, unsigned int color, int width, int height);
11 | void draw_img(t_img *img, int x, int y, int w, int h, t_img *img_to_draw);
12 |
13 | // ------------------------ BrushAndBucket.c ------------------------
14 | void draw_brush_rect(t_img *img, int x, int y, int width, int height);
15 | void draw_brush_border(t_img *img, int x, int y, int width, int height, int boarder, int boarder_size);
16 | void brush_border();
17 | void bucket_tool(int x, int y, int color, t_img *img);
18 | void brush_tool(int x, int y, int color);
19 |
20 | #endif
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 abdellah el bekkali
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # rPainter
2 |
3 | The goal of ``rPainter`` is to make *something* with the pixels.
4 |
5 | ### First of all:
6 |
7 | This project is written in ``c`` using ``mini-libx`` Library,
8 | This old library has a little builtin-funcs that's can make my project show on the graphics
9 |
10 | ## Preview 1
11 |
12 |
13 |
14 | ## Commands
15 |
16 | | KEY | Action |
17 | | ------------- |:-------------:|
18 | | `SCROLL UP` | zoom in |
19 | | `SCROLL DOWN` | zoum out |
20 | | `CNTRL+SCROLL UP` | increase brush size |
21 | | `CNTRL+SCROLL DOWN` | decrease brush size |
22 | | `CNTRL+MOUSE RIGHT CLICK` | displacement |
23 | | `F` | change from brush to flood |
24 | | `B` | change from flood to brush |
25 |
26 | ## Run Programe:
27 |
28 | _ if you'ar a 42-student :
29 |
30 | ```
31 | cd /Users/$USER/goinfre ; git clone https://github.com/ael-bekk/rPainter.git
32 | cd rPainter ; make ; ./Editor
33 | ```
34 |
35 | _ if not :
36 |
37 | ```
38 | git clone https://github.com/ael-bekk/rPainter.git
39 | cd rPainter ; make ; ./Editor
40 | ```
41 |
42 | ## 📝 License
43 |
44 | This project is licensed under the MIT - see the [LICENSE](LICENSE) file for details.
45 |
46 | ---
47 |
--------------------------------------------------------------------------------
/events/Rendring.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | int rendering(void *param)
4 | {
5 | (void)param;
6 |
7 | if (!(img_count++ % 10)) {
8 |
9 | if (CAN_MV_MID(screen_info.middle_OnClick, (screen_info.middle_x + screen_info.new_middle_x) / 2)) {
10 |
11 | int size = lst_img_size(img);
12 | screen_info.scroll_bare_size = (WIN_HEIGHT - screen_info.middle_y) - ((size / ((screen_info.middle_x - 10) / 110)) + !!(size % ((screen_info.middle_x - 10) / 110))) * 110 + (WIN_HEIGHT - screen_info.middle_y) - 40;
13 | if (screen_info.scroll_bare_size > WIN_HEIGHT - screen_info.middle_y - screen_info.right_down_corner_y)
14 | screen_info.scroll_bare_size = WIN_HEIGHT - screen_info.middle_y - screen_info.right_down_corner_y - 10;
15 | screen_info.right_down_corner_y -= 20 * (screen_info.right_down_corner_y >= 20);
16 | (screen_info.middle_x = (screen_info.middle_x + screen_info.new_middle_x) / 2);
17 | }
18 | display_map();
19 | }
20 |
21 | if (img_count > 1000)
22 | {
23 | // read imgs
24 | search_in_dir();
25 | // resize bare
26 | {
27 | int size = lst_img_size(img);
28 | screen_info.scroll_bare_size = (WIN_HEIGHT - screen_info.middle_y) - ((size / ((screen_info.middle_x - 10) / 110)) + !!(size % ((screen_info.middle_x - 10) / 110))) * 110 + (WIN_HEIGHT - screen_info.middle_y) - 40;
29 | if (screen_info.scroll_bare_size > WIN_HEIGHT - screen_info.middle_y - screen_info.right_down_corner_y)
30 | screen_info.scroll_bare_size = WIN_HEIGHT - screen_info.middle_y - screen_info.right_down_corner_y - 10;
31 | }
32 | img_count = 0;
33 | }
34 | return (0);
35 | }
--------------------------------------------------------------------------------
/colors/get_colors.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | // get the address of a pixel
4 | unsigned int *get_pixel(t_img *img, int x, int y)
5 | {
6 | return ((unsigned int *)(img->data + (y * img->size_line + x * (img->bpp / 8))));
7 | }
8 |
9 | // full color gradient
10 | int color_gradient(float width, float x, int color) {
11 |
12 | int grade = x * (511.0 / width) - 256;
13 |
14 | int _r = ((color >> 16) & 0xff) + grade;
15 | int _g = ((color >> 8) & 0xff) + grade;
16 | int _b = (color & 0xff) + grade;
17 | _r < 0 && (_r = 0);
18 | _g < 0 && (_g = 0);
19 | _b < 0 && (_b = 0);
20 | _r > 255 && (_r = 255);
21 | _g > 255 && (_g = 255);
22 | _b > 255 && (_b = 255);
23 | return (_r << 16 | _g << 8 | _b);
24 | }
25 |
26 | int base_color() {
27 |
28 | int _r = rgb.r;
29 | int _g = rgb.g;
30 | int _b = rgb.b;
31 | _r < 0 && (_r = 0);
32 | _g < 0 && (_g = 0);
33 | _b < 0 && (_b = 0);
34 | _r > 255 && (_r = 255);
35 | _g > 255 && (_g = 255);
36 | _b > 255 && (_b = 255);
37 | return (_r << 16 | _g << 8 | _b);
38 | }
39 |
40 | int full_color() {
41 |
42 | int _r = rgb.r + rgb.shade - 256;
43 | int _g = rgb.g + rgb.shade - 256;
44 | int _b = rgb.b + rgb.shade - 256;
45 | _r < 0 && (_r = 0);
46 | _g < 0 && (_g = 0);
47 | _b < 0 && (_b = 0);
48 | _r > 255 && (_r = 255);
49 | _g > 255 && (_g = 255);
50 | _b > 255 && (_b = 255);
51 | return (_r << 16 | _g << 8 | _b);
52 | }
53 |
54 | int rgb_setter(int x)
55 | {
56 | int _size = WIN_WIDTH - screen_info.middle_x / 2 - 100;
57 | if (x < _size)
58 | return 0;
59 | else if (x > _size + 200)
60 | return 255;
61 | else
62 | return (float)(x - _size) * 255.0 / 200.0;
63 | }
64 |
65 | int shade_setter(int x)
66 | {
67 | int _size = WIN_WIDTH - screen_info.middle_x / 2 - 100;
68 | if (x < _size)
69 | return 0;
70 | else if (x > _size + 200)
71 | return 511;
72 | else
73 | return (float)(x - _size) * 511.0 / 200.0;
74 | }
--------------------------------------------------------------------------------
/lib/rectangle.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | // draw rectangle
4 | void draw_rect(t_img *img, int x, int y, int width, int height, unsigned int color) {
5 |
6 | for (int _y = y; _y < height && _y < WIN_HEIGHT; _y++)
7 | for (int _x = x; _x < width && _x < WIN_WIDTH; _x++)
8 | if (_x >= 0 && _y >= 0)
9 | *get_pixel(img, _x, _y) = color;
10 | }
11 |
12 | // draw rectangle gradient
13 | void draw_rect_gradient(t_img *img, int x, int y, int width, int height, int color) {
14 |
15 | for (int _y = y; _y < height; _y++)
16 | for (int _x = x; _x < width; _x++)
17 | *get_pixel(img, _x, _y) = color_gradient(width - x, _x - x, color);
18 | }
19 |
20 | // draw boarder
21 | void draw_border(t_img *img, int x, int y, int width, int height, int boarder, int boarder_size) {
22 |
23 | draw_rect(img, x, y - boarder_size, width, y, boarder); // up boarder
24 | draw_rect(img, x, height, width, height + boarder_size, boarder); // down boarder
25 | draw_rect(img, x - boarder_size, y - boarder_size, x, height + boarder_size, boarder); // left boarder
26 | draw_rect(img, width, y - boarder_size, width + boarder_size, height + boarder_size, boarder); // right boarder
27 | }
28 |
29 | // draw a rectangle with a boarder
30 | void draw_rect_bordered(int x, int y, int w, int h, int color, int max_colored_x, int boarder, int boarder_size) {
31 |
32 | draw_rect(&global_img, x, y, max_colored_x, h, color); // inside
33 | draw_border(&global_img, x, y, w, h, boarder, boarder_size);
34 | }
35 |
36 | // draw a rectangle with a boarder inside
37 | void draw_rect_bordered_in(int x, int y, int w, int h, int color, int max_colored_x, int boarder, int boarder_size) {
38 |
39 | draw_rect(&global_img, x, y, max_colored_x, h, color); // inside
40 | draw_border(&global_img, x, y, w, h, boarder, boarder_size);
41 | }
42 |
43 | // draw a rectangle with a boarder gradient
44 | void draw_rect_bordered_gradient(int x, int y, int w, int h, int color, int max_colored_x, int boarder, int boarder_size) {
45 |
46 | draw_rect_gradient(&global_img, x, y, max_colored_x, h, color); // inside
47 | draw_border(&global_img, x, y, w, h, boarder, boarder_size);
48 | }
--------------------------------------------------------------------------------
/inc/structs.h:
--------------------------------------------------------------------------------
1 | #ifndef __STRUCTS_H__
2 | #define __STRUCTS_H__
3 |
4 | typedef struct s_img
5 | {
6 | char *path;
7 | void *img;
8 | char *data;
9 | int bpp;
10 | int size_line;
11 | int endian;
12 | int width;
13 | int height;
14 | } t_img;
15 |
16 | typedef struct s_imgs
17 | {
18 | int still_in_dir;
19 | t_img *img;
20 | struct s_imgs *next;
21 | } t_imgs;
22 |
23 | typedef struct s_env
24 | {
25 | void *mlx;
26 | void *win;
27 | t_img *img;
28 | } t_env;
29 |
30 | typedef struct s_screen_info
31 | {
32 | int middle_OnClick;
33 | int right_down_corner_OnScroll;
34 | int right_down_corner_y;
35 | int new_right_down_corner_y;
36 | int middle_x;
37 | int new_middle_x;
38 | int middle_y;
39 | int scroll_x;
40 | int scroll_y;
41 | int scroll_bare_size;
42 | int bare_OnClick;
43 | int bare_OnHover;
44 |
45 | int big_color_OnClick;
46 | int big_color_OnHover;
47 | int small_color_OnClick;
48 | int small_color_OnHover;
49 | int canvas_OnClick;
50 | t_img imgs;
51 | t_img colors;
52 | int swp;
53 | } t_screen_info;
54 |
55 | typedef struct s_mouse
56 | {
57 | int bol;
58 | int size_of_the_brush;
59 | int event;
60 | int x;
61 | int y;
62 | int color;
63 | t_img *img;
64 | } t_mouse;
65 |
66 | typedef struct s_rgb
67 | {
68 | int r;
69 | int r_OnClick;
70 | int g;
71 | int g_OnClick;
72 | int b;
73 | int b_OnClick;
74 | int shade;
75 | int shade_OnClick;
76 | } t_rgb;
77 |
78 | typedef struct s_cell
79 | {
80 | int is_color;
81 | int is_img;
82 | int color;
83 | t_img *img;
84 | } t_cell;
85 |
86 | typedef struct s_map
87 | {
88 | int x;
89 | int y;
90 | int cell_size;
91 | int width;
92 | int height;
93 | t_cell **cells;
94 | } t_map;
95 |
96 | typedef struct s_keys
97 | {
98 | int g;
99 | int f;
100 | int b;
101 | int cntrl;
102 | } t_keys;
103 |
104 | #endif
--------------------------------------------------------------------------------
/inc/Editor.h:
--------------------------------------------------------------------------------
1 | #ifndef __EDITOR_H__
2 | #define __EDITOR_H__
3 |
4 | # include
5 | # include
6 | # include
7 | # include
8 | # include
9 | # include
10 | # include
11 | # include
12 | # include
13 |
14 | # include "KeyMap.h"
15 | # include "src.h"
16 | # include "events.h"
17 | # include "structs.h"
18 | # include "tools.h"
19 | # include "lib.h"
20 |
21 | #pragma GCC optimize("O3")
22 | #pragma GCC optimize("inline")
23 | #pragma GCC optimize("omit-frame-pointer")
24 | #pragma GCC optimize("unroll-loops")
25 | #pragma GCC optimize("Ofast")
26 | #pragma GCC option("arch=native", "tune=native", "no-zero-upper")
27 | #pragma GCC target("avx")
28 | #pragma GCC target "bmi2"
29 | #include
30 |
31 | # define TRUE 1
32 | # define FALSE 0
33 |
34 | # define MIN(a, b) (a < b ? a : b)
35 | # define MAX(a, b) (a > b ? a : b)
36 | # define ABS(a) (a < 0 ? -a : a)
37 |
38 | # define PI 3.14159265359
39 |
40 | # define RAD(a) (a * PI / 180)
41 | # define DEG(a) (a * 180 / PI)
42 |
43 |
44 | # define WIN_WIDTH 2200
45 | # define WIN_HEIGHT 1300
46 | # define WIN_NAME "Editor"
47 | # define MAX_RIGHT_IMG 500
48 |
49 | # define IS_MID_BOARD(x, X, y) (x > X - 15 && x < X + 15 && y > 300 && y < WIN_HEIGHT - 300)
50 | # define CAN_MV_MID(V, X) (V && X > MAX_RIGHT_IMG && X < WIN_WIDTH - MAX_RIGHT_IMG)
51 |
52 |
53 | extern t_screen_info screen_info;
54 | extern t_rgb rgb;
55 | extern t_map map;
56 | extern t_keys keys;
57 | extern void *mlx;
58 | extern void *win;
59 | extern t_imgs *img;
60 | extern t_img global_img;
61 | extern int img_count;
62 |
63 | extern t_mouse mouse;
64 | extern t_mouse mouse_OnClick;
65 |
66 | extern int color_list[1028];
67 | extern int initial_colors_size;
68 |
69 |
70 | unsigned int *get_pixel(t_img *img, int x, int y);
71 | void path_img_to_img(t_img *img, char *path_img, int width, int height);
72 |
73 | int color_gradient(float width, float x, int color);
74 | int base_color();
75 | int full_color();
76 |
77 | int is_color_exist(int color);
78 |
79 | int rgb_setter(int x);
80 | int shade_setter(int x);
81 |
82 |
83 | int search_in_dir();
84 | void display_map();
85 |
86 |
87 |
88 |
89 | #endif // __EDITOR_H__
--------------------------------------------------------------------------------
/events/MouseMove.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | int MouseMove(int x, int y, void *param)
4 | {
5 | (void)param;
6 | (void)x;
7 | (void)y;
8 | if (x < MAX_RIGHT_IMG)
9 | screen_info.new_middle_x = WIN_WIDTH - MAX_RIGHT_IMG;
10 | else if (x > WIN_WIDTH - MAX_RIGHT_IMG)
11 | screen_info.new_middle_x = MAX_RIGHT_IMG;
12 | else
13 | screen_info.new_middle_x = WIN_WIDTH - x;
14 |
15 | screen_info.bare_OnHover = (x > WIN_WIDTH - 10 && x < WIN_WIDTH && y > screen_info.right_down_corner_y + screen_info.middle_y && y < screen_info.scroll_bare_size + screen_info.right_down_corner_y + screen_info.middle_y);
16 |
17 | int size = lst_img_size(img);
18 |
19 | if (screen_info.bare_OnClick) {
20 |
21 | if (y > screen_info.middle_y + screen_info.scroll_bare_size / 2 && y < WIN_HEIGHT - screen_info.scroll_bare_size / 2)
22 | screen_info.right_down_corner_y = y - screen_info.middle_y - screen_info.scroll_bare_size / 2;
23 | else if (y < screen_info.middle_y)
24 | screen_info.right_down_corner_y = 0;
25 | else if (y > WIN_HEIGHT)
26 | screen_info.right_down_corner_y = WIN_HEIGHT - screen_info.middle_y - screen_info.scroll_bare_size - 30;
27 | }
28 | if (screen_info.canvas_OnClick && !keys.cntrl)
29 | for (int i = 0; i < map.height; i++)
30 | for (int j = 0; j < map.width; j++)
31 | if (x >= MAX(map.x + j * map.cell_size, 0) && x <= MIN(map.x + (j + 1) * map.cell_size, WIN_WIDTH - screen_info.middle_x)
32 | && y >= MAX(map.y + i * map.cell_size, 0) && y <= MIN(map.y + (i + 1) * map.cell_size, WIN_HEIGHT)) {
33 | if (keys.f)
34 | bucket_tool(j, i, map.cells[i][j].color, map.cells[i][j].img);
35 | else if (keys.b)
36 | brush_tool(j - (mouse.size_of_the_brush - 1) / 2, i - (mouse.size_of_the_brush - 1) / 2, mouse_OnClick.color);
37 | break;
38 | }
39 | if (rgb.r_OnClick)
40 | rgb.r = rgb_setter(x);
41 | if (rgb.g_OnClick)
42 | rgb.g = rgb_setter(x);
43 | if (rgb.b_OnClick)
44 | rgb.b = rgb_setter(x);
45 | if (rgb.shade_OnClick)
46 | rgb.shade = shade_setter(x);
47 |
48 | if (mouse_OnClick.event && keys.cntrl && x < WIN_WIDTH - screen_info.middle_x - 15)
49 | map.x -= (mouse.x - x) * 2,
50 | map.y -= (mouse.y - y) * 2;
51 |
52 | mouse.x = x;
53 | mouse.y = y;
54 | return (0);
55 | }
--------------------------------------------------------------------------------
/inc/KeyMap.h:
--------------------------------------------------------------------------------
1 | #ifndef __KEYMAP_H__
2 | #define __KEYMAP_H__
3 |
4 | enum _KEYS {
5 |
6 | KEY_CNTRL = 256,
7 | KEY_ESC = 53,
8 | KEY_SPACE = 49,
9 | KEY_SHIFT = 257,
10 | KEY_ALT = 258,
11 | KEY_CMD = 259,
12 | KEY_OPTION = 260,
13 | KEY_LEFT_ARROW = 123,
14 | KEY_RIGHT_ARROW = 124,
15 | KEY_UP_ARROW = 126,
16 | KEY_DOWN_ARROW = 125,
17 | KEY_W = 13,
18 | KEY_A = 0,
19 | KEY_S = 1,
20 | KEY_D = 2,
21 | KEY_Q = 12,
22 | KEY_E = 14,
23 | KEY_R = 15,
24 | KEY_F = 3,
25 | KEY_G = 5,
26 | KEY_Z = 6,
27 | KEY_X = 7,
28 | KEY_C = 8,
29 | KEY_V = 9,
30 | KEY_B = 11,
31 | KEY_N = 45,
32 | KEY_M = 46,
33 | KEY_1 = 18,
34 | KEY_2 = 19,
35 | KEY_3 = 20,
36 | KEY_4 = 21,
37 | KEY_5 = 23,
38 | KEY_6 = 22,
39 | KEY_7 = 26,
40 | KEY_8 = 28,
41 | KEY_9 = 25,
42 | KEY_0 = 29,
43 | KEY_MINUS = 27,
44 | KEY_EQUAL = 24,
45 | KEY_BACKSPACE = 51,
46 | KEY_TAB = 48,
47 | KEY_OPEN_BRACKET = 33,
48 | KEY_CLOSE_BRACKET = 30,
49 | KEY_BACKSLASH = 42,
50 | KEY_SEMICOLON = 41,
51 | KEY_QUOTE = 39,
52 | KEY_ENTER = 36,
53 | KEY_COMMA = 43,
54 | KEY_PERIOD = 47,
55 | KEY_SLASH = 44,
56 | KEY_CAPS_LOCK = 272,
57 | KEY_F1 = 122,
58 | KEY_F2 = 120,
59 | KEY_F3 = 99,
60 | KEY_F4 = 118,
61 | KEY_F5 = 96,
62 | KEY_F6 = 97,
63 | KEY_F7 = 98,
64 | KEY_F8 = 100,
65 | KEY_F9 = 101,
66 | KEY_F10 = 109,
67 | KEY_F11 = 103,
68 | KEY_F12 = 111,
69 | KEY_NUM_LOCK = 300,
70 | KEY_NUM_PAD_0 = 82,
71 | KEY_NUM_PAD_1 = 83,
72 | KEY_NUM_PAD_2 = 84,
73 | KEY_NUM_PAD_3 = 85,
74 | KEY_NUM_PAD_4 = 86,
75 | KEY_NUM_PAD_5 = 87,
76 | KEY_NUM_PAD_6 = 88,
77 | KEY_NUM_PAD_7 = 89,
78 | KEY_NUM_PAD_8 = 91,
79 | KEY_NUM_PAD_9 = 92,
80 | KEY_NUM_PAD_PERIOD = 65,
81 | KEY_NUM_PAD_DIVIDE = 75,
82 | KEY_NUM_PAD_MULTIPLY = 67,
83 | KEY_NUM_PAD_MINUS = 78,
84 | KEY_NUM_PAD_PLUS = 69,
85 | KEY_NUM_PAD_ENTER = 76,
86 | KEY_NUM_PAD_EQUALS = 81,
87 | KEY_PRINT_SCREEN = 301,
88 | KEY_SCROLL_LOCK = 302,
89 | KEY_PAUSE = 303,
90 | KEY_INSERT = 114,
91 | KEY_HOME = 115,
92 | KEY_PAGE_UP = 116,
93 | KEY_DELETE = 117,
94 | KEY_END = 119,
95 | KEY_PAGE_DOWN = 121,
96 | KEY_HELP = 300,
97 | KEY_MENU = 300,
98 | KEY_POWER = 300,
99 | KEY_UNDO = 300
100 | };
101 |
102 | enum _MOUSE {
103 |
104 | M_RIGHT_CLICK = 1,
105 | M_LEFT_CLICK = 2,
106 | M_MID_CLICK = 3,
107 | M_SCRL_UP = 4,
108 | M_SCRL_DOWN = 5
109 | };
110 |
111 | #endif
--------------------------------------------------------------------------------
/src/CanvasClick.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | void CanvasRightClick() {
4 |
5 | int x = mouse_OnClick.x;
6 | int y = mouse_OnClick.y;
7 |
8 | // click on the color in the left side
9 | int bound_x = WIN_WIDTH - screen_info.middle_x - 10;
10 | if (x >= 0 && x <= bound_x && y >= 0 && y <= WIN_HEIGHT && !screen_info.middle_OnClick)
11 | {
12 | if (!keys.cntrl) {
13 | int brk = 1;
14 | screen_info.canvas_OnClick = TRUE;
15 | for (int i = 0; i < map.height && brk; i++)
16 | for (int j = 0; j < map.width && brk; j++) {
17 | int x_x = (mouse.size_of_the_brush - 1) / 2;
18 | if (x >= map.x + j * map.cell_size && x <= map.x + (j + 1) * map.cell_size && y >= map.y + i * map.cell_size && y <= map.y + (i + 1) * map.cell_size) {
19 | if (keys.f)
20 | bucket_tool(j, i, map.cells[i][j].color, map.cells[i][j].img);
21 | else if (keys.b)
22 | brush_tool(j - x_x, i - x_x, mouse_OnClick.color);
23 | brk = 0;
24 | }
25 | }
26 | }
27 | }
28 | }
29 |
30 | void CanvasLeftClick() {
31 |
32 | }
33 |
34 | void CanvasScrollUp() {
35 |
36 | int x = mouse_OnClick.x;
37 | int y = mouse_OnClick.y;
38 |
39 | // click on the color in the left side
40 | int bound_x = WIN_WIDTH - screen_info.middle_x - 10;
41 | if (x >= 0 && x <= bound_x && y >= 0 && y <= WIN_HEIGHT && !screen_info.middle_OnClick)
42 | {
43 | if (!keys.cntrl) {
44 | if (map.cell_size > 6)
45 | map.x += round((float)((float)(x - map.x) / (float)map.cell_size) * 5),
46 | map.y += round((float)((float)(y - map.y) / (float)map.cell_size) * 5),
47 | map.cell_size -= 5;
48 | }
49 | else
50 | mouse.size_of_the_brush += (mouse.size_of_the_brush < 20);
51 | }
52 | }
53 |
54 | void CanvasScrollDown() {
55 |
56 | int x = mouse_OnClick.x;
57 | int y = mouse_OnClick.y;
58 |
59 | // click on the color in the right side
60 | int end_x = WIN_WIDTH - screen_info.middle_x - 10;
61 |
62 | if (x >= 0 && x <= end_x && y >= 0 && y <= WIN_HEIGHT && !screen_info.middle_OnClick)
63 | {
64 | if (!keys.cntrl) {
65 | if (map.cell_size < 300)
66 | map.x -= round((float)((float)(x - map.x) / (float)map.cell_size) * 5),
67 | map.y -= round((float)((float)(y - map.y) / (float)map.cell_size) * 5),
68 | map.cell_size += 5;
69 | }
70 | else
71 | mouse.size_of_the_brush -= (mouse.size_of_the_brush > 1);
72 | }
73 | }
74 |
75 | void CanvasMidClick() {
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/tools/BrushAndBucket.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | void draw_brush_rect(t_img *img, int x, int y, int width, int height) {
4 |
5 |
6 | for (int _y = MAX(y, 0); _y < MIN(height, WIN_HEIGHT); _y++)
7 | for (int _x = MAX(x, 0); _x < MIN(width, WIN_WIDTH); _x++)
8 | if ((_x - map.x - map.cell_size) / map.cell_size >= 0 && (_x - map.x) / map.cell_size < map.width && (_y - map.y - map.cell_size) / map.cell_size >= 0 && (_y - map.y) / map.cell_size < map.height)
9 | {
10 | int c = map.cells[(_y - map.y) / map.cell_size][(_x - map.x) / map.cell_size].color;
11 | *get_pixel(img, _x, _y) = 0xffffff * (((c >> 16) & 0xff) < 128 && ((c >> 8) & 0xff) < 128 && (c & 0xff) < 128);
12 | }
13 | else
14 | *get_pixel(img, _x, _y) = 0xffffff;
15 | }
16 |
17 | void draw_brush_border(t_img *img, int x, int y, int width, int height, int boarder, int boarder_size) {
18 |
19 | draw_brush_rect(img, x, y - boarder_size, width, y); // up boarder
20 | draw_brush_rect(img, x, height, width, height + boarder_size); // down boarder
21 | draw_brush_rect(img, x - boarder_size, y - boarder_size, x, height + boarder_size); // left boarder
22 | draw_brush_rect(img, width, y - boarder_size, width + boarder_size, height + boarder_size); // right boarder
23 | }
24 |
25 | void brush_border() {
26 |
27 | int x = (mouse.x - map.x) / map.cell_size - (mouse.size_of_the_brush - 1) / 2;
28 | int y = (mouse.y - map.y) / map.cell_size - (mouse.size_of_the_brush - 1) / 2;
29 | int w = MIN(WIN_WIDTH - screen_info.middle_x, (mouse.x - map.x) / map.cell_size + mouse.size_of_the_brush / 2 + 1);
30 | int h = MIN(WIN_HEIGHT, (mouse.y - map.y) / map.cell_size + mouse.size_of_the_brush / 2 + 1);
31 |
32 | draw_brush_border(&global_img, x * map.cell_size + map.x, y * map.cell_size + map.y, w * map.cell_size + map.x, h * map.cell_size + map.y, 0x000000 + 0xfffff, 1);
33 |
34 | }
35 |
36 | void bucket_tool(int x, int y, int color, t_img *img)
37 | {
38 | if (x < 0 || x >= map.width || y < 0 || y >= map.height)
39 | return ;
40 | if (!mouse_OnClick.bol && (map.cells[y][x].color != color || map.cells[y][x].color == mouse_OnClick.color))
41 | return ;
42 | if (mouse_OnClick.bol && (map.cells[y][x].img != img || map.cells[y][x].img == mouse_OnClick.img))
43 | return ;
44 | if (!mouse_OnClick.bol)
45 | map.cells[y][x].color = mouse_OnClick.color,
46 | map.cells[y][x].img = NULL;
47 | else
48 | map.cells[y][x].color = 2^31,
49 | map.cells[y][x].img = mouse_OnClick.img;
50 | map.cells[y][x].is_color = !mouse_OnClick.bol;
51 | map.cells[y][x].is_img = mouse_OnClick.bol;
52 | bucket_tool(x + 1, y, color, img);
53 | bucket_tool(x - 1, y, color, img);
54 | bucket_tool(x, y + 1, color, img);
55 | bucket_tool(x, y - 1, color, img);
56 | }
57 |
58 | void brush_tool(int x, int y, int color)
59 | {
60 | for (int i = y; i < mouse.size_of_the_brush + y; i++)
61 | for (int j = x; j < mouse.size_of_the_brush + x; j++)
62 | if (i >= 0 && i < map.height && j >= 0 && j < map.width)
63 | map.cells[i][j].color = mouse_OnClick.color,
64 | map.cells[i][j].img = mouse_OnClick.img,
65 | map.cells[i][j].is_color = !mouse_OnClick.bol,
66 | map.cells[i][j].is_img = mouse_OnClick.bol;
67 | }
--------------------------------------------------------------------------------
/tools/img_list.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | // resize img (original to img)
4 | void path_img_to_img(t_img *img, char *path_img, int width, int height)
5 | {
6 | t_img _img;
7 |
8 | _img.img = mlx_xpm_file_to_image(mlx, path_img, &_img.width, &_img.height);
9 | _img.data = mlx_get_data_addr(_img.img, &_img.bpp, &_img.size_line, &_img.endian);
10 |
11 | for (int y = 0; y < height; y++)
12 | for (int x = 0; x < width; x++)
13 | *get_pixel(img, x, y) = *get_pixel(&_img,
14 | (float)x / (float)width * (float)_img.width,
15 | (float)y / (float)height * (float)_img.height);
16 | mlx_destroy_image(mlx, _img.img);
17 | }
18 |
19 | // create new img
20 | t_img *new_img(void *mlx, char *path_img, int width, int height)
21 | {
22 | t_img *img;
23 |
24 | img = (t_img *)malloc(sizeof(t_img));
25 | img->path = path_img;
26 | img->img = mlx_new_image(mlx, width, height);
27 | img->data = mlx_get_data_addr(img->img, &img->bpp, &img->size_line, &img->endian);
28 | path_img_to_img(img, path_img, width, height);
29 | img->width = width;
30 | img->height = height;
31 | return (img);
32 | }
33 |
34 | // push img to list of imgs
35 | void push_back(t_imgs **head, t_img *img)
36 | {
37 | t_imgs *new;
38 | t_imgs *tmp;
39 |
40 | new = (t_imgs *)malloc(sizeof(t_imgs));
41 | new->img = img;
42 | new->still_in_dir = 1;
43 | new->next = NULL;
44 | if (*head == NULL)
45 | {
46 | *head = new;
47 | return ;
48 | }
49 | tmp = *head;
50 | while (tmp->next)
51 | tmp = tmp->next;
52 | tmp->next = new;
53 | }
54 |
55 | // size of list of imgs
56 | int lst_img_size(t_imgs *tmp)
57 | {
58 | int i;
59 |
60 | i = 0;
61 | while (tmp) i++, tmp = tmp->next;
62 | return (i);
63 | }
64 |
65 | int already_in_list(char *d)
66 | {
67 | t_imgs *tmp = img;
68 | while (tmp)
69 | {
70 | if (!strcmp(tmp->img->path, d))
71 | return (tmp->still_in_dir = 1);
72 | tmp = tmp->next;
73 | }
74 | return (0);
75 | }
76 |
77 | void clear_list()
78 | {
79 | t_imgs *tmp = img;
80 |
81 | while (tmp && tmp->next)
82 | {
83 | if (!tmp->next->still_in_dir) {
84 | t_imgs *tmp2 = tmp->next;
85 | tmp->next = tmp->next->next;
86 | mlx_destroy_image(mlx, tmp2->img->img);
87 | free(tmp2->img->path);
88 | free(tmp2->img);
89 | free(tmp2);
90 | }
91 | else
92 | tmp->still_in_dir *= (tmp == img),
93 | tmp = tmp->next;
94 | }
95 | if (img && !img->still_in_dir) {
96 | t_imgs *tmp2 = tmp;
97 | img = img->next;
98 | mlx_destroy_image(mlx, tmp2->img->img);
99 | free(tmp2->img->path);
100 | free(tmp2->img);
101 | free(tmp2);
102 | }
103 | }
104 |
105 | // fill img with color
106 | void color_to_img(t_img *img, unsigned int color, int width, int height)
107 | {
108 | for (int y = 0; y < height; y++)
109 | for (int x = 0; x < width; x++)
110 | *get_pixel(img, x, y) = color;
111 | }
112 |
113 | // draw img to img
114 | void draw_img(t_img *img, int x, int y, int w, int h, t_img *img_to_draw) {
115 |
116 | for (int _y = y; _y < y + h; _y++)
117 | for (int _x = x; _x < x + w; _x++)
118 | if (_x >= 0 && _x < WIN_WIDTH && _y >= 0 && _y < WIN_HEIGHT)
119 | *get_pixel(img, _x, _y) = *get_pixel(img_to_draw, (_x - x) * img_to_draw->width / w, (_y - y) * img_to_draw->height / h);
120 | }
--------------------------------------------------------------------------------
/events/MouseOnClick.c:
--------------------------------------------------------------------------------
1 | #include "../inc/Editor.h"
2 |
3 | int MouseOnClick(int button, int x, int y, void *param)
4 | {
5 | (void)param;
6 |
7 | mouse_OnClick.x = x;
8 | mouse_OnClick.y = y;
9 | switch(button) {
10 |
11 | case M_RIGHT_CLICK:
12 | mouse_OnClick.event = TRUE;
13 | IS_MID_BOARD(x, WIN_WIDTH - screen_info.middle_x, y) && (screen_info.middle_OnClick = TRUE);
14 | screen_info.bare_OnClick = (x > WIN_WIDTH - 10 && x < WIN_WIDTH && y > screen_info.right_down_corner_y + screen_info.middle_y && y < screen_info.scroll_bare_size + screen_info.right_down_corner_y + screen_info.middle_y);
15 | if (!screen_info.swp)
16 | {
17 | mouse_OnClick.bol = 0;
18 | {
19 | int _size = WIN_WIDTH - screen_info.middle_x / 2 - 100;
20 | if (x >_size && x < _size + 200) {
21 | if (y > screen_info.middle_y + 45 && y < screen_info.middle_y + 65)
22 | rgb.r = (float)(x - _size) * (255.0 / 200.0),
23 | rgb.r_OnClick = TRUE;
24 |
25 | if (y > screen_info.middle_y + 135 && y < screen_info.middle_y + 155)
26 | rgb.g = (float)(x - _size) * (255.0 / 200.0),
27 | rgb.g_OnClick = TRUE;
28 |
29 | if (y > screen_info.middle_y + 215 && y < screen_info.middle_y + 235)
30 | rgb.b = (float)(x - _size) * (255.0 / 200.0),
31 | rgb.b_OnClick = TRUE;
32 | if (y > screen_info.middle_y + 305 && y < screen_info.middle_y + 326)
33 | rgb.shade = (float)(x - _size) * (511.0 / 200.0),
34 | rgb.shade_OnClick = TRUE;
35 | }
36 | // click on the big color
37 | _size = WIN_WIDTH - screen_info.middle_x / 2 - 100;
38 | if (x > _size && y > screen_info.middle_y + 400 && x < _size + 100 && y < screen_info.middle_y + 510) {
39 | if (!is_color_exist(full_color()))
40 | color_list[initial_colors_size++] = full_color();
41 | mouse_OnClick.color = full_color();
42 | }
43 | }
44 |
45 | {
46 | // click on the color in the right side
47 | int start_x = WIN_WIDTH - screen_info.middle_x + 10;
48 | int start_y = screen_info.middle_y + 680;
49 | int scrl = 0;
50 | int w = 20, h = 20;
51 | for (int i = 0; i < initial_colors_size; i++)
52 | {
53 | if (start_x + w > WIN_WIDTH)
54 | {
55 | start_x = WIN_WIDTH - screen_info.middle_x + 10;
56 | if (scrl < h + 10) {
57 | start_y += h + 10 - scrl;
58 | scrl = 0;
59 | } else
60 | scrl -= h + 10;
61 | }
62 | if (x > start_x && x < start_x + w && y > start_y - scrl && y < start_y + h - scrl)
63 | {
64 | rgb.r = (color_list[i] >> 16) & 0xFF;
65 | rgb.g = (color_list[i] >> 8) & 0xFF;
66 | rgb.b = color_list[i] & 0xFF;
67 | rgb.shade = 256;
68 | mouse_OnClick.color = color_list[i];
69 | }
70 | start_x += w + 10;
71 | }
72 | }
73 | }
74 | else
75 | {
76 | mouse_OnClick.bol = 1;
77 | t_imgs *tmp = img;
78 | int start_x = WIN_WIDTH - screen_info.middle_x + 10;
79 | int start_y = screen_info.middle_y + 10;
80 | if (tmp)
81 | start_x += ((WIN_WIDTH - start_x) % (tmp->img->width + 10)) / 2;
82 | int scrl = screen_info.right_down_corner_y;
83 | while (tmp)
84 | {
85 | if (start_x + tmp->img->width > WIN_WIDTH)
86 | {
87 | start_x = WIN_WIDTH - screen_info.middle_x + 10;
88 | start_x += ((WIN_WIDTH - start_x) % (tmp->img->width + 10)) / 2;
89 | if (scrl < tmp->img->height + 10) {
90 | start_y += tmp->img->height + 10 - scrl;
91 | scrl = 0;
92 | } else
93 | scrl -= tmp->img->height + 10;
94 | }
95 | if (OnHover(start_x, start_y, MIN(tmp->img->width + start_x, WIN_WIDTH), MIN(tmp->img->height + start_y - scrl, WIN_HEIGHT)))
96 | {
97 | mouse_OnClick.img = tmp->img;
98 | break;
99 | }
100 | // for (int y = 0; y < tmp->img->height && start_y + y < WIN_HEIGHT; y++)
101 | // for (int x = 0; x < tmp->img->width && start_x + x < WIN_WIDTH; x++)
102 | // if (y >= scrl)
103 | // *get_pixel(&global_img, start_x + x, start_y + y - scrl) = *get_pixel(tmp->img, x, y);
104 | start_x += tmp->img->width + 10;
105 | tmp = tmp->next;
106 | }
107 | }
108 | {
109 | int start_x = WIN_WIDTH - screen_info.middle_x + 100;
110 | int start_y = 100;
111 | if (OnHover(start_x, start_y, start_x + screen_info.imgs.width, start_y + screen_info.imgs.height))
112 | screen_info.swp = 1;
113 | start_x += 100 + screen_info.imgs.width;
114 | if (OnHover(start_x, start_y, start_x + screen_info.colors.width, start_y + screen_info.colors.height))
115 | screen_info.swp = 0;
116 | }
117 | CanvasRightClick();
118 | break;
119 |
120 | case M_LEFT_CLICK:
121 | {
122 | // click on the color in the right side
123 | int start_x = WIN_WIDTH - screen_info.middle_x + 10;
124 | int start_y = screen_info.middle_y + 680;
125 | int scrl = 0;
126 | int w = 20, h = 20;
127 | for (int i = 0; i < initial_colors_size; i++)
128 | {
129 | if (start_x + w > WIN_WIDTH)
130 | {
131 | start_x = WIN_WIDTH - screen_info.middle_x + 10;
132 | if (scrl < h + 10) {
133 | start_y += h + 10 - scrl;
134 | scrl = 0;
135 | } else
136 | scrl -= h + 10;
137 | }
138 | if (x > start_x && x < start_x + w && y > start_y - scrl && y < start_y + h - scrl)
139 | {
140 | for (int j = i; j < initial_colors_size - 1; j++)
141 | color_list[j] = color_list[j + 1];
142 | initial_colors_size--;
143 | }
144 | start_x += w + 10;
145 | }
146 | }
147 | break;
148 |
149 | case M_SCRL_UP:
150 | {
151 | int size = lst_img_size(img);
152 | if (screen_info.right_down_corner_y < ((size / ((screen_info.middle_x - 10) / 110)) + !!(size % ((screen_info.middle_x - 10) / 110))) * 110 - (WIN_HEIGHT - screen_info.middle_y))
153 | screen_info.right_down_corner_y += 20;
154 | }
155 | CanvasScrollUp();
156 | break;
157 |
158 | case M_SCRL_DOWN:
159 | screen_info.right_down_corner_y -= 20 * (screen_info.right_down_corner_y > 0);
160 | CanvasScrollDown();
161 | break;
162 |
163 | case M_MID_CLICK:
164 |
165 | break;
166 |
167 | default:
168 | break;
169 | }
170 | return (0);
171 | }
--------------------------------------------------------------------------------
/main.c:
--------------------------------------------------------------------------------
1 | #include "inc/Editor.h"
2 |
3 | int color_list[1028] = {0xff4000, 0xff8000, 0xffbf00, 0xffff00, 0xbfff00, 0x80ff00,
4 | 0x40ff00, 0x00ff00, 0x00ff40, 0x00ff80, 0x00ffbf, 0x00ffff,
5 | 0x00bfff, 0x0080ff, 0x0066ff, 0x0040ff, 0x0000ff, 0x4000ff,
6 | 0x8000ff, 0xbf00ff, 0xff00ff, 0xff00bf, 0xff0080, 0xff0040,
7 | 0xff0000};
8 | int initial_colors_size = 25;
9 |
10 | t_screen_info screen_info;
11 | t_rgb rgb;
12 | t_map map;
13 | t_keys keys;
14 | void *mlx;
15 | void *win;
16 | t_imgs *img;
17 | t_img global_img;
18 | int img_count;
19 | t_mouse mouse;
20 | t_mouse mouse_OnClick;
21 |
22 |
23 | void display_map()
24 | {
25 | // clear global_img
26 | draw_rect(&global_img, 0, 0, WIN_WIDTH - screen_info.middle_x, WIN_HEIGHT, 0x99aabb);
27 |
28 | // draw map
29 | for (int y = 0; y < map.height; y++)
30 | for (int x = 0; x < map.width; x++)
31 | if (map.cells[y][x].is_color)
32 | draw_rect_bordered_in(x * map.cell_size + map.x - !!x * !keys.g, y * map.cell_size + map.y - !!y * !keys.g, (x + 1) * map.cell_size + map.x, (y + 1) * map.cell_size + map.y, map.cells[y][x].color, (x + 1) * map.cell_size + map.x, 0xcccccc, !keys.g);
33 | else if (map.cells[y][x].is_img)
34 | draw_img(&global_img, x * map.cell_size + map.x - !!x * !keys.g, y * map.cell_size + map.y - !!y * !keys.g, map.cell_size, map.cell_size, map.cells[y][x].img);
35 |
36 | // draw brush border
37 | if (keys.b)
38 | brush_border();
39 |
40 | // clear up right corner
41 | draw_rect(&global_img, WIN_WIDTH - screen_info.middle_x, 0, WIN_WIDTH, screen_info.middle_y, 0xE9F4FF);
42 |
43 | // clear down right corner
44 | int color = 0;
45 | for (int y = screen_info.middle_y; y < WIN_HEIGHT; y++)
46 | for (int x = WIN_WIDTH - screen_info.middle_x; x < WIN_WIDTH; x++)
47 | *get_pixel(&global_img, x, y) = (rand() % 100) ? (color += (color < 1275000)) / 5000 : 0xffffff / (rand() % 10 + 1);
48 |
49 |
50 | // draw middle line (x)
51 | draw_rect(&global_img, WIN_WIDTH - screen_info.middle_x, 0, WIN_WIDTH - screen_info.middle_x + 1, WIN_HEIGHT, 0x000000);
52 |
53 | // draw middle line (x) (onclick)
54 | draw_rect(&global_img, WIN_WIDTH - screen_info.middle_x - (1 + screen_info.middle_OnClick * 2), 300, WIN_WIDTH - screen_info.middle_x + (1 + screen_info.middle_OnClick * 2), WIN_HEIGHT - 300, 0x54006F);
55 |
56 | // draw middle line (y)
57 | draw_rect(&global_img, WIN_WIDTH - screen_info.middle_x, screen_info.middle_y, WIN_WIDTH, screen_info.middle_y + 1, 0xaa0000);
58 |
59 | // draw menu
60 | {
61 | int start_x = WIN_WIDTH - screen_info.middle_x + 100;
62 | int start_y = 100;
63 | for (int y = 0; y < screen_info.imgs.height; y++)
64 | for (int x = 0; x < screen_info.imgs.width; x++)
65 | if (*get_pixel(&screen_info.imgs, x, y) != 0xffffff)
66 | {
67 | if (OnClick(start_x, start_y, start_x + screen_info.imgs.width, start_y + screen_info.imgs.height))
68 | *get_pixel(&global_img, start_x + x, start_y + y) = 0xff0000;
69 | else if (OnHover(start_x, start_y, start_x + screen_info.imgs.width, start_y + screen_info.imgs.height))
70 | *get_pixel(&global_img, start_x + x, start_y + y) = 0xff8888;
71 | else
72 | *get_pixel(&global_img, start_x + x, start_y + y) = *get_pixel(&screen_info.imgs, x, y);
73 | }
74 | start_x += 100 + screen_info.imgs.width;
75 | for (int y = 0; y < screen_info.colors.height; y++)
76 | for (int x = 0; x < screen_info.colors.width; x++)
77 | if (*get_pixel(&screen_info.colors, x, y) != 0xffffff)
78 | {
79 | if (OnClick(start_x, start_y, start_x + screen_info.colors.width, start_y + screen_info.colors.height))
80 | *get_pixel(&global_img, start_x + x, start_y + y) = 0xff0000;
81 | else if (OnHover(start_x, start_y, start_x + screen_info.colors.width, start_y + screen_info.colors.height))
82 | *get_pixel(&global_img, start_x + x, start_y + y) = 0xff8888;
83 | else
84 | *get_pixel(&global_img, start_x + x, start_y + y) = *get_pixel(&screen_info.colors, x, y);
85 | }
86 | }
87 | if (screen_info.swp)
88 | { // display imgs in the right side
89 | t_imgs *tmp = img;
90 | int start_x = WIN_WIDTH - screen_info.middle_x + 10;
91 | int start_y = screen_info.middle_y + 10;
92 | if (tmp)
93 | start_x += ((WIN_WIDTH - start_x) % (tmp->img->width + 10)) / 2;
94 | int scrl = screen_info.right_down_corner_y;
95 | while (tmp)
96 | {
97 | if (start_x + tmp->img->width > WIN_WIDTH)
98 | {
99 | start_x = WIN_WIDTH - screen_info.middle_x + 10;
100 | start_x += ((WIN_WIDTH - start_x) % (tmp->img->width + 10)) / 2;
101 | if (scrl < tmp->img->height + 10) {
102 | start_y += tmp->img->height + 10 - scrl;
103 | scrl = 0;
104 | } else
105 | scrl -= tmp->img->height + 10;
106 | }
107 | for (int y = 0; y < tmp->img->height && start_y + y < WIN_HEIGHT; y++)
108 | for (int x = 0; x < tmp->img->width && start_x + x < WIN_WIDTH; x++)
109 | if (y >= scrl)
110 | *get_pixel(&global_img, start_x + x, start_y + y - scrl) = *get_pixel(tmp->img, x, y);
111 | start_x += tmp->img->width + 10;
112 | tmp = tmp->next;
113 | }
114 | // draw the scroll bar
115 | draw_rect(&global_img, WIN_WIDTH - 5 - screen_info.bare_OnHover * 5, screen_info.right_down_corner_y + screen_info.middle_y, WIN_WIDTH, screen_info.scroll_bare_size + screen_info.right_down_corner_y + screen_info.middle_y, 0xff0000 + screen_info.bare_OnHover * 0x0000ff);
116 | } else
117 | {
118 | // display a colors customized
119 | {
120 | int start_x = WIN_WIDTH - screen_info.middle_x + 10;
121 | int start_y = screen_info.middle_y + 50;
122 | int _size = WIN_WIDTH - screen_info.middle_x / 2 - 100;
123 |
124 | draw_rect_bordered(_size, start_y, _size + 200, start_y + 10, 255 << 16, _size + (float)rgb.r * (200.0 / 255.0), 0xffffff, 1); // red bar
125 | draw_rect_bordered(_size + (float)rgb.r * (200.0 / 255.0) - 5, start_y - 5, _size + (float)rgb.r * (200.0 / 255.0) + 5, start_y + 15, 0xffffff, _size + (float)rgb.r * (200.0 / 255.0) + 5, 255 << 16, 1); // red controller
126 |
127 | draw_rect_bordered(_size, start_y + 90, _size + 200, start_y + 100, 255 << 8, _size + (float)rgb.g * (200.0 / 255.0), 0xffffff, 1); // green bar
128 | draw_rect_bordered(_size + (float)rgb.g * (200.0 / 255.0) - 5, start_y + 85, _size + (float)rgb.g * (200.0 / 255.0) + 5, start_y + 105, 0xffffff, _size + (float)rgb.g * (200.0 / 255.0) + 5, 255 << 8, 1); // green controller
129 |
130 | draw_rect_bordered(_size, start_y + 170, _size + 200, start_y + 180, 255, _size + (float)rgb.b * (200.0 / 255.0), 0xffffff, 1); // blue bar
131 | draw_rect_bordered(_size + (float)rgb.b * (200.0 / 255.0) - 5, start_y + 165, _size + (float)rgb.b * (200.0 / 255.0) + 5, start_y + 185, 0xffffff, _size + (float)rgb.b * (200.0 / 255.0) + 5, 255, 1); // blue controller
132 |
133 | draw_rect_bordered_gradient(_size, start_y + 260, _size + 200, start_y + 270, base_color(), _size + 200, 0xffffff, 1); // shade bar
134 | draw_rect_bordered(_size + (float)rgb.shade * (200.0 / 511.0) - 5, start_y + 255, _size + (float)rgb.shade * (200.0 / 511.0) + 5, start_y + 275, 0xffffff, _size + (float)rgb.shade * (200.0 / 511.0) + 5, 0x000000, 1); // shade controller
135 |
136 | int Hover = OnHover(_size, start_y + 350, _size + 200, start_y + 460);
137 | int Click = OnClick(_size, start_y + 350, _size + 100, start_y + 460);
138 | draw_rect_bordered(_size, start_y + 350, _size + 100, start_y + 460, full_color(), _size + 100, 0xffffff * !Click, 2 + Hover); // shade bar
139 | draw_rect_bordered(_size + 100, start_y + 350, _size + 200, start_y + 460, mouse_OnClick.color, _size + 200, 0xffffff, 2 + Hover); // shade bar
140 | }
141 |
142 | // display colors in the right side
143 | {
144 | int start_x = WIN_WIDTH - screen_info.middle_x + 10;
145 | int start_y = screen_info.middle_y + 680;
146 | int scrl = 0;
147 | int w = 20, h = 20;
148 | for (int i = 0; i < initial_colors_size; i++)
149 | {
150 | if (start_x + w > WIN_WIDTH)
151 | {
152 | start_x = WIN_WIDTH - screen_info.middle_x + 10;
153 | if (scrl < h + 10) {
154 | start_y += h + 10 - scrl;
155 | scrl = 0;
156 | } else
157 | scrl -= h + 10;
158 | }
159 | int Click = OnClick(start_x, start_y - scrl, MIN(start_x + w, WIN_WIDTH), MIN(start_y + h, WIN_HEIGHT)) * 2;
160 | int Hover = OnHover(start_x, start_y - scrl, MIN(start_x + w, WIN_WIDTH), MIN(start_y + h, WIN_HEIGHT)) * 3;
161 | draw_rect_bordered(start_x - Hover, start_y - scrl - Hover, MIN(start_x + w + Hover, WIN_WIDTH), MIN(start_y + h + Hover, WIN_HEIGHT), color_list[i], MIN(start_x + w + Hover, WIN_WIDTH), 0x999999, 1 + Click);
162 | start_x += w + 10;
163 | }
164 | }
165 | }
166 |
167 | // display finale img
168 | mlx_clear_window(mlx, win);
169 | mlx_put_image_to_window(mlx, win, global_img.img, 0, 0);
170 | }
171 |
172 | int CloseWin(void *param)
173 | {
174 | (void)param;
175 | exit(0);
176 | }
177 |
178 | int is_color_exist(int color)
179 | {
180 | for (int i = 0; i < initial_colors_size; i++)
181 | if (color_list[i] == color)
182 | return (1);
183 | return (0);
184 | }
185 |
186 |
187 |
188 | int search_in_dir()
189 | {
190 | DIR *dir;
191 | struct dirent *p;
192 | char d[1024] = "img/";
193 |
194 | dir = opendir("img");
195 | if (!dir) return (0);
196 |
197 | while ((p = readdir(dir)))
198 | if (strstr(p->d_name, ".png") || strstr(p->d_name, ".xpm"))
199 | {
200 | strcat(d, p->d_name);
201 | if (!already_in_list(d))
202 | push_back(&img, new_img(mlx, strdup(d), 100, 100));
203 | d[4] = '\0';
204 | }
205 | closedir(dir);
206 | clear_list();
207 | return (0);
208 | }
209 |
210 | int main()
211 | {
212 | char *line;
213 |
214 | // initialize mlx
215 | mlx = mlx_init();
216 | // initialize win
217 | win = mlx_new_window(mlx, WIN_WIDTH, WIN_HEIGHT, "Editor");
218 |
219 | // initialize global_img
220 | {
221 | global_img.width = WIN_WIDTH;
222 | global_img.height = WIN_HEIGHT;
223 | global_img.img = mlx_new_image(mlx, global_img.width, global_img.height);
224 | global_img.data = mlx_get_data_addr(global_img.img, &global_img.bpp, &global_img.size_line, &global_img.endian);
225 | }
226 | // random
227 | srand(time(0));
228 |
229 | // initialize screen_info
230 | {
231 | screen_info.middle_x = screen_info.new_middle_x = WIN_WIDTH / 4;
232 | screen_info.middle_OnClick = FALSE;
233 | screen_info.right_down_corner_OnScroll = FALSE;
234 | screen_info.right_down_corner_y = screen_info.new_right_down_corner_y = 0;
235 | screen_info.middle_y = 190;
236 | screen_info.scroll_x = 0;
237 | screen_info.scroll_y = 0;
238 | int size = lst_img_size(img);
239 | screen_info.scroll_bare_size = (WIN_HEIGHT - screen_info.middle_y) - ((size / ((screen_info.middle_x - 10) / 110)) + !!(size % ((screen_info.middle_x - 10) / 110))) * 110 + (WIN_HEIGHT - screen_info.middle_y) - 40;
240 | if (screen_info.scroll_bare_size > WIN_HEIGHT - screen_info.middle_y - screen_info.right_down_corner_y)
241 | screen_info.scroll_bare_size = WIN_HEIGHT - screen_info.middle_y - screen_info.right_down_corner_y - 10;
242 | screen_info.bare_OnClick = FALSE;
243 | screen_info.bare_OnHover = FALSE;
244 | screen_info.big_color_OnClick = FALSE;
245 | screen_info.big_color_OnHover = FALSE;
246 | screen_info.small_color_OnClick = FALSE;
247 | screen_info.small_color_OnHover = FALSE;
248 | screen_info.canvas_OnClick = FALSE;
249 | screen_info.imgs.img = mlx_xpm_file_to_image(mlx, ".head/imgs.xpm", &screen_info.imgs.width, &screen_info.imgs.height);
250 | screen_info.imgs.data = mlx_get_data_addr(screen_info.imgs.img, &screen_info.imgs.bpp, &screen_info.imgs.size_line, &screen_info.imgs.endian);
251 | screen_info.colors.img = mlx_xpm_file_to_image(mlx, ".head/colors.xpm", &screen_info.colors.width, &screen_info.colors.height);
252 | screen_info.colors.data = mlx_get_data_addr(screen_info.colors.img, &screen_info.colors.bpp, &screen_info.colors.size_line, &screen_info.colors.endian);
253 | screen_info.swp = 0;
254 | }
255 |
256 | // initialize rg
257 | rgb.r_OnClick = rgb.g_OnClick = rgb.b_OnClick = rgb.shade_OnClick = FALSE;
258 | rgb.r = rgb.g = rgb.b = 100;
259 | rgb.shade = 255;
260 |
261 | // initialize mouse
262 | mouse.size_of_the_brush = 2;
263 | mouse.x = mouse.y = 0;
264 | mouse.img = NULL;
265 | mouse.color = 0;
266 |
267 | // initialize mouse_OnClick
268 | mouse_OnClick.event = FALSE;
269 | mouse_OnClick.x = mouse_OnClick.y = 0;
270 | mouse_OnClick.img = NULL;
271 | mouse_OnClick.color = 0;
272 | mouse_OnClick.bol = 0;
273 |
274 | // inisialize map
275 | {
276 | map.x = +20;
277 | map.y = +20;
278 | map.width = 100;
279 | map.height = 100;
280 | map.cells = (t_cell**)malloc(sizeof(t_cell*) * map.height);
281 | for (int i = 0; i < map.height; i++)
282 | {
283 | map.cells[i] = (t_cell*)malloc(sizeof(t_cell) * map.width);
284 | for (int j = 0; j < map.width; j++)
285 | {
286 | map.cells[i][j].is_color = 1;
287 | map.cells[i][j].is_img = FALSE;
288 | map.cells[i][j].color = 0xffffff;
289 | map.cells[i][j].img = NULL;
290 | }
291 | }
292 | map.cell_size = 100;
293 | }
294 | keys.b = TRUE;
295 | display_map(); // display window
296 |
297 |
298 | mlx_hook(win, 2, 1L<<0, KeyPress, NULL);
299 | mlx_hook(win, 3, 1L<<1, KeyOnRelease, NULL);
300 |
301 | mlx_hook(win, 6, 1L<<6, MouseMove, NULL);
302 | mlx_hook(win, 4, 1L<<2, MouseOnClick, NULL);
303 | mlx_hook(win, 5, 1L<<3, MouseOnRelease, NULL);
304 |
305 | mlx_loop_hook(mlx, rendering, NULL);
306 |
307 | mlx_hook(win, 17, 1, CloseWin, NULL);
308 |
309 | mlx_loop(mlx);
310 | return (0);
311 | }
--------------------------------------------------------------------------------
/.head/colors.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | static char *result[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "140 50 205 2 ",
5 | " c black",
6 | ". c #010101",
7 | "X c #020202",
8 | "o c #040404",
9 | "O c gray2",
10 | "+ c gray3",
11 | "@ c gray4",
12 | "# c #0B0B0B",
13 | "$ c #0C0C0C",
14 | "% c #0E0E0E",
15 | "& c gray6",
16 | "* c #101010",
17 | "= c gray7",
18 | "- c gray8",
19 | "; c #151515",
20 | ": c #161616",
21 | "> c gray9",
22 | ", c #181818",
23 | "< c #191919",
24 | "1 c gray10",
25 | "2 c #1B1B1B",
26 | "3 c gray11",
27 | "4 c #1D1D1D",
28 | "5 c gray12",
29 | "6 c #222222",
30 | "7 c #232323",
31 | "8 c gray14",
32 | "9 c #252525",
33 | "0 c gray15",
34 | "q c #272727",
35 | "w c #282828",
36 | "e c gray16",
37 | "r c #2A2A2A",
38 | "t c gray17",
39 | "y c #2C2C2C",
40 | "u c #2D2D2D",
41 | "i c gray18",
42 | "p c #2F2F2F",
43 | "a c gray19",
44 | "s c #323232",
45 | "d c gray20",
46 | "f c #343434",
47 | "g c #353535",
48 | "h c gray21",
49 | "j c #373737",
50 | "k c #393939",
51 | "l c #3A3A3A",
52 | "z c gray23",
53 | "x c #3C3C3C",
54 | "c c gray24",
55 | "v c #3E3E3E",
56 | "b c #3F3F3F",
57 | "n c gray25",
58 | "m c #414141",
59 | "M c gray26",
60 | "N c #434343",
61 | "B c #444444",
62 | "V c gray27",
63 | "C c #464646",
64 | "Z c gray28",
65 | "A c #484848",
66 | "S c #494949",
67 | "D c gray29",
68 | "F c #4B4B4B",
69 | "G c #4C4C4C",
70 | "H c gray30",
71 | "J c #4E4E4E",
72 | "K c gray31",
73 | "L c #505050",
74 | "P c #515151",
75 | "I c gray32",
76 | "U c #535353",
77 | "Y c gray33",
78 | "T c #555555",
79 | "R c #565656",
80 | "E c gray34",
81 | "W c #585858",
82 | "Q c #5A5A5A",
83 | "! c #5B5B5B",
84 | "~ c gray36",
85 | "^ c #5D5D5D",
86 | "/ c gray37",
87 | "( c #5F5F5F",
88 | ") c #606060",
89 | "_ c gray38",
90 | "` c #626262",
91 | "' c gray39",
92 | "] c #646464",
93 | "[ c #656565",
94 | "{ c #676767",
95 | "} c #686868",
96 | "| c DimGray",
97 | " . c #6A6A6A",
98 | ".. c gray42",
99 | "X. c #6C6C6C",
100 | "o. c #6D6D6D",
101 | "O. c gray43",
102 | "+. c gray44",
103 | "@. c #717171",
104 | "#. c #727272",
105 | "$. c gray45",
106 | "%. c #747474",
107 | "&. c gray46",
108 | "*. c #767676",
109 | "=. c #777777",
110 | "-. c gray47",
111 | ";. c #797979",
112 | ":. c gray48",
113 | ">. c #7B7B7B",
114 | ",. c gray50",
115 | "<. c #808080",
116 | "1. c gray51",
117 | "2. c #838383",
118 | "3. c #848484",
119 | "4. c gray52",
120 | "5. c #868686",
121 | "6. c gray53",
122 | "7. c #888888",
123 | "8. c #898989",
124 | "9. c gray54",
125 | "0. c #8B8B8B",
126 | "q. c gray55",
127 | "w. c #8E8E8E",
128 | "e. c gray56",
129 | "r. c #909090",
130 | "t. c gray57",
131 | "y. c #929292",
132 | "u. c #939393",
133 | "i. c gray58",
134 | "p. c #959595",
135 | "a. c gray59",
136 | "s. c #979797",
137 | "d. c #9A9A9A",
138 | "f. c #9B9B9B",
139 | "g. c gray61",
140 | "h. c gray62",
141 | "j. c #A0A0A0",
142 | "k. c #A2A2A2",
143 | "l. c gray64",
144 | "z. c #A4A4A4",
145 | "x. c #A5A5A5",
146 | "c. c gray65",
147 | "v. c #A9A9A9",
148 | "b. c gray67",
149 | "n. c #ACACAC",
150 | "m. c gray68",
151 | "M. c #AEAEAE",
152 | "N. c #AFAFAF",
153 | "B. c gray69",
154 | "V. c #B2B2B2",
155 | "C. c gray70",
156 | "Z. c #B4B4B4",
157 | "A. c gray71",
158 | "S. c #B6B6B6",
159 | "D. c gray72",
160 | "F. c #BBBBBB",
161 | "G. c #BCBCBC",
162 | "H. c gray74",
163 | "J. c gray",
164 | "K. c gray75",
165 | "L. c #C1C1C1",
166 | "P. c gray76",
167 | "I. c #C3C3C3",
168 | "U. c #C5C5C5",
169 | "Y. c gray78",
170 | "T. c #C8C8C8",
171 | "R. c gray79",
172 | "E. c #CACACA",
173 | "W. c #CBCBCB",
174 | "Q. c #CDCDCD",
175 | "!. c #CECECE",
176 | "~. c gray81",
177 | "^. c gray82",
178 | "/. c LightGray",
179 | "(. c gray83",
180 | "). c #D5D5D5",
181 | "_. c gray84",
182 | "`. c gray85",
183 | "'. c #DADADA",
184 | "]. c gray86",
185 | "[. c gainsboro",
186 | "{. c gray88",
187 | "}. c #E2E2E2",
188 | "|. c gray90",
189 | " X c #E6E6E6",
190 | ".X c #E7E7E7",
191 | "XX c #E9E9E9",
192 | "oX c #EAEAEA",
193 | "OX c gray92",
194 | "+X c #ECECEC",
195 | "@X c gray93",
196 | "#X c #EFEFEF",
197 | "$X c gray94",
198 | "%X c #F1F1F1",
199 | "&X c gray95",
200 | "*X c #F4F4F4",
201 | "=X c gray96",
202 | "-X c #F6F6F6",
203 | ";X c gray97",
204 | ":X c #F9F9F9",
205 | ">X c gray98",
206 | ",X c #FBFBFB",
207 | " s m _ h.2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X",
232 | "2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X` y Q 9 j & k O...k 2X2X2X2X/.p <.d r g 9 / a ^ 2X2X2X2X2Xz z.@.} 2X2X2X2X2XP M S a B h c ,.s XX2X2XZ.; u k.P.s q w m D.{ >.2X2X .S m 0 i i X.;.5 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X",
233 | "2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2Xe.Q f.G :X2X2X^.p y.v 2X2X2X(.f |.p ~.2X2X:XG f.( 5.2X2X2X2Xz z.@.} 2X2X2X2X{ 4.<.' 2X2X2XL.t X2X2X2X`.2X2XV n.r +X2X2X2Xw.c 7 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X",
235 | "2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2XC E.J q.2X2X2X2X2XoX7 X.2X2X5.&.Z.p 2X2X2X2X2X2Xt.F /.N 2X2X2Xz z.@.} 2X2X2Xf *Xi A.2X2X2X2X2X2X> '._ j.2X2XG.r 2XO >X2X2X2X2X2X2XV s.C.) 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X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X",
258 | "2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X",
259 | "2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X",
260 | "2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X"
261 | };
262 |
--------------------------------------------------------------------------------
/.head/imgs.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | static char *result[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "140 50 211 2 ",
5 | " c black",
6 | ". c gray2",
7 | "X c #060606",
8 | "o c #090909",
9 | "O c gray4",
10 | "+ c #0C0C0C",
11 | "@ c #0E0E0E",
12 | "# c gray6",
13 | "$ c #101010",
14 | "% c #111111",
15 | "& c gray7",
16 | "* c #131313",
17 | "= c gray8",
18 | "- c #151515",
19 | "; c #161616",
20 | ": c gray9",
21 | "> c #181818",
22 | ", c #191919",
23 | "< c gray10",
24 | "1 c #1B1B1B",
25 | "2 c #1D1D1D",
26 | "3 c #1E1E1E",
27 | "4 c gray12",
28 | "5 c #202020",
29 | "6 c gray13",
30 | "7 c #222222",
31 | "8 c #232323",
32 | "9 c gray14",
33 | "0 c #252525",
34 | "q c gray15",
35 | "w c #272727",
36 | "e c #282828",
37 | "r c gray16",
38 | "t c #2A2A2A",
39 | "y c gray17",
40 | "u c #2C2C2C",
41 | "i c #2D2D2D",
42 | "p c gray18",
43 | "a c #2F2F2F",
44 | "s c gray19",
45 | "d c #313131",
46 | "f c #323232",
47 | "g c gray20",
48 | "h c #343434",
49 | "j c #353535",
50 | "k c gray21",
51 | "l c #373737",
52 | "z c gray22",
53 | "x c #393939",
54 | "c c #3A3A3A",
55 | "v c gray23",
56 | "b c #3C3C3C",
57 | "n c gray24",
58 | "m c #3E3E3E",
59 | "M c #3F3F3F",
60 | "N c gray25",
61 | "B c #414141",
62 | "V c gray26",
63 | "C c #434343",
64 | "Z c #444444",
65 | "A c gray27",
66 | "S c gray28",
67 | "D c #484848",
68 | "F c #494949",
69 | "G c gray29",
70 | "H c #4B4B4B",
71 | "J c #4C4C4C",
72 | "K c gray30",
73 | "L c #4E4E4E",
74 | "P c gray31",
75 | "I c #505050",
76 | "U c #515151",
77 | "Y c gray32",
78 | "T c #535353",
79 | "R c gray33",
80 | "E c #555555",
81 | "W c #565656",
82 | "Q c gray34",
83 | "! c #585858",
84 | "~ c gray35",
85 | "^ c #5B5B5B",
86 | "/ c gray36",
87 | "( c #5D5D5D",
88 | ") c gray37",
89 | "_ c #5F5F5F",
90 | "` c #606060",
91 | "' c gray38",
92 | "] c #626262",
93 | "[ c gray39",
94 | "{ c #646464",
95 | "} c #656565",
96 | "| c gray40",
97 | " . c #676767",
98 | ".. c #686868",
99 | "X. c DimGray",
100 | "o. c #6A6A6A",
101 | "O. c #6C6C6C",
102 | "+. c #6D6D6D",
103 | "@. c #6F6F6F",
104 | "#. c gray44",
105 | "$. c #717171",
106 | "%. c #727272",
107 | "&. c gray45",
108 | "*. c #747474",
109 | "=. c gray46",
110 | "-. c #767676",
111 | ";. c #777777",
112 | ":. c gray47",
113 | ">. c #797979",
114 | ",. c gray48",
115 | "<. c #7B7B7B",
116 | "1. c #7C7C7C",
117 | "2. c gray50",
118 | "3. c #808080",
119 | "4. c #818181",
120 | "5. c gray51",
121 | "6. c #838383",
122 | "7. c #848484",
123 | "8. c gray52",
124 | "9. c #868686",
125 | "0. c gray53",
126 | "q. c #888888",
127 | "w. c #898989",
128 | "e. c gray54",
129 | "r. c #8B8B8B",
130 | "t. c gray56",
131 | "y. c #909090",
132 | "u. c gray57",
133 | "i. c #929292",
134 | "p. c #939393",
135 | "a. c gray58",
136 | "s. c #959595",
137 | "d. c gray59",
138 | "f. c #979797",
139 | "g. c gray60",
140 | "h. c #9A9A9A",
141 | "j. c #9B9B9B",
142 | "k. c gray61",
143 | "l. c #9D9D9D",
144 | "z. c #9F9F9F",
145 | "x. c #A0A0A0",
146 | "c. c #A2A2A2",
147 | "v. c #A4A4A4",
148 | "b. c gray65",
149 | "n. c gray66",
150 | "m. c #A9A9A9",
151 | "M. c gray67",
152 | "N. c #ACACAC",
153 | "B. c gray68",
154 | "V. c #AEAEAE",
155 | "C. c #AFAFAF",
156 | "Z. c gray69",
157 | "A. c #B2B2B2",
158 | "S. c gray70",
159 | "D. c #B4B4B4",
160 | "F. c gray71",
161 | "G. c #B7B7B7",
162 | "H. c gray72",
163 | "J. c gray73",
164 | "K. c #BBBBBB",
165 | "L. c #BCBCBC",
166 | "P. c gray74",
167 | "I. c gray",
168 | "U. c gray75",
169 | "Y. c #C1C1C1",
170 | "T. c gray76",
171 | "R. c gray77",
172 | "E. c #C5C5C5",
173 | "W. c gray78",
174 | "Q. c #C8C8C8",
175 | "!. c gray79",
176 | "~. c #CACACA",
177 | "^. c #CBCBCB",
178 | "/. c gray81",
179 | "(. c gray82",
180 | "). c LightGray",
181 | "_. c gray83",
182 | "`. c #D5D5D5",
183 | "'. c gray84",
184 | "]. c #D7D7D7",
185 | "[. c gray85",
186 | "{. c #DADADA",
187 | "}. c gray86",
188 | "|. c gainsboro",
189 | " X c #DDDDDD",
190 | ".X c #DFDFDF",
191 | "XX c gray88",
192 | "oX c #E1E1E1",
193 | "OX c #E2E2E2",
194 | "+X c #E4E4E4",
195 | "@X c gray90",
196 | "#X c #E6E6E6",
197 | "$X c #E9E9E9",
198 | "%X c #EAEAEA",
199 | "&X c gray92",
200 | "*X c #ECECEC",
201 | "=X c gray93",
202 | "-X c #EFEFEF",
203 | ";X c gray94",
204 | ":X c #F1F1F1",
205 | ">X c gray95",
206 | ",X c #F4F4F4",
207 | "XB Y 8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X",
235 | "8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X7X8X8X8X8X8X8X8X8X8X8X8X8X8X2X2X8X8X8X8X8X8X8X7X-X8X8X8X8X8X8X8X8X8X8X8X8X8X8X4X8X8X8X8X8X8X8X8X8X8X8X8X;X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X8X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