View Raw SPL
/*****************************************************************************
*                                                                            *
*   COLSHADER.SPL Copyright (C) 2011 DSP Development Corporation             *
*                               All Rights Reserved                          *
*                                                                            *
*   Author:      Randy Race                                                  *
*                                                                            *
*   Synopsis:    Shades 3D data based on columns                             *
*                                                                            *
*   Revisions:   20 Jan 2011  RRR  Creation                                  *
*                                                                            *
*****************************************************************************/

#include 

#if @HELP_COLSHADER

    COLSHADER

    Purpose: Shades 3D data on a column basis.

    Syntax:  COLSHADER(win)

                    win - A window, the target window to shade.

    Returns: A series, the shading data used to shade the target.

    Example:
             W1: rand(10, 4);bar3d();setpmap(lred, yellow, lgreen, lblue)
             W2: colshader(w1)

             W1 contains a 10x4 array that is displayed as 3D bars with
             no gaps. W2 contains shading data that shades each column of
             W1. The SETPMAP functions specifies the column colors as
             lred, yellow, lgreen and lblue.

    Remarks:
             COLSHADER automatically shades the target window with the
             current color palette.

    See Also:
             Mappalette
             Rowshader
             Setpmap
             Shadewith
#endif


/* uniformally shade data based on columns */
colshader(w)
{
        shader(w, 0);
}