Fix DrawFastHLine for ST77xx, SSD1331 and SSD1351

DrawFastHLine uses FillRectangle(x,y,width,height,c), so height must be 1 to draw a horizontal line
This commit is contained in:
Alexander Bloss
2020-05-06 21:23:15 +02:00
committed by Daniel Esteban
parent 41694085a1
commit c3f3af5ffa
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ func (d *Device) DrawFastHLine(x0, x1, y int16, c color.RGBA) {
if x0 > x1 {
x0, x1 = x1, x0
}
d.FillRectangle(x0, y, x1-x0+1, y, c)
d.FillRectangle(x0, y, x1-x0+1, 1, c)
}
// FillScreen fills the screen with a given color
+1 -1
View File
@@ -251,7 +251,7 @@ func (d *Device) DrawFastHLine(x0, x1, y int16, c color.RGBA) {
if x0 > x1 {
x0, x1 = x1, x0
}
d.FillRectangle(x0, y, x1-x0+1, y, c)
d.FillRectangle(x0, y, x1-x0+1, 1, c)
}
// FillScreen fills the screen with a given color
+1 -1
View File
@@ -323,7 +323,7 @@ func (d *Device) DrawFastHLine(x0, x1, y int16, c color.RGBA) {
if x0 > x1 {
x0, x1 = x1, x0
}
d.FillRectangle(x0, y, x1-x0+1, y, c)
d.FillRectangle(x0, y, x1-x0+1, 1, c)
}
// FillScreen fills the screen with a given color
+1 -1
View File
@@ -207,7 +207,7 @@ func (d *Device) DrawFastHLine(x0, x1, y int16, c color.RGBA) {
if x0 > x1 {
x0, x1 = x1, x0
}
d.FillRectangle(x0, y, x1-x0+1, y, c)
d.FillRectangle(x0, y, x1-x0+1, 1, c)
}
// FillScreen fills the screen with a given color