components/u8g2/doc/u8g2.txt

changeset 0
88d965579617
equal deleted inserted replaced
-1:000000000000 0:88d965579617
1
2 U8glib V2: Name and project goals
3
4 https://github.com/olikraus/u8g2
5
6 U8g2 = Universal 8bit Graphics
7
8 [U]niversal: Support for many displays ans development platforms
9 [8]bit: Initial focus had been 8 bit microcontroller systems
10 [g]raphics": U8g2 is a graphics library with focus on monochrome graphics displays
11 [2]: Second generation and successor of u8glib
12
13
14 U8glib V2 Goals
15
16 - Support for monochrome LCDs and OLEDs
17 - Focus on "monochrome"
18 - Low memory footprint
19
20
21 U8glib V2: Features and Limitations
22
23 - Full Memory Buffer
24 - 3-wire-SPI
25 - Support for Arduino Libraries SPI and TWI
26
27 - Unicode Support
28 Unicode plane 0 (Basic Multilingual Plane, BMP, glyphs with 0x0000-0xffff)
29 is fully supported.
30 Limitation: Unicode planes > 0 are not supported
31 - UTF-8 Support
32 2 and 3 byte sequences are detected and handled.
33 Limitation:
34 Behavior for sequences with more than 3 bytes is unknown.
35
36 - Large number of fonts
37
38 - Compilation speed improved (font data)
39
40 - "Text only" sub library: U8x8
41
42 - Hardware supported display flip
43
44 - Better hardware support: Tested with avr, esp8266 and sam architectures.
45
46
47 u8g vs. u8g2
48
49 Major Changes (Code rework required)
50
51 - The name of the include file has changed: Use
52 #include "U8g2lib.h"
53 - The native type for pixel coordinates has changed to u8g2_uint_t
54 Use the following line to redefine this at the beginning of your code
55 typedef u8g2_uint_t u8g_uint_t;
56
57 - Old Arduino IDE 00xx (before 1.00) is not supported any more.
58 ARDUINO macro must be >= 100
59 - begin() must be called (this was optional in U8glib)
60 - constructor contains name of communicaton interface and
61 also contains the display orientation as first argument
62 - u8g2.drawStr90 does not exist any more, use
63 void u8g2_SetFontDirection(u8g2_t *u8g2, uint8_t dir);
64 - "P" versions of the string functions are not yet implemented.
65 This includes drawStrP(), getStrWidthP(), etc
66 Use the print function with the F() macro instead.
67 - In U8glib font transparency was defined in the .begin() statement. This is now
68 handled by setFontMode().
69 - Screen rotation is handled by the constructor in u8g2
70 The functions undoRotation, setRot90, setRot180 and setRot270 are
71 replaced by the first argument of the constructor
72 - Screen scaling is not there in u8g2
73 It is completly removed, there are no corresponding function in u8g2
74 for undoScale() and setScale2x2().
75 - setColorEntry(), setHiColor(), setHiColorByRGB(), setRGB: Not supported any more
76 (u8g2 focus are monochrome displays, use Ucglib instead)
77 - getMode(): Is not available any more because there is only one monochrome mode.
78 - setDefaultForegroundColor(), setDefaultBackgroundColor() and
79 setDefaultMidColor() are not required any more. These functions do not
80 exist in U8g2. Use setDrawColor() instead.
81 - getFontLineSpacing() and setFontLineSpacingFactor() are not supported any more.
82 - getStrPixelWidth() is replaced by getStrWidth()
83 - setHardwareBackup() not supported any more. Might be implemented later
84 - Cursor functions are not available. This includes:
85 setCursorFont(), setCursorStyle(), setCursorPos(), setCursorColor(),
86 enableCursor(), disableCursor(), drawCursor()
87 - Virtual screen handling is not supported:
88 setVirtualScreenDimension(), addToVirtualScreen()
89
90 Minor Changes (Code update might be required)
91
92 - U8g2 drawTriangle() expects signed arguments (u8glib expects unsigned arguments)
93 - U8g2 has different font names. Some of the old font names are known to u8g2 and are
94 mapped automatically. If the font name is unknown, please choose a different font from the font list.
95
96 Change Notes (No code change required)
97
98 - sleepOn(), sleepOff(): supported, but better user setPowerSave()
99 - setColorIndex() and getColorIndex() are renamed to setDrawColor() and
100 getDrawColor(). The old names are still supported.
101 - getFontAscent() and getFontDescent() are renamed to getAscent() and getDescent()
102 The old names are still supported.
103 - Signal names are renamed in the constructor calls:
104 U8glib sck == U8g2 clock
105 U8glib mosi == U8g2 data
106 U8glib a0 == U8g2 dc
107 - getHeight() renamed to getDisplayHeight(), old name still exists
108 - getWidth() renamed to getDisplayWidth(), old name still exists
109
110

mercurial