You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: devices/Ssd13xx/README.md
+58
Original file line number
Diff line number
Diff line change
@@ -27,3 +27,61 @@ The following connection types are supported by this binding.
27
27
28
28
-[X] I2C
29
29
-[ ] SPI
30
+
31
+
## Usage notes
32
+
33
+
There are two groups of drawing methods.
34
+
35
+
1. Various specialized drawing methods allowing to draw on screen pixel-by-pixel, like:
36
+
-````DrawPixel(...)````: draws one pixel
37
+
-````DrawHorizontalLine(...)````: draws a horizontal line
38
+
-````DrawVerticalLine(...)````: draws a vertical line
39
+
-````DrawFilledRectangle(...)````: draws a filled rectangle
40
+
-````DrawBitmap(...)````: draws a bitmap
41
+
-````DrawString(...)````: draws a string with preset font
42
+
43
+
Using these methods you do not need to care about any technique the driver uses to display
44
+
your drawing instructions.
45
+
46
+
2. Methods allowing to modify screen content by blocks of internal representation (screen buffer), like:
47
+
-````DrawDirectAligned(...)````: overwrites screen buffer with given content
48
+
-````ClearDirectAligned(...)````: clears out (with 0x00) given part of screen buffer
49
+
50
+
These methods allow faster (~100 times) display access but with some constraints.
51
+
- bitmaps handed over here must be in appropriate format (see SSD13xx docs for "GDDRAM" and "Horizontal addressing mode").
52
+
- no bit operations occure with existing buffer data (with pixels drawn via other means), the new data will overwrite the pixels "below" newly drawed content.
53
+
- the "y" coordinate and the bitmap height must be byte aligned with screen buffer (again, see above docs)
54
+
55
+
The use of two groups can be freely mixed (e.g. display text via ````DrawString(...)```` and displaying an image below via ````DrawDirectAligned(...)````)
56
+
57
+
Examples for 1. can be found in ````samples```` folder.
58
+
59
+
Example for 2. follows here.
60
+
61
+
````csharp
62
+
// There are superb online helpers like the one below which are able to
63
+
// create an appropriate byte array from an image in code use ready format.
0 commit comments