要存放10个24乘24点阵的汉字字模,需要多少储存空间?
- 提问者网友:杀生予夺
- 2021-04-21 01:25
- 五星知识达人网友:酒醒三更
- 2021-04-21 02:15
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>LED点阵字符</title>
</head>
<Style>
.CalendarTD {font-family: verdana;font-size: 7pt;color: #000000;background-color:#F0EFFA;height: 20px;width:11%;text-align: center;}
</Style>
<body>
<table border="1" width="320" id="table1" cellspacing="0" height="280" cellpadding="0" bgcolor=#008000 >
<script language=javascript>
var block=new Array(14);
function newset(){
for(i=0;i<14;i++){
block[i]=new Array(16);
for(j=0;j<16;j++)
block[i][j]=0;
}
}
function buttonOver()
{
var obj = window.event.srcElement;
obj.runtimeStyle.cssText = "background-color:#800000";
// obj.className="Hover";
}
function buttonOut(i,j)
{
if(!block[i][j]){
var obj = window.event.srcElement;obj.runtimeStyle.cssText = "";
//window.setTimeout(function(){obj.runtimeStyle.cssText = "";},100);
}
}
function buttonClick(i,j)
{
block[i][j]=block[i][j]?0:1;
var obj = window.event.srcElement;
obj.runtimeStyle.cssText = "background-color:#800000";
}
function dec2hex(n)
{
switch(n){
case 10:return ('A');
case 11:return ('B');
case 12:return ('C');
case 13:return ('D');
case 14:return ('E');
case 15:return ('F');
}
return(n);
}
function output()
{
var t2;
for(i=0;i<7;i++){
code.value=code.value+"DB ";
for(j=1;j>=0;j--){
t=block[i+j*7][11]+2*block[i+j*7][10]+4*block[i+j*7][9]+8*block[i+j*7][8];
t2=dec2hex(t);
code.value=code.value+t2;
t=block[i+j*7][15]+block[i+j*7][14]*2+block[i+j*7][13]*4+block[i+j*7][12]*8;
t2=dec2hex(t);
code.value=code.value+t2+'H,';
t=block[i+j*7][3]+block[i+j*7][2]*2+block[i+j*7][1]*4+block[i+j*7][0]*8;
t2=dec2hex(t);
code.value=code.value+t2;
t=block[i+j*7][7]+block[i+j*7][6]*2+block[i+j*7][5]*4+block[i+j*7][4]*8;
t2=dec2hex(t);
code.value=code.value+t2+'H';
}
code.value=code.value+"\n";
}
}
function reset(){
for(i=0;i<14;i++)
for(j=0;j<16;j++){
block[i][j]=0;
table1.rows[i].cells[j].runtimeStyle.cssText = "background-color:#008000";
}
code.value="";
}
newset();
for(a=0;a<14;a++){
document.writeln("<TR >");
for(b=0;b<16;b++)
document.write("<TD width='10' height='10' onMouseover='buttonOver();' onMouseOut='buttonOut("+a+","+b+");' onMouseDown='buttonClick("+a+","+b+");'> </TD>");
}
</script>
</table>
<p align="left"><input type="button" value="提交" name="B1" onclick="output();"><input type="button" value="重置" name="B2" onclick="reset();" ></p>
<textarea rows="16" name="code" id="code" cols="45"></textarea> </p>
</body>
</html>