komodo88 / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

Feature request: Add support for mirroring the display #295

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm building a projection clock using an SSD1306 OLED display and I need to 
mirror the screen (so I don't have to use an actual mirror).  I'm trying to 
figure out a way to modify U8glib to do this but it would be nice if mirroring 
as a feature by default.

I'm imagining a function such as 'u8g.setMirror(int orientation)' which takes a 
1 or 2 for horizontal/vertical mirroring.

Thanks for the great lib!  If I figure out how to do it I'll post the code but 
I'm absolutely terrible with C/C++.

Original issue reported on code.google.com by riskable on 6 Nov 2014 at 3:44

GoogleCodeExporter commented 9 years ago
hmm... this should not be too complicated. 
I see three options:
1. Change the HW setup of the display. Usually the OLED or LCD allows mirroring 
through hardware setup. This will be the most simplest implementation, but will 
be specific for your display.
2. Change the output sequence. Will be difficult for somed devices, and 
probably will only allow one kind of mirroring
3. Introduce a low level pixel transformation similar to the rotation. See 
u8g_rot.c as an example. This will probably be the most flexible an general 
approach.

I personally suggest 1. What is you display controller?

Original comment by olikr...@gmail.com on 6 Nov 2014 at 8:39

GoogleCodeExporter commented 9 years ago

Original comment by olikr...@gmail.com on 13 Dec 2014 at 5:57