tcledit: Fix a few compile problems.

This commit is contained in:
Gregory Nutt 2016-11-10 13:08:04 -06:00
parent 8db489ed8c
commit 6bad8f7676
4 changed files with 47 additions and 39 deletions

View File

@ -198,15 +198,24 @@ typedef struct color_form_s color_form_t;
extern dev_pixel_t *g_devpixel_lut;
#if RGB_CUBE_SIZE < MIN_LUM_LEVELS
color_lum_t *g_pixel2um_lut;
extern color_lum_t *g_pixel2um_lut;
/* The following defines the "form" of each color in the g_unit_vector array */
const color_form_t g_wld_colorform[NCOLOR_FORMS];
extern const color_form_t g_wld_colorform[NCOLOR_FORMS];
/* These arrays map color forms into g_unit_vector array indices */
extern const enum unit_vector_index_e g_wld_bgrform_map[NCOLOR_FORMS];
extern const enum unit_vector_index_e g_wld_brgform_map[NCOLOR_FORMS];
extern const enum unit_vector_index_e g_wld_gbrform_map[NCOLOR_FORMS];
extern const enum unit_vector_index_e g_wld_grbform_map[NCOLOR_FORMS];
extern const enum unit_vector_index_e g_wld_rbgform_map[NCOLOR_FORMS];
extern const enum unit_vector_index_e g_wld_rgbform_map[NCOLOR_FORMS];
/* This array defines each color supported in the luminance model */
const color_lum_t g_unit_vector[NUNIT_VECTORS];
extern const color_lum_t g_unit_vector[NUNIT_VECTORS];
#endif
/****************************************************************************

View File

@ -191,7 +191,7 @@ static enum unit_vector_index_e wld_lum2colorform(color_lum_t * lum)
* Description: Convert an RGB-Luminance value into a pixel
****************************************************************************/
wld_pixel_t wld_color_lum2pixel(color_lum_t * lum)
trv_pixel_t wld_color_lum2pixel(color_lum_t * lum)
{
#if RGB_CUBE_SIZE < MIN_LUM_LEVELS
enum unit_vector_index_e uvndx;

View File

@ -58,40 +58,7 @@
* Private Data
****************************************************************************/
#if RGB_CUBE_SIZE < MIN_LUM_LEVELS
/* These arrays map color forms into g_unit_vector array indices */
static const enum unit_vector_index_e g_wld_bgrform_map[NCOLOR_FORMS] =
{
BLUE_NDX, GREENERBLUE_NDX, BLUEGREEN_NDX, LIGHTBLUE_NDX, GREY_NDX
};
static const enum unit_vector_index_e g_wld_brgform_map[NCOLOR_FORMS] =
{
BLUE_NDX, BLUEVIOLET_NDX, VIOLET_NDX, LIGHTBLUE_NDX, GREY_NDX
};
static const enum unit_vector_index_e g_wld_gbrform_map[NCOLOR_FORMS] =
{
GREEN_NDX, BLUERGREN_NDX, BLUEGREEN_NDX, LIGHTGREEN_NDX, GREY_NDX
};
static const enum unit_vector_index_e g_wld_grbform_map[NCOLOR_FORMS] =
{
GREEN_NDX, YELLOWGREEN_NDX, YELLOW_NDX, LIGHTGREEN_NDX, GREY_NDX
};
static const enum unit_vector_index_e g_wld_rbgform_map[NCOLOR_FORMS] =
{
RED_NDX, REDVIOLET_NDX, VIOLET_NDX, PINK_NDX, GREY_NDX
};
static const enum unit_vector_index_e g_wld_rgbform_map[NCOLOR_FORMS] =
{
RED_NDX, ORANGE_NDX, YELLOW_NDX, PINK_NDX, GREY_NDX
};
#else
#if RGB_CUBE_SIZE >= MIN_LUM_LEVELS
static color_rgb_t *g_devpixel_lut = NULL;
static float g_wld_cube2pixel;
#endif
@ -114,6 +81,38 @@ const color_form_t g_wld_colorform[NCOLOR_FORMS] =
{0.5773503, 0.5773503, 0.5773503}
};
/* These arrays map color forms into g_unit_vector array indices */
const enum unit_vector_index_e g_wld_bgrform_map[NCOLOR_FORMS] =
{
BLUE_NDX, GREENERBLUE_NDX, BLUEGREEN_NDX, LIGHTBLUE_NDX, GREY_NDX
};
const enum unit_vector_index_e g_wld_brgform_map[NCOLOR_FORMS] =
{
BLUE_NDX, BLUEVIOLET_NDX, VIOLET_NDX, LIGHTBLUE_NDX, GREY_NDX
};
const enum unit_vector_index_e g_wld_gbrform_map[NCOLOR_FORMS] =
{
GREEN_NDX, BLUERGREN_NDX, BLUEGREEN_NDX, LIGHTGREEN_NDX, GREY_NDX
};
const enum unit_vector_index_e g_wld_grbform_map[NCOLOR_FORMS] =
{
GREEN_NDX, YELLOWGREEN_NDX, YELLOW_NDX, LIGHTGREEN_NDX, GREY_NDX
};
const enum unit_vector_index_e g_wld_rbgform_map[NCOLOR_FORMS] =
{
RED_NDX, REDVIOLET_NDX, VIOLET_NDX, PINK_NDX, GREY_NDX
};
const enum unit_vector_index_e g_wld_rgbform_map[NCOLOR_FORMS] =
{
RED_NDX, ORANGE_NDX, YELLOW_NDX, PINK_NDX, GREY_NDX
};
/* This array defines each color supported in the luminance model */
const color_lum_t g_unit_vector[NUNIT_VECTORS] =

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/graphics/traveler/tools/tcledit/tcl_x11graphics.c
* apps/graphics/traveler/tools/tcledit/tcl_x11graphics.h
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>