Posted By

mazaalai on 06/26/11


Tagged

html5 mongol ger mongolian yurt


Versions (?)

Монгол гэрийг HTML5 дээр canvas ашиглан зурсан нь


 / Published in: HTML
 

  1. <!DOCTYPE HTML>
  2.  
  3. <canvas id="mongol_ger" width="200" height="150" style="border:1px solid #c3c3c3;">
  4. Your browser does not support the canvas element.
  5. </canvas>
  6.  
  7. <script type="text/javascript">
  8.  
  9. var ger=document.getElementById("mongol_ger");
  10.  
  11. //gerrin undsen tegsh untsugt hesgiig haruulah
  12. var suuri=ger.getContext("2d");
  13. suuri.moveTo(20,70);
  14. suuri.lineTo(180,70);
  15. suuri.lineTo(180,130);
  16. suuri.lineTo(20,130);
  17. suuri.lineTo(20,70);
  18.  
  19. suuri.stroke();
  20.  
  21. //haalga nemeh
  22. var gate=ger.getContext("2d");
  23.  
  24. gate.moveTo(75,130);
  25. gate.lineTo(75,70);
  26. gate.lineTo(125,70);
  27. gate.lineTo(125,130);
  28.  
  29. gate.stroke();
  30.  
  31. //burees nemeh
  32. var burees=ger.getContext("2d");
  33.  
  34. burees.moveTo(20,90);
  35. burees.lineTo(75,90);
  36.  
  37. burees.moveTo(20,110);
  38. burees.lineTo(75,110);
  39.  
  40. burees.moveTo(125,90);
  41. burees.lineTo(180,90);
  42.  
  43. burees.moveTo(125,110);
  44. burees.lineTo(180,110);
  45.  
  46. burees.stroke();
  47.  
  48. //uni nemeh
  49. var uni = ger.getContext("2d");
  50.  
  51. uni.moveTo(20,70);
  52. uni.lineTo(75,35);
  53.  
  54. uni.moveTo(180,70);
  55. uni.lineTo(125,35);
  56.  
  57. uni.stroke();
  58.  
  59. // toono nemeh
  60. var toono = ger.getContext("2d");
  61.  
  62. toono.beginPath();
  63. toono.arc(100, 71, 45, 1.30 * Math.PI, 1.70 * Math.PI, false);
  64. toono.lineWidth = 1;
  65.  
  66. toono.stroke();
  67.  
  68. //toono dood hesgiig nemeh
  69. var toono_d = ger.getContext("2d");
  70.  
  71. toono_d.beginPath();
  72. toono_d.arc(100, 11, 35, 0.75 * Math.PI, 0.25 * Math.PI, true);
  73. toono_d.lineWidth = 1;
  74.  
  75. toono_d.stroke();
  76.  
  77.  
  78. </body>
  79. </html>

Report this snippet  

You need to login to post a comment.