# Class ShaderLegend

java.lang.Object
uk.ac.starlink.ttools.build.ShaderLegend

public class ShaderLegend extends Object
Generates a graphic in SVG format showing labelled colourmaps.

Since:
  1 Sep 2022
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ShaderLegend(int ncol)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static Shader[]`
`getAllShaders()`
Returns all the shaders generally available from Plot2 graphics.
`static void`
`main(String[] args)`
Main method invoked to write SVG to standard output.
`String`
`toSvg(Shader[] shaders)`
Returns an SVG representation of a legend labelling a given list of shaders.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ShaderLegend

public ShaderLegend(int ncol)
Constructor.

Parameters:
  `ncol` - number of columns for output

## Method Details

### toSvg

public String toSvg(Shader[] shaders)
Returns an SVG representation of a legend labelling a given list of shaders.

Parameters:
  `shaders` - shader list
Returns:
  SVG output

### getAllShaders

public static Shader[] getAllShaders()
Returns all the shaders generally available from Plot2 graphics.

Returns:
  somewhat ordered list of shaders

### main

public static void main(String[] args)
Main method invoked to write SVG to standard output. Use -help flag for usage information.

Parameters:
  `args` - flag array