MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lwTranslatePixelsGroup

Function lwTranslatePixelsGroup

app/redis-6.2.6/src/lolwut5.c:54–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 */
53#include <stdio.h>
54void lwTranslatePixelsGroup(int byte, char *output) {
55 int code = 0x2800 + byte;
56 /* Convert to unicode. This is in the U0800-UFFFF range, so we need to
57 * emit it like this in three bytes:
58 * 1110xxxx 10xxxxxx 10xxxxxx. */
59 output[0] = 0xE0 | (code >> 12); /* 1110-xxxx */
60 output[1] = 0x80 | ((code >> 6) & 0x3F); /* 10-xxxxxx */
61 output[2] = 0x80 | (code & 0x3F); /* 10-xxxxxx */
62}
63
64/* Schotter, the output of LOLWUT of Redis 5, is a computer graphic art piece
65 * generated by Georg Nees in the 60s. It explores the relationship between

Callers 1

renderCanvasFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected