| Age | Commit message (Collapse) | Author |
|
Currently there are default argument values for the start and end
coordinates but the defaults don't really make any sense since there
is no reason to prefer the value 0 over any other. Remove them.
Similarly color currently defaults to 0xffff which isn't right. It
should default to the foreground colour.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
|
|
This is the API:
drawable.line(x1, y1, x2, y2, color)
The function has optimizations for the case of vertical or horizontal lines.
Signed-off-by: Kozova1 <mug66kk@gmail.com>
[daniel@redfelineninja.org.uk: Minor update to commit message]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
|
|
Signed-off-by: Joris Warmbier <siroj42@t-online.de>
|
|
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
|
|
The original approach is *really* bad at drawing vertical lines (it ends
up working a pixel at a time and works the chip select for each one.
Optimize both the pixel fill and the use of the line buffer. The result
is 20% faster for quarter screen fills, 3x for horizontal lines and 6x
for vertical lines.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
|
|
This allows some interesting manipulations of 2-bit images.
|
|
This is an incompatible change... older 2-bit images will need to be
re-encoded to display correctly.
|
|
sx is measured in pixels (2-bytes) and len(display.linebuffer) gives
a value in bytes so the divisor isn't right.
Whilst we are here let's make sure we use integer division too.
Fixes: #18
|
|
|
|
|
|
If an application crashes let's report it on the device so it can be
distinguished from a hang (if nothing else it should mean we get better
bug reports).
|
|
|
|
From here we can also bring colour to the launcher!
|
|
|
|
There's a bunch of different changes here but there are only really three
big wins. The biggest win comes from restructuring the 2-bit RLE decode
loop to avoid the inner function (~20%) but the switch to 16-bit writes in
_fill() and adoption of quick_write (e.g. no CS toggling) are also
note worthy (and about 5% each).
|
|
|
|
The main reason to reset the drawing context is so that it can be reset
before we call foreground() on an application.
|
|
|
|
This is a big one... more than 4x increase in font rendering performance!
|
|
|
|
|
|
|