u8g2-copy/doc/u8g2.txt

111 lines
4.1 KiB
Plaintext
Raw Permalink Normal View History

2015-11-09 02:02:19 +08:00
2016-01-01 16:49:32 +08:00
U8glib V2: Name and project goals
https://github.com/olikraus/u8g2
U8g2 = Universal 8bit Graphics
[U]niversal: Support for many displays ans development platforms
[8]bit: Initial focus had been 8 bit microcontroller systems
[g]raphics": U8g2 is a graphics library with focus on monochrome graphics displays
[2]: Second generation and successor of u8glib
2016-04-28 01:18:13 +08:00
U8glib V2 Goals
- Support for monochrome LCDs and OLEDs
- Focus on "monochrome"
- Low memory footprint
2015-11-09 02:02:19 +08:00
U8glib V2: Features and Limitations
2015-11-14 19:32:43 +08:00
- Full Memory Buffer
2015-12-09 04:30:14 +08:00
- 3-wire-SPI
2016-04-29 01:13:02 +08:00
- Support for Arduino Libraries SPI and TWI
2015-11-14 19:32:43 +08:00
2015-11-09 02:02:19 +08:00
- Unicode Support
Unicode plane 0 (Basic Multilingual Plane, BMP, glyphs with 0x0000-0xffff)
is fully supported.
2016-04-28 01:18:13 +08:00
Limitation: Unicode planes > 0 are not supported
2015-11-09 02:02:19 +08:00
- UTF-8 Support
2 and 3 byte sequences are detected and handled.
Limitation:
2016-04-28 01:18:13 +08:00
Behavior for sequences with more than 3 bytes is unknown.
2015-11-28 03:23:32 +08:00
2016-01-01 16:49:32 +08:00
- Large number of fonts
2015-12-23 16:04:24 +08:00
- Compilation speed improved (font data)
2015-11-28 03:23:32 +08:00
2015-12-25 23:42:45 +08:00
- "Text only" sub library: U8x8
2015-11-28 03:23:32 +08:00
- Hardware supported display flip
2016-05-15 20:47:09 +08:00
- Better hardware support: Tested with avr, esp8266 and sam architectures.
2015-11-28 03:23:32 +08:00
2015-12-23 16:04:24 +08:00
u8g vs. u8g2
2016-04-28 01:18:13 +08:00
Major Changes (Code rework required)
2016-04-29 01:13:02 +08:00
- The name of the include file has changed: Use
#include "U8g2lib.h"
- The native type for pixel coordinates has changed to u8g2_uint_t
Use the following line to redefine this at the beginning of your code
typedef u8g2_uint_t u8g_uint_t;
2016-04-28 03:29:31 +08:00
- Old Arduino IDE 00xx (before 1.00) is not supported any more.
ARDUINO macro must be >= 100
2016-04-29 04:05:15 +08:00
- begin() must be called (this was optional in U8glib)
2015-12-23 17:44:20 +08:00
- constructor contains name of communicaton interface and
also contains the display orientation as first argument
2016-04-28 01:18:13 +08:00
- u8g2.drawStr90 does not exist any more, use
2016-01-03 20:20:48 +08:00
void u8g2_SetFontDirection(u8g2_t *u8g2, uint8_t dir);
2016-04-28 01:18:13 +08:00
- "P" versions of the string functions are not yet implemented.
This includes drawStrP(), getStrWidthP(), etc
Use the print function with the F() macro instead.
- In U8glib font transparency was defined in the .begin() statement. This is now
2016-06-27 02:50:12 +08:00
handled by setFontMode().
- Screen rotation is handled by the constructor in u8g2
2016-04-28 01:18:13 +08:00
The functions undoRotation, setRot90, setRot180 and setRot270 are
replaced by the first argument of the constructor
- Screen scaling is not there in u8g2
It is completly removed, there are no corresponding function in u8g2
for undoScale() and setScale2x2().
- setColorEntry(), setHiColor(), setHiColorByRGB(), setRGB: Not supported any more
(u8g2 focus are monochrome displays, use Ucglib instead)
- getMode(): Is not available any more because there is only one monochrome mode.
- setDefaultForegroundColor(), setDefaultBackgroundColor() and
setDefaultMidColor() are not required any more. These functions do not
2016-06-27 02:50:12 +08:00
exist in U8g2. Use setDrawColor() instead.
2016-04-28 01:18:13 +08:00
- getFontLineSpacing() and setFontLineSpacingFactor() are not supported any more.
2016-06-27 02:50:12 +08:00
- getStrPixelWidth() is replaced by getStrWidth()
- setHardwareBackup() not supported any more. Might be implemented later
2016-04-28 03:29:31 +08:00
- Cursor functions are not available. This includes:
setCursorFont(), setCursorStyle(), setCursorPos(), setCursorColor(),
enableCursor(), disableCursor(), drawCursor()
- Virtual screen handling is not supported:
setVirtualScreenDimension(), addToVirtualScreen()
2016-04-28 01:18:13 +08:00
Minor Changes (Code update might be required)
- U8g2 drawTriangle() expects signed arguments (u8glib expects unsigned arguments)
2016-04-28 03:29:31 +08:00
- U8g2 has different font names. Some of the old font names are known to u8g2 and are
mapped automatically. If the font name is unknown, please choose a different font from the font list.
2016-04-28 01:18:13 +08:00
Change Notes (No code change required)
- sleepOn(), sleepOff(): supported, but better user setPowerSave()
- setColorIndex() and getColorIndex() are renamed to setDrawColor() and
getDrawColor(). The old names are still supported.
- getFontAscent() and getFontDescent() are renamed to getAscent() and getDescent()
The old names are still supported.
2016-04-28 03:29:31 +08:00
- Signal names are renamed in the constructor calls:
U8glib sck == U8g2 clock
U8glib mosi == U8g2 data
U8glib a0 == U8g2 dc
2016-04-29 01:13:02 +08:00
- getHeight() renamed to getDisplayHeight(), old name still exists
- getWidth() renamed to getDisplayWidth(), old name still exists
2016-04-28 03:29:31 +08:00
2016-01-03 23:18:15 +08:00