• Home
    • SMap
    • reveal
    • blog
  • about
  • w2-w4
    • ipv4
    • ipv6
    • INFO
  • w5
  • w6
    • 美國國旗
    • 中國國旗
    • 日本國旗
    • 英國國旗
    • 韓國國旗
  • w7
    • gd
    • chinese
    • korea
  • w9
  • w13
  • w14
  • w15
    • A1
    • A2
  • w16
  • 寒假
  • file
  • brython

41223125 cp2023

  • Home
    • SMap
    • reveal
    • blog
  • about
  • w2-w4
    • ipv4
    • ipv6
    • INFO
  • w5
  • w6
    • 美國國旗
    • 中國國旗
    • 日本國旗
    • 英國國旗
    • 韓國國旗
  • w7
    • gd
    • chinese
    • korea
  • w9
  • w13
  • w14
  • w15
    • A1
    • A2
  • w16
  • 寒假
  • file
  • brython
英國國旗 << Previous Next >> w7

韓國國旗

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
#include <stdio.h>
#include <gd.h>
#include <math.h>
   
#define WIDTH 900
#define HEIGHT 600
#define FILENAME "south_korea_flag.png"
   
int main() {
    gdImagePtr im;
    FILE *pngout;
    int white, black, red, blue;
   
    im = gdImageCreate(WIDTH, HEIGHT);
   
    white = gdImageColorAllocate(im, 255, 255, 255);
    black = gdImageColorAllocate(im, 0, 0, 0);
    red = gdImageColorAllocate(im, 205, 0, 0);
    blue = gdImageColorAllocate(im, 0, 56, 168);
   
    // Background (white)
    gdImageFilledRectangle(im, 0, 0, WIDTH, HEIGHT , white);
   
    // Blue Circle (Yin-Yang Symbol)
    gdImageFilledArc(im, WIDTH / 2, HEIGHT / 2, WIDTH / 3, HEIGHT / 2, 210, 30, red, gdArc);
   
    // Red Circle (Yin-Yang Symbol)
    gdImageFilledArc(im, WIDTH / 2, HEIGHT / 2, WIDTH / 3, HEIGHT / 2, 30, 210, blue, gdArc);
   
  int circleX = 385;    // 圓心的 X 座標
  int circleY = 262.5;   // 圓心的 Y 座標
  int circleRadius = 75;    
   
  // 繪製圓形
  gdImageFilledEllipse(im, circleX, circleY, circleRadius * 2, circleRadius * 2, red);
   
  int circleX2 = 515;    // 圓心的 X 座標
   
 int circleY2 = 337.5;
   
  // 繪製圓形
  gdImageFilledEllipse(im, circleX2, circleY2, circleRadius * 2, circleRadius * 2, blue);
   
  {
   
   
  // 起點和終點位置
   
  int startX = 340;   
  // 線的起點 X 座標
   
  int startY = 90;  
  // 線的起點 Y 座標
   
  int endX = 200;    
  // 線的終點 X 座標
   
  int endY = 260;    
  // 線的終點 Y 座標
   
  int lineWidth = 23;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX, startY, endX, endY, black);
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX -35, startY -10, endX -35, endY -10, black);
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX -70, startY -20, endX -70, endY -20, black);
   
  int startX2 = 213;   
  // 線的起點 X 座標
   
  int startY2 = 270;  
  // 線的起點 Y 座標
   
  int endX2 = 133;    
  // 線的終點 X 座標
   
  int endY2 = 210;    
  // 線的終點 Y 座標
   
  int lineWidth2 = 25;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX2 +3, startY2, endX2 +3, endY2, white);
   
  gdImageSetThickness(im, lineWidth +10);
gdImageLine(im, startX2 -17, startY2 +9 , endX2 -17, endY2 +9 , white);
   
  gdImageSetThickness(im, lineWidth );
gdImageLine(im, startX2 +115, startY2 -145, endX2 +115, endY2 -145, white);
   
  gdImageSetThickness(im, lineWidth);
gdImageLine(im, startX2 +120, startY2 -155, endX2 +120, endY2 -155, white);
   
  gdImageSetThickness(im, lineWidth +12);
gdImageLine(im, startX2 +145, startY2 -155, endX2 +145, endY2 -155, white);
}
  {
    // 起點和終點位置
   
  int startX = 330;   
  // 線的起點 X 座標
   
  int startY = 520;  
  // 線的起點 Y 座標
   
  int endX = 190;    
  // 線的終點 X 座標
   
  int endY = 350;    
  // 線的終點 Y 座標
   
  int lineWidth = 23;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX, startY, endX, endY, black);
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX -35, startY +10, endX -35, endY +10, black);
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX -70, startY +20, endX -70, endY +20, black);
   
  int startX2 = 213;   
  // 線的起點 X 座標
   
  int startY2 = 330;  
  // 線的起點 Y 座標
   
  int endX2 = 133;    
  // 線的終點 X 座標
   
  int endY2 = 390;    
  // 線的終點 Y 座標
   
  int lineWidth2 = 25;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth +8);
  gdImageLine(im, startX2 -11, startY2, endX2 -11, endY2, white);
   
  gdImageSetThickness(im, lineWidth +10);
gdImageLine(im, startX2 -30, startY2 -9 , endX2 -30, endY2 -9 , white);
   
  gdImageSetThickness(im, lineWidth );
gdImageLine(im, startX2 +100, startY2 +150, endX2 +100, endY2 +150, white);
   
  gdImageSetThickness(im, lineWidth);
gdImageLine(im, startX2 +120, startY2 +155, endX2 +120, endY2 +155, white);
   
  gdImageSetThickness(im, lineWidth +14);
gdImageLine(im, startX2 +145, startY2 +157, endX2 +145, endY2 +157, white);
   
    gdImageSetThickness(im, lineWidth -10);
gdImageLine(im, 232, 426, 206, 448, white);
   
  }
   
  {
    // 起點和終點位置
   
  int startX = 564;   
  // 線的起點 X 座標
   
  int startY = 520;  
  // 線的起點 Y 座標
   
  int endX = 704;    
  // 線的終點 X 座標
   
  int endY = 350;    
  // 線的終點 Y 座標
   
  int lineWidth = 23;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX +70, startY +20, endX +70, endY +20, black);
   
    // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX, startY, endX, endY, black);
   
    // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX +35, startY +10, endX +35, endY +10, black);
   
gdImageSetThickness(im, lineWidth -10);
gdImageLine(im, 624, 400, 734, 490, white);
   
  int startX2 = 553;   
  // 線的起點 X 座標
   
  int startY2 = 330;  
  // 線的起點 Y 座標
   
  int endX2 = 633;    
  // 線的終點 X 座標
   
  int endY2 = 390;    
  // 線的終點 Y 座標
   
  int lineWidth2 = 25;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth +8);
  gdImageLine(im, startX2 +139, startY2, endX2 +139, endY2, white);
   
  gdImageSetThickness(im, lineWidth +10);
gdImageLine(im, startX2 +157, startY2 -9 , endX2 +157, endY2 -9 , white);
   
  gdImageSetThickness(im, lineWidth);
gdImageLine(im, startX2 +25, startY2 +155, endX2 +25, endY2 +155, white);
   
  gdImageSetThickness(im, lineWidth +30);
gdImageLine(im, startX2 -3, startY2 +170, endX2 , endY2 +170, white);
  }
  {
    // 起點和終點位置
   
  int startX = 330;   
  // 線的起點 X 座標
   
  int startY = 520;  
  // 線的起點 Y 座標
   
  int endX = 190;    
  // 線的終點 X 座標
   
  int endY = 350;    
  // 線的終點 Y 座標
   
  int lineWidth = 23;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX, startY, endX, endY, black);
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX -35, startY +10, endX -35, endY +10, black);
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX -70, startY +20, endX -70, endY +20, black);
   
  int startX2 = 213;   
  // 線的起點 X 座標
   
  int startY2 = 330;  
  // 線的起點 Y 座標
   
  int endX2 = 133;    
  // 線的終點 X 座標
   
  int endY2 = 390;    
  // 線的終點 Y 座標
   
  int lineWidth2 = 25;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth +8);
  gdImageLine(im, startX2 -11, startY2, endX2 -11, endY2, white);
   
  gdImageSetThickness(im, lineWidth +10);
gdImageLine(im, startX2 -30, startY2 -9 , endX2 -30, endY2 -9 , white);
   
  gdImageSetThickness(im, lineWidth );
gdImageLine(im, startX2 +100, startY2 +150, endX2 +100, endY2 +150, white);
   
  gdImageSetThickness(im, lineWidth);
gdImageLine(im, startX2 +120, startY2 +155, endX2 +120, endY2 +155, white);
   
  gdImageSetThickness(im, lineWidth +14);
gdImageLine(im, startX2 +145, startY2 +157, endX2 +145, endY2 +157, white);
   
    gdImageSetThickness(im, lineWidth -10);
gdImageLine(im, 232, 426, 206, 448, white);
   
  }
  {
    // 起點和終點位置
   
  int startX = 564;   
  // 線的起點 X 座標
   
  int startY = 97;  
  // 線的起點 Y 座標
   
  int endX = 704;    
  // 線的終點 X 座標
   
  int endY = 267;    
  // 線的終點 Y 座標
   
  int lineWidth = 23;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX +70, startY -20, endX +70, endY -20, black);
   
    // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX, startY, endX, endY, black);
   
    gdImageSetThickness(im, lineWidth -10);
gdImageLine(im, 624, 212, 734, 118, white);
   
    // 繪製線段
  gdImageSetThickness(im, lineWidth);
  gdImageLine(im, startX +35, startY -10, endX +35, endY -10, black);
   
  int startX2 = 553;   
  // 線的起點 X 座標
   
  int startY2 = 277;  
  // 線的起點 Y 座標
   
  int endX2 = 633;    
  // 線的終點 X 座標
   
  int endY2 = 217;    
  // 線的終點 Y 座標
   
  int lineWidth2 = 25;  // 線的寬度
   
  // 繪製線段
  gdImageSetThickness(im, lineWidth +8);
  gdImageLine(im, startX2 +134, startY2, endX2 +134, endY2, white);
   
  gdImageSetThickness(im, lineWidth +10);
gdImageLine(im, startX2 +157, startY2 +9 , endX2 +157, endY2 +9 , white);
   
  gdImageSetThickness(im, lineWidth);
gdImageLine(im, startX2 +25, startY2 -155, endX2 +25, endY2 -155, white);
   
    gdImageSetThickness(im, lineWidth +30);
gdImageLine(im, startX2 -5, startY2 -155, endX2 -5, endY2 -155, white);
   
  }
   
    // Save image
FILE *outputFile = fopen("./../images/korea_flag.png", "wb");
if (outputFile == NULL) {
    fprintf(stderr, "Error opening the output file.\n");
    return 1;
}
  gdImagePngEx(im, outputFile, 9);
      fclose(outputFile);
      gdImageDestroy(im);
      return 0;
  }




英國國旗 << Previous Next >> w7

Copyright ©2025 All rights reserved | This template is made with by Colorlib