Re: CANVAS ű׿¡ ´ëÇÑ Áú¹®À» ½ÃÀÛÀ¸·Î HTML5 KIG È°µ¿À» ½ÃÀÛÇغ¾´Ï´Ù. ^^

¾È³çÇϼ¼¿ä, ¿ÀÆä¶ó ¼ÒÇÁÆ®¿þ¾î ¹®»óȯÀÔ´Ï´Ù.

HTML5 Working Draft 4.8.11 ÀýÀÇ Çϱâ Ç×:

// Àοë

When the canvas element is created, and subsequently ***whenever the width and height attributes are set (whether to a new value or to the previous value), the bitmap and any associated contexts must be cleared back to their initial state and reinitialized with the newly specified coordinate space dimensions.***

When the canvas is initialized, its bitmap must be cleared to transparent black.

// ÀÎ¿ë ³¡

¿¡ ¸í½ÃµÇ¾î ÀÖ½À´Ï´Ù. 

±¸ÇöÀÇ ¹é±×¶ó¿îµå´Â ½ºÆåÀÌ Á¸ÀçÇϱâ ÀÌÀü¿¡ ¾Æ·¡ Å×½ºÆ® ÄÉÀ̽º Áß 17, 18, 19¹ø ·ÎºÎÅÍ ½ÃÀ۵Ǿú½À´Ï´Ù.

http://hixie.ch/tests/adhoc/html/canvas/

º¸½Ã¸é ¾Æ½Ã°ÚÁö¸¸ 4³âÀÌ ³ÑÀº test µéÀÔ´Ï´Ù. »ç°ßÀÌÁö¸¸, HTML5 ¿¡µðÅÍ¿Í µ¿ÀÏÀÎÀÌ ÀÛ¼ºÇÑ Å×½ºÆ®À̱⠶§¹®¿¡ ±×¿¡ ´ëÇÑ °ßÇØ°¡ ¿¬ÀåµÇ¾ú´Ù°í »ý°¢µË´Ï´Ù.

ÀÌ ºÎºÐ¿¡ ´ëÇؼ­ WebGL¿¡¼­ backbuffer°¡ ¾Æ´Ñ Àüü contextÀÇ ÃʱâÈ­°¡ ÀϾ´Â°ÍÀ¸·Î Çؼ®µÇ¾î¼­ Àá½Ã ³í¶õÀÌ ÀÖ¾úÀ¸³ª, Çϱâ¿Í °°ÀÌ Á¤¸®°¡ µÇ¾ú½À´Ï´Ù.

The drawing buffer into which the API calls are rendered shall be defined upon creation of the WebGLRenderingContext object. ***The size of this drawing buffer shall be determined by the width and height attributes of the HTMLCanvasElement. Changing either of these attributes shall cause the drawing buffer to resize and its contents to be cleared to (0,0,0,0).***

´äº¯ÀÌ µÇ¾úÀ¸¸é ÁÁ°Ú½À´Ï´Ù.

°¨»çÇÕ´Ï´Ù.
¹®»óȯ ¹è»ó


2010/11/17, 10:37 AM, Min Tae Kim ÀÛ¼º:

> ¾È³çÇϼ¼¿ä. 
> 
> À̹ÌÁöŬ¸¯ ±è¹ÎÅÂÀÔ´Ï´Ù.
> 
> 
> Canvas·Î °³¹ßÀ» ÇÏ´Ù°¡ ¹®µæ Àǹ®ÀÌ »ý°Ü¼­ ÀÌ·¸°Ô Áú¹®µå·Áº¾´Ï´Ù.
> 
> [Áú¹®]
> 
> Canvas ű״ width ¶Ç´Â height °¡ ¼³Á¤µÇ¸é (°ªÀÇ º¯°æ À¯¹«¿Í »ó°ü¾øÀÌ) canvas ÀÚü°¡ ¸®¼ÂµË´Ï´Ù. 
> Áï ±×·ÁÁø À̹ÌÁö°¡ ¸ðµÎ Áö¿öÁö°í °¢Á¾ styleµµ ¸®¼ÂµË´Ï´Ù. 
> ¸í½ÃÀûÀÎ API ·Î reset À» ±¸ÇöÇÏÁö ¾Ê°í ÀÌ·¸°Ô ÇÏ´Â ÀÌÀ¯´Â ¹«¾ùÀϱî¿ä?
> 
> 
> [¹è°æ]
> 
> HTML5¿¡¼­ »õ·Î Ãß°¡µÈ ű×ÀÎ Canvas ´Â ¸¹Àº API ¸¦ ÇÔ²² Á¦°øÇÏ°í ÀÖ½À´Ï´Ù.
> 2D ÀÛ¾÷À» ÇϱâÀ§Çؼ­ ³ª¸§ ÃæºÐÇÑ API ¸¦ Á¦°øÇÏ°í Àִµ¥¿ä À¯µ¶ ÀÌÇØÇϱâ Èûµç 
> ÇüŸ¦ Çϳª ¹ß°ßÇß½À´Ï´Ù. 
> 
> Canvas ÀÚüÀÇ width ¶Ç´Â height °¡ ¼³Á¤µÇ¸é Canvas°¡ Reset µÇ´Â ¹æ½ÄÀÌ ±×°ÍÀÔ´Ï´Ù.
> ¿©±â¼­ ÇÙ½ÉÀº ½ÇÁ¦·Î Canvas ÀÇ width³ª height °¡ º¯ÇÏÁö ¾Ê¾Æµµ ´ÜÁö °°Àº Å©±â·Î 
> ¼³Á¤¸¸ µÈ´ÙÇصµ Reset µÇ´Â ¹æ½ÄÀ̶ó´Â °ÍÀÌÁÒ. 
> 
> Canvas.reset() °°Àº API ¸¦ Á¦°øÇØÁÖ¸é ´õ ¸í½ÃÀûÀÌ°í ÁÁÀ» °Í °°Àºµ¥ °³¹ß Äڵ嵵 Á» 
> ½ß¶×¸Â¾ÆÁö°í º°·Î ÈǸ¢ÇÑ ÄÁ¼ÁÀÎ °Í °°Áö´Â ¾Ê¾Æ¼­ ¸»ÀÌÁÒ.  Ȥ½Ã ¿Ö ÀÌ·± ¸ÞÄ¿´ÏÁòÀ» äÅÃ
> Çß´ÂÁö ¾Æ½Ã´Â ºÐÀÌ ÀÖÀ¸½Ã¸é ÁÁ°Ú½À´Ï´Ù. 
> 
> ±×¸®°í ¹«¾ùº¸´Ù ´ÜÁö ¹æ½ÄÀÇ ¹®Á¦°¡ ¾Æ´Ñ canvas ÀÇ »çÀÌÁî°¡ º¯Çϸé reset ÀÌ µÇ±â ¶§¹®¿¡
> ¸¸¾à °íÁ¤Å©±â Canvas¸¦ »ç¿ëÇÏÁö ¾Ê´Â´Ù¸é ºê·¯¿ìÀúÀÇ Å©±â°¡ º¯Çϸé Ç×»ó ÇöÀç »óÅÂÀÇ 
> Canvas ¸¦ À¯ÁöÇϱâ À§Çؼ­ ´Ù½Ã±×·Á¾ßÇÏ´Â ºÎ´ã°¨ÀÌ ÀÖ½À´Ï´Ù. 
> 
> ±×·Á¾ßÇÏ´Â À̹ÌÁö°¡ º¹ÀâÇÒ °æ¿ì ÀÌ´Â ´õ¿í Å« ºÎ´ãÀÌ µÉ °Í °°½À´Ï´Ù. ¸¸¾à ÀÌ·¸°Ô reset 
> µÇÁö ¾Ê´Â´Ù¸é ¸®»çÀÌÁî·Î ÀÎÇؼ­ ºó °ø°£¸¸ ´Ù½Ã ±×¸®¸é µÉÅÙµ¥ ÇöÀçÀÇ canvas ±¸Á¶»ó 
> resize À̺¥Æ®¿¡ Àüü¸¦ ´Ù½Ã ±×¸®·Á¾ßÇÕ´Ï´Ù.
> 
> 
> 
> 
> ¿ì¼± Àú´Â ÀÌ Áú¹®À¸·Î ½ÃÀÛÇغ¾´Ï´Ù.^^
> 
> ±è¹ÎÅ µå¸². 
> 
> 
> ps : ¸ÞÀÏ Çü½ÄÀº SK Telecom ±èµµ¿Ï´ÔÀÇ ¾ç½ÄÀ» È°¿ëÇغýÀ´Ï´Ù. ^^
> 
> 
> # Kim Min Tae
> --------------------------------------
> Imageclick co.,Ltd
> http:// www.imageclick.com
> ibare77@gmail.com
> http://www.ibare.kr
> http://twitter/ibare
> Mobile: 010.8555.3198
> 

--
Sangwhan Moon <smoon@opera.com>, Opera Software ASA
Skype: innodb1 | Mobile: +372-5971-6147

Received on Wednesday, 17 November 2010 07:09:40 UTC