-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCHAR_BM.C
More file actions
42 lines (37 loc) · 790 Bytes
/
CHAR_BM.C
File metadata and controls
42 lines (37 loc) · 790 Bytes
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
// A program to draw a character (A), using Bitmap method.
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm,i,j,c=2; //c is for colour
int a[14][9]={{0,0,0,0,1,0,0,0,0},
{0,0,0,1,1,1,0,0,0},
{0,0,1,1,0,1,1,0,0},
{0,1,1,0,0,0,1,1,0},
{1,1,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,1,1},
{1,1,1,1,1,1,1,1,1},
{1,1,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,1,1},
};
initgraph(&gd,&gm,"c:\\turboc3\\bgi");
outtext("Bitmap method");
for(i=0;i<14;i++)
{
for(j=0;j<9;j++)
{
if(a[i][j]==1)
{
putpixel(50+j,20+i,c);
}
}
}
getch();
closegraph();
}