apps/examples/nxtext: Make line spacing configurable.

This commit is contained in:
Gregory Nutt 2017-01-03 12:26:13 -06:00
parent 13c158130d
commit 91fe324c72
2 changed files with 18 additions and 2 deletions

View File

@ -46,6 +46,15 @@ config EXAMPLES_NXTEXT_GLCACHE
---help---
Size of the glyph cache.
config EXAMPLES_NXTEXT_LINESPACING
int "Line spacing"
default 2
range 0 4
---help---
The vertical distance between lines is the sum of (1) the vertical
bounding box dimension of the font, and (2) this additional line
space. This value may be zero, but not negative.
comment "Example Color Configuration"
config EXAMPLES_NXTEXT_DEFAULT_COLORS

View File

@ -1,7 +1,7 @@
/****************************************************************************
* examples/nxtext/nxtext_internal.h
*
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -63,6 +63,14 @@
# define CONFIG_EXAMPLES_NXTEXT_VPLANE 0
#endif
/* Line spacing. Space (in rows) between lines. */
#ifdef CONFIG_EXAMPLES_NXTEXT_LINESPACING
# define LINE_SEPARATION CONFIG_EXAMPLES_NXTEXT_LINESPACING
#else
# define LINE_SEPARATION 2
#endif
/* Pixel depth. If none provided, pick the smallest enabled pixel depth */
#ifndef CONFIG_EXAMPLES_NXTEXT_BPP
@ -192,7 +200,6 @@
/* Sizes and maximums */
#define MAX_USECNT 255 /* Limit to range of a uint8_t */
#define LINE_SEPARATION 2 /* Space (in rows) between lines */
/****************************************************************************
* Public Types