All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class picture.RndColor

java.lang.Object
   |
   +----picture.PicPipe
           |
           +----picture.RndColor

public class RndColor
extends PicPipe
This PicPipe pipeline always ignores its source and returns a random color over half the area, random black or white over another quarter, and a solid color on the other quarter.

This code is (c) 1996 Leemon Baird <leemon@cs.cmu.edu>, http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely. If the code is modified, please state so in the comments.

Version:
1.0, 28 March 96
Author:
Leemon Baird

Variable Index

 o colVect
 o random
 o solidCol

Constructor Index

 o RndColor()

Method Index

 o BNF(int)
Return the BNF definition of parameters this object parses.
 o get(PicPipeList, Colors, double, double, double, double, double, double, double, double)
Return the color for a particular pixel given its size and location.
 o parse(Parser, int)
Parse the input file to get this object's parameters.
 o unparse(Unparser, int)
Output a description of this object that can be parsed with parse().

Variables

 o solidCol
 protected Colors solidCol
 o colVect
 protected ColorVector colVect
 o random
 protected Random random

Constructors

 o RndColor
 public RndColor()

Methods

 o BNF
 public String BNF(int lang)
Return the BNF definition of parameters this object parses.

Overrides:
BNF in class PicPipe
 o unparse
 public void unparse(Unparser u,
                     int lang)
Output a description of this object that can be parsed with parse().

Overrides:
unparse in class PicPipe
See Also:
Parsable
 o parse
 public Object parse(Parser p,
                     int lang) throws ParserException
Parse the input file to get this object's parameters.

Throws: ParserException
parser didn't find the required token
Overrides:
parse in class PicPipe
 o get
 public void get(PicPipeList source,
                 Colors color,
                 double x,
                 double y,
                 double z,
                 double t,
                 double dx,
                 double dy,
                 double dz,
                 double dt)
Return the color for a particular pixel given its size and location.

Overrides:
get in class PicPipe

All Packages  Class Hierarchy  This Package  Previous  Next  Index