MobileWill Posted February 18, 2016 Report Share Posted February 18, 2016 I tried to add a image to a container but it just crashed the micro. It could be memory issue but is there an example of how to do it? I did it the same as the generated code for buttons. Maybe the next studio release can add image to the draw options on containers like the button. Can I do a gradient draw for containers? It might an option for me instead of an image. I mean without making my own draw routine. Thanks. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted February 18, 2016 Report Share Posted February 18, 2016 Can you please post a minimum test case that allows us to reproduce the issue (the crash?). Please be sure to include the image that you are trying to use as well. Containers currently don't come with a built-in rendering routine for gradient backgrounds. Custom rendering is the way to go. Note that there are many different reason why uGFX comes with only so little built-in rendering routines. As a user of the µGFX library we really encourage you to write your own. It's usually really easy and straight forward. You can have a look at the button normal/default draw to see how gradients can be implemented using gdispBlendColors(). We are rewriting the corresponding guide that talks about that. We will include multiple examples on how to write different rendering routines (a very simple one and a more complex one): http://wiki.ugfx.org/index.php/Creating_a_custom_rendering_routine Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now