클래스와 샘플파일은 첨부파일을 다운받으세요
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
/** * isplayObject을 받아서 reflection 적용 후 BitmapData 반환 * @param mc – bitmap * @param mcW – bitmap width * @param mcH – bitmap height * @param graH – gradation height * @param graY – gradation y position * @param transparent – bitmap transparent * @param color- gradation area color * @param alpha – gradation first alpha * @return * */ public static function setReflection(mc:DisplayObject, mcW:int, mcH:int, graH:int, graY:int = 0, transparent:Boolean = false, color:int = 0×00000000, alpha:Number = 0.5):BitmapData |
클래스는 위와같은 구조로 되어있습니다
비트맵 이미지를 받아서 리플렉션(반사광) 적용 후 비트맵으로 반환합니다
파라미터를 화면으로 보실려면 아래 이미지를 참고하세요
사용법은 아래와같이 비트맵이미지와 설정값들을 넣고
반환된 비트맵을 사용하시면 됩니다.
1 2 |
var _ref_bit:BitmapData = Reflection.setReflection(bitmap, bitmap.width, bitmap.height, 100, 10, true, 0x00000000, 0.5); |