国外互动作品4 — 颜色识别

Flash平台 everyinch 5329℃ 0评论

getColorBoundsRect(BitmapData.getColorBoundsRect 方法)
public getColorBoundsRect : Rectangle
确定位图图像中完全包含指定颜色的所有像素的矩形区域。例如,如果有一个源图像,并且希望确定包含非零 Alpha 通道的图像矩形,请传递作为参数。在整个图像中搜索像素的范围,该像素满足条件!= color。若要确定图像周围的空白区域,请传递以查找非空白像素的范围。
参数
mask:Number – 十六进制颜色值
color:Number – 十六进制颜色值
findColor:Boolean [可选] – 如果该值设置为 true,则返回图像中颜色值的范围。如果该值设置为 false,则返回图像中不存在此颜色的范围。默认值为 true
返回
flash.geom.Rectangle – 指定颜色的图像区域。

as4

分享&收藏

转载请注明:陈童的博客 » 国外互动作品4 — 颜色识别

喜欢 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
'; } if( dopt('d_footcode_b') ) echo dopt('d_footcode'); ?>