207 views
in GUI Development by

Hi,

I would like to know how to create some kind of comet tail effect like the picture below, and the length of tail would increase and decrease when it's moving.

Regards,

Noah

1 Answer

0 votes
by
 
Best answer

Hello Chaunon,

using vector graphic you are free to draw any shapes even if they change at the runtime dynamically. However, the problem you will have, is the blur/glow effect. Drawing such effects dynamically at the runtime is not supported. Therefore, the unique way to get such effect is to prepare a set of images with different sizes for the tail:

Step 1: You will need to use a graphic editor (GIMP, Photoshop, Affinity Designer, etc.) to create the corresponding image assets.

Step 2: Add the images to Embedded Wizard as so-called bitmap resources.

Step 3: Depending on the actual size of the comet tail, select the right bitmap resource and display it in an Image view. For a short tail select the small bitmap, for large one the large version of the image asset.

For optimization purpose, I would recommend to configure the bitmap resources in the ALPHA8 format. Then you can modify the color of the glow/blur effect dynamically at the runtime and the bitmap resources will occupy less memory.

I hope, it helps you further.

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...