Mercurial > font454
changeset 1:0c9d7f3334a0 draft
Add a readme
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Mon, 25 Sep 2017 15:34:26 +0200 |
| parents | f19f72547e25 |
| children | 5472a6006413 |
| files | README.rst font454.py |
| diffstat | 2 files changed, 13 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Mon Sep 25 15:34:26 2017 +0200 @@ -0,0 +1,13 @@ +``def text(buffer, string, x0=0, y0=0, color=0xffff, bgcolor=0, colors=None)`` + +Render the ``string`` as text onto the ``buffer`` starting at (``x0``, ``y0``) +and using the specified colors. + +The ``colors`` parameter must be a sequence of length four, representing the +colors to be used for rendering, starting from the foreground color, through +two shades for antialiasing, and ending with the background color. If ``None`` +is used, that color will be transparent. If ``colors`` is not specified, +``color`` and ``bgcolor`` will be used, without antialiasing. + +Characters outside the ASCII range are replaced with a box. Most control +characters (except for the newline), are ignored.
--- a/font454.py Mon Sep 25 15:31:21 2017 +0200 +++ b/font454.py Mon Sep 25 15:34:26 2017 +0200 @@ -15,20 +15,6 @@ def text(buffer, string, x0=0, y0=0, color=0xffff, bgcolor=0, colors=None): - """ - Render the ``string`` as text onto the ``buffer`` starting at - (``x0``, ``y0``) and using the specified colors. - - The ``colors`` parameter must be a sequence of length four, representing - the colors to be used for rendering, starting from the foreground color, - through two shades for antialiasing, and ending with the background color. - If ``None`` is used, that color will be transparent. If ``colors`` is not - specified, ``color`` and ``bgcolor`` will be used, without antialiasing. - - Characters outside the ASCII range are replaced with a box. Most control - characters (except for the newline), are ignored. - """ - font = memoryview(_FONT) if colors is None: colors = (color, color, bgcolor, bgcolor)
