-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest3.cpp
55 lines (54 loc) · 1.38 KB
/
test3.cpp
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
////#include <graphics.h>
////#include <string>
////
////int main() {
//// int gd = DETECT, gm;
//// initgraph(&gd, &gm, "");
////
//// // Set text color
//// setcolor(BROWN);
////
//// // Draw rectangle with desired background color
//// setfillstyle(SOLID_FILL, RED); // Set background color
//// bar(100, 100, 300, 150); // Draw rectangle as background
////
//// // Set text background color to match rectangle background color
//// setbkcolor();
////
//// // Draw text on top of the rectangle
//// outtextxy(120, 120, "Hello, World!");
////
//// getch();
//// closegraph();
//// return 0;
////}
//
//#include <graphics.h>
//#include <conio.h>
//
//int main() {
// int gd = DETECT, gm;
// initgraph(&gd, &gm, "");
//
// // Define custom colors using the COLOR macro
// int customColor1 = COLOR(192, 124, 79); // Purple
// int customColor2 = COLOR(255, 165, 0); // Orange
//
// // Set the background color to customColor1 and clear the screen
// setbkcolor(customColor1);
// cleardevice();
//
// // Set the drawing color to customColor2
//// setcolor(customColor2);
//
// // Draw a rectangle with the custom drawing color
// rectangle(100, 100, 200, 200);
//
// // Draw text with the custom drawing color
// outtextxy(100, 250, "Hello, Custom Color!");
//
// getch();
// closegraph();
// return 0;
//}
//