How would I go about making an image fade in and then out? I know an easy way to accomplish this is to just make several images with different opacities.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Use an AlphaComposite when painting the image:
Manipulate alpha value using deltaTime. So, in a given period of time you can fade in and out.
To fade out, you can start alphaValue from 1 and in every render call, subtract .1 until it reaches 0. For fade in, start with 0 and in every render call add .1 to the alphaValue until it reaches 1.