Commit 78c6e341 authored by Anuj Verma's avatar Anuj Verma Committed by Werner Lemberg
Browse files

[ftsdf] Add function to display some information.

* src/ftsdf.c (write_header): New function.
parent 391a87f5
2020-08-22 Anuj Verma <anujv@iitbhilai.ac.in>
[ftsdf] Add function to display some information.
* src/ftsdf.c (write_header): New function.
2020-08-22 Anuj Verma <anujv@iitbhilai.ac.in>
[ftsdf] Handle some events.
......
......@@ -200,4 +200,55 @@
}
/* Print some information to the top left of the screen. */
/* The information contains various properties and values. */
static void
write_header( void )
{
static char header_string[512];
sprintf( header_string,
"Glyph Index: %d, Pt Size: %d, Spread: %d, Scale: %d",
status.glyph_index,
status.ptsize,
status.spread,
status.scale );
grWriteCellString( display->bitmap, 0, 0,
header_string, display->fore_color );
sprintf( header_string,
"Position Offset: %d,%d",
status.x_offset,
status.y_offset );
grWriteCellString( display->bitmap, 0, 1 * HEADER_HEIGHT,
header_string, display->fore_color );
sprintf( header_string,
"SDF Generated in: %.0f ms, From: %s",
status.generation_time,
status.use_bitmap ? "Bitmap" : "Outline" );
grWriteCellString( display->bitmap, 0, 2 * HEADER_HEIGHT,
header_string, display->fore_color );
sprintf( header_string,
"Filtering: %s, View: %s",
status.nearest_filtering ? "Nearest" : "Bilinear",
status.reconstruct ? "Reconstructing": "Raw" );
grWriteCellString( display->bitmap, 0, 3 * HEADER_HEIGHT,
header_string, display->fore_color );
if ( status.reconstruct )
{
/* Only print these in reconstruction mode. */
sprintf( header_string,
"Width: %.2f, Edge: %.2f",
status.width,
status.edge );
grWriteCellString( display->bitmap, 0, 4 * HEADER_HEIGHT,
header_string, display->fore_color );
}
}
/* END */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment