Best Way to Dynamically Draw Images onto a GUI?

jucelicensing

#1

I would like to be able to draw multiple images directly into a section of my GUI. I know I could draw it directly into the GUI and just repaint it back to the original way before drawing a new image on top of it, but I was curious if there is a better way. Are there any structures I could use to place the image in that would make this more effective than just drawing them on the main GUI? Something that can be erased without affecting the main GUI? Or is the original way I suggested best?

Thanks.


#2

I think the best way would be either to add a transparent component on top, or have a look at TooltipWindow maybe?


#3

perhaps you just want to draw your images in some child components, and hide/show them when needed? If so the simple ImageComponent could be an option


#4

Thanks for the suggestions. As of now, the software holds images and the images can be opened, in their full size, in a new window, so what I’m basically trying to add is smaller previews of the image, so the user doesn’t have to open them in a new window, if they don’t want to.

I’ll look into your suggestions, thanks guys :slight_smile:


#5

Thanks, this is what I’m doing. I totally forgot about JUCE having this class. This seems to be working well.