Add basic HTML table with zoomed glyphs w/o anti-aliasing

This commit is contained in:
Arvinder Bhathal 2017-06-21 01:56:37 -04:00
parent 96766b7a37
commit 35ca70a141
4 changed files with 55 additions and 2 deletions

View File

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>tests/web_interface-test</title>
<style>
img {
display: none;
}
table {
margin: 0 auto;
}
</style>
</head>
<body onload="draw();">
<table>
<tr>
<td><img src="65"></td>
<td><img src="65-2"></td>
</tr>
<tr>
<td><img src="66"></td>
<td><img src="66-2"></td>
</tr>
</table>
<script>
function draw() {
for (var i = 0; i < document.images.length; i++) {
canvas = document.createElement('canvas');
canvas.setAttribute('width', 300);
canvas.setAttribute('height', 300);
document.images[i].parentNode.insertBefore(canvas,document.images[i]);
ctx = canvas.getContext('2d');
ctx.imageSmoothingEnabled = false;
ctx.drawImage(document.images[i], 0, 0, 60, 60);
}
}
</script>
</body>
</html>

View File

@ -56,7 +56,7 @@ int main()
for (x = 0; x < bmp.width; x++)
{
byte = bmp.buffer[bmp.pitch * y + x];
BMP_SetPixelRGB(qdbmp, x, y, byte, byte, byte);
BMP_SetPixelRGB(qdbmp, x, y, 255 - byte, 255 - byte, 255 - byte);
BMP_CHECK_ERROR(stdout, 1);
}
}

View File

@ -56,7 +56,7 @@ int main()
for (x = 0; x < bmp.width; x++)
{
byte = bmp.buffer[bmp.pitch * y + x];
BMP_SetPixelRGB(qdbmp, x, y, byte, byte, byte);
BMP_SetPixelRGB(qdbmp, x, y, 255 - byte, 255 - byte, 255 - byte);
BMP_CHECK_ERROR(stdout, 1);
}
}

View File

@ -0,0 +1,5 @@
Compile with baseline:
gcc main.c qdbmp.c -I ./freetype-2.5.1/include -L ./freetype-2.5.1/objs -lfreetype -o baseline
Compile with test:
gcc main-2.c qdbmp.c -I ./freetype-2.8/include -L ./freetype-2.8/objs -lfreetype -o test