À̹ÌÁö :: ¼öÇÐ :: ±¸¼Ó

À̹ÌÁö Å©±â Á¦ÇÑ¿¡ »ç¿ëµÇ´Â ¼öÇÐ È®Àå (¿¹ : Ãà¼ÒÆÇ)
Áö±Ý ´Ù¿î·Îµå

À̹ÌÁö :: ¼öÇÐ :: ±¸¼Ó ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Adam Kennedy
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~adamk/

À̹ÌÁö :: ¼öÇÐ :: ±¸¼Ó ű×


À̹ÌÁö :: ¼öÇÐ :: ±¸¼Ó ¼³¸í

À̹ÌÁö Å©±â Á¦ÇÑ¿¡ »ç¿ëµÇ´Â ½ºÄÉÀϸµ ¼öÇÐ (¿¹ : Ãà¼ÒÆÇ) Image :: Math :: ConstrainÀº À̹ÌÁö Å©±â Á¦ÇÑ (¿¹ : Ãà¼ÒÆÇ)¿¡¼­ »ç¿ëµÇ´Â ¼öÇÐ ÇÔ¼ö¸¦ È®ÀåÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. ½Ä ³ëÇÁ »ç¿ë À̹ÌÁö :: Math :: Constrain; # Math °´Ã¼ ¸¸µé±â My $ Math = Image :: Math :: Constrain-> New (64, 48); # ÀÓÀÇÀÇ À̹ÌÁöÀÇ Å©±â Á¶Á¤ °ª °¡Á® ¿À±â My $ image = my :: image-> load ( "myimage.jpg"); MY $ scaling = $ math-> constrain ($ À̹ÌÁö -> ³Êºñ, $ Image-> ³ôÀÌ); $ scaling -> {scale} == 1; # ¹è¿­¿¡¼­ È£Ãâ ÇÒ ¶§ ¼¼ °ªÀ» ¸ñ·ÏÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù. ($ ³Êºñ, $ height, $ scale) = $ math-> constrain (800, 600); # ³Êºñ ¸¸ $ math = image :: math :: constrain-> new (100, 0); # ³ôÀÌ ¸¸ $ math = image :: math :: constrain-> new (0, 100); # ¶Ç´Â Array Ref $ Math = Image :: Math :: Constrain-> New ()·Î µÎ °ªÀ» Á¦°ø ÇÒ ¼ö ÀÖ½À´Ï´Ù. # µ¿ÀÏÇÑ °ªÀ¸·Î ³ôÀÌ¿Í ³Êºñ¸¦ Á¦ÇÑ $ math = image :: math :: constrain -> new (100); # ¶È°°Àº ÀÏÀ»ÇÏ´Â ´Ù¾çÇÑ ¹®ÀÚ¿­ ¾ç½Ä $ math = image :: math :: constrain-> new ( 'constrain (800x600)'); $ math = image :: math :: constrain-> new ( '300x200'); $ math = image :: math :: constrain-> new ( '300w200h'); $ math = image :: math :: constrain-> new ( '100w'); $ math = image :: math :: constrain-> new ( '100h'); # serialises´Â 'constrain (800x600)'·Î µ¹¾Æ°©´Ï´Ù. #ÀÌ ¿É¼ÇÀ» »ç¿ëÇÏ¿© ¿øÇÏ´Â °æ¿ì °´Ã¼¸¦ ÀúÀåÇÒ ¼ö ÀÖ½À´Ï´Ù. MY $ string = $ math-> as_string; ¼¶³×ÀÏ°ú °°Àº À̹ÌÁö Å©±â¸¦ Á¦ÇÑÇÏ´Â ¿©·¯ °¡Áö ¸ðµâ ¹× ½Ã½ºÅÛÀÌ ÀÖ½À´Ï´Ù. À̰͵é Áß Çϳª´Â µ¶¸³ÀûÀ¸·Î µ¿ÀÏÇÑ ³í¸®¸¦ ±¸ÇöÇÕ´Ï´Ù. Áï, ³Êºñ ¹× / ¶Ç´Â ³ôÀÌ Á¦¾àÀÌ ÁÖ¾îÁö¸é À̹ÌÁö°¡ Á¦¾à Á¶°Çº¸´Ù Å«Áö È®ÀÎÇÏ°í À̹ÌÁö¸¦ ºñ·ÊÇÏ¿© À̹ÌÁö¸¦ ºñ·ÊÇÏ¿© Å©±â¸¦ Á¶Á¤ÇÏ¿© Constraints.of °úÁ¤¿¡ ÀûÇÕÇÏ°Ô ¸¸µå´Â °æ¿ì ¸ðµÎ ¾à°£ ´Ù¸¨´Ï´Ù. ±×¸®°í ÀϺδ ´Ù¸¥ »ç¶÷º¸´Ù ³´½À´Ï´Ù .Image :: Math :: constrain ÀÌÀÌ ³í¸®¸¦ ÇÑ ¹ø ±¸ÇöÇÏ°í ¿Ã¹Ù¸£°Ô ±¸ÇöÇϱâ À§ÇØ Æ¯º°È÷ ÀÛ¼ºµÇ¾ú½À´Ï´Ù. À̹ÌÁö Å©±â°¡ Á¦Çѵǰųª Ãà¼Ò µÈ ¸ðµâÀ̳ª ½ºÅ©¸³Æ®°¡ ¼öÇÐÀ» À§ÇØÀ̸¦ »ç¿ëÇؾßÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.


À̹ÌÁö :: ¼öÇÐ :: ±¸¼Ó °ü·Ã ¼ÒÇÁÆ®¿þ¾î