{"id":206,"date":"2007-10-08T18:02:08","date_gmt":"2007-10-08T09:02:08","guid":{"rendered":"http:\/\/hangunsworld.com\/blog\/?p=206"},"modified":"2014-06-06T00:24:09","modified_gmt":"2014-06-05T15:24:09","slug":"flood-fill","status":"publish","type":"post","link":"http:\/\/hangunsworld.com\/blog\/206","title":{"rendered":"Flood Fill"},"content":{"rendered":"<div class=\"english\">I added floodFill() to the BMPFunctions.as, released yesterday. This method is an enhanced version of BitmapData.floodFill(). It changes pixels similar to the selected pixel&#8217;s color. And you can choose the contiguous option.<\/p>\n<p>You can download the BMPFunctions.as file in the following link.<\/p><\/div>\n<div class=\"korean\">\uc5b4\uc81c \uacf5\uac1c\ud55c BMPFunctions.as \ud074\ub798\uc2a4\uc5d0 BitmapData.floodFill() \uba54\uc18c\ub4dc\ub97c \uac1c\uc120\ud55c floodFill() \uba54\uc18c\ub4dc\ub97c \ucd94\uac00\ud588\uc2b5\ub2c8\ub2e4. \uc120\ud0dd\ud55c \uc88c\ud45c\uc758 \ud53d\uc140\uacfc \ube44\uc2b7\ud55c \uc0c9\uc0c1\uc758 \ud53d\uc140\ub4e4\uc744 \uc6d0\ud558\ub294 \uc0c9\uc0c1\uc73c\ub85c \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub610\ud55c \uc5f0\uc18d\ub41c \uc601\uc5ed\ub9cc \ubcc0\uacbd\ud558\ub3c4\ub85d \uc120\ud0dd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ud074\ub798\uc2a4 \ud30c\uc77c\uc740 \uc544\ub798 \ud398\uc774\uc9c0\uc5d0\uc11c BMPFunctions.as\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uba74 \ub429\ub2c8\ub2e4.<\/p><\/div>\n<div class=\"japanese\">\u6628\u65e5\u516c\u958b\u3057\u305fBMPFunctions.as\u30af\u30e9\u30b9\u306bfloodFill()\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u305f\u3093\u3067\u3059\u3002\u3053\u308c\u306fBitmapData.floodFill()\u30e1\u30bd\u30c3\u30c9\u3092\u6539\u5584\u3057\u305f\u306e\u3067\u3001\u3064\u306a\u304c\u3063\u3066\u3044\u308b\u9818\u57df\u3060\u3051\u3092\u5909\u66f4\u3059\u308b\u304b\u3001\u30a4\u30e1\u30fc\u30b8\u5168\u4f53\u7684\u306b\u5909\u66f4\u3059\u308b\u304b\u9078\u629e\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u306e\u30ea\u30f3\u30af\u306e\u30da\u30fc\u30b8\u3067 BMPFunctions.as\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p><\/div>\n<p><a href=\"http:\/\/hangunsworld.com\/code\/com\/hangunsworld\/util\/\">http:\/\/hangunsworld.com\/code\/com\/hangunsworld\/as3\/util\/<\/a><\/p>\n<p><embed src='http:\/\/hangunsworld.com\/blog\/wp-content\/uploads\/2007\/10\/floodfill.swf' width='550' height='450' \/><\/p>\n<pre lang=\"actionscript3\" line=\"1\">import com.hangunsworld.util.BMPFunctions;\r\n\r\nvar bd:BitmapData = new BitmapData(mc.width, mc.height, true, 0\u00d700000000);\r\nbd.draw(mc);\r\n\r\nvar bmp:Bitmap = new Bitmap(bd);\r\naddChild(bmp);\r\nbmp.x = mc.width;\r\n\r\nmc.buttonMode = true;\r\nmc.addEventListener(MouseEvent.CLICK, mcClicked);\r\nfunction mcClicked(evt:MouseEvent):void{\r\n\tbd.draw(mc);\r\n\tvar c:uint = bd.getPixel32(mc.mouseX, mc.mouseY);\r\n\tc1_txt.text = c.toString(16).toUpperCase();\r\n\tvar c2:uint = uint(\u201c0x\u201d + c2_txt.text);\r\n\tvar t:uint = Math.max(0, Math.min(255, uint(t_txt.text)));\r\n\tvar cont:Boolean = cont_cb.selected;\r\n\r\n\tbd = BMPFunctions.floodFill(bd, mc.mouseX, mc.mouseY, c2, t, cont);\r\n}<\/pre>\n<p><a href='http:\/\/hangunsworld.com\/blog\/wp-content\/uploads\/2007\/10\/floodfill.fla'>Download FLA<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I added floodFill() to the BMPFunctions.as, released yesterday. This method is an enhanced version of BitmapData.floodFill(). It changes pixels similar to the selected pixel&#8217;s color. And you can choose the contiguous option. You can download the BMPFunctions.as file in the following link. \uc5b4\uc81c \uacf5\uac1c\ud55c BMPFunctions.as \ud074\ub798\uc2a4\uc5d0 BitmapData.floodFill() \uba54\uc18c\ub4dc\ub97c \uac1c\uc120\ud55c floodFill() \uba54\uc18c\ub4dc\ub97c \ucd94\uac00\ud588\uc2b5\ub2c8\ub2e4. \uc120\ud0dd\ud55c \uc88c\ud45c\uc758 \ud53d\uc140\uacfc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[139,30,160,32],"class_list":["post-206","post","type-post","status-publish","format-standard","hentry","category-as3","tag-actionscript-30","tag-bitmapdata","tag-bmpfunctions","tag-color"],"_links":{"self":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/posts\/206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/comments?post=206"}],"version-history":[{"count":0,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/posts\/206\/revisions"}],"wp:attachment":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/media?parent=206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/categories?post=206"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/tags?post=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}