01.
<canvas id=
"myCanvas"
width=
"<? echo $b?>"
height=
"<? echo $a?>"
></canvas>
02.
<script>
03.
var
c = document.getElementById(
"myCanvas"
);
04.
var
ctx = c.getContext(
"2d"
);
05.
var
imageObj =
new
Image();
06.
07.
<?
08.
$z=0;
09.
while
($r=mysql_fetch_array($Recordset1)){
10.
11.
$point_x[$z]=$r[
'point_x'
];
12.
$point_y[$z]=$r[
'point_y'
];
13.
$point_num[$z]=$r[
'point_num'
]; ?>
14.
15.
imageObj.onload =
function
() {
16.
17.
ctx.drawImage(imageObj, 0 ,0,<?=$b?>,<?=$a?>);
18.
ctx.fillStyle =
"red"
;
19.
ctx.fillRect(<?=$point_x[$z] ?>,<?=$point_y[$z] ?>,3.5,3.5);
20.
ctx.font =
"20px Georgia"
;
21.
ctx.fillText(
"<?=$point_num[$z] ?>"
,<?=$point_x[$z] ?>,<?=$point_y[$z] ?>);
22.
ctx.font =
"30px Verdana"
;
23.
24.
};
25.
imageObj.src=
'img-bee/<?php echo $name_img ?>'
;
26.
27.
<? $z=$z+1;} ?>
28.
</script>