rive-cpp-legacy icon indicating copy to clipboard operation
rive-cpp-legacy copied to clipboard

Hide background

Open projectitis opened this issue 4 years ago • 3 comments

Hi there,

How do I hide the background of the artboard once loaded? I'd like to hide (make the color transparent, or remove it etc) by default, and allow the user to enable it manually if required.

artboard = file->artboard();
// What to do here to hide background?

Ideally of course the user would create their own assets with transparent background, but this isn't always possible if using third-party assets :)

Cheers, Peter

projectitis avatar Aug 25 '21 22:08 projectitis

Hi Peter, there's currently no way to do this at runtime. In the editor you can hide the background before you export. We can definitely add this feature by introducing something like:

artboard->hideBackground(true);

luigi-rosso avatar Oct 04 '21 22:10 luigi-rosso

Hi there i am also having trouble figuring this one out.

I have a Circle logo i have animated and cant export without a grey background which is very frustrating as i thought thats what it was for.

Seems like it should be a feature to easily export videos and gifs with transparent backgrounds. How do i do this in the editor? i dont know where to input the code either haha.

Is there any info regarding this? background removal software is not cutting it and looks terrible.

Cheers!

Liam

buttervault avatar Dec 15 '23 06:12 buttervault

As @luigi-rosso mentions above, you can set your artboard as transparent before you export from the editor. This works for me, but I haven't been able to do it at runtime.

projectitis avatar Dec 15 '23 08:12 projectitis