Jump to content

Pixmaps default color & orientation


spinnenfeind

Recommended Posts

Hello,

when I started to use pixmaps I thought that it is an area with undefined content which you have to clear manually.

As I learned, a new pixmap is initialized with the default background color GDISP_STARTUP_COLOR.

Is there a way to choose the default color of a new pixmap dynamically at runtime? I think it's a waste of runtime to fill it with GDISP_STARTUP_COLOR first, and then overwrite it with the actually desired background color.

Similar question for the orientation: I have to change the orientation of each pixmap that I create by using gdispGSetOrientation. Is there a way to set a default pixmap orientation?

 

Thanks, spinnenfeind

Link to comment
Share on other sites

  • 1 month later...

Hi,

Currently there's no way to modify the behavior of the default clearing & orientation of the pixmaps.
The startup color clearing behavior is implicitly implemented by the fact that a pixmap is just regular GDISP driver like any other "real" / "physical" display. The GDISP driver calls gdispInit() as part of the driver initialization - and therefore also when creating a new pixmap.
The orientation is simply hardcoded.

You can find the related code here: https://git.ugfx.io/uGFX/uGFX/src/master/src/gdisp/gdisp_pixmap.c#L113

Link to comment
Share on other sites

Thanks for your reply.

It's not a high priority topic, because as I found out my STM32 micro has lot of computing power and I get high refresh rates also when I have to overwrite with my desired color.

However, I just don't like the idea of having superfluous pixmap color filling - I always try to optimize, even it it's not necessary ?

Is there a way to completely disable the background color initializations of all GDISPs (including pixmaps) that I use in my project? I would prefer to take care of it on my own and just get an uninitialized piece of display buffer / pixmap RAM.

Link to comment
Share on other sites

  • 3 weeks later...

Thank you Joel,

this is very helpful for me. I did a local modification as recommended by you.

I don't know anything about software versioning systems. If I want to do a pull request, I guess I need to sign up for GIT or CVS or something like that!? I will have a look at it, but it will need some time.

Have a nice day!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...