cbr.ccv
Class Area

java.lang.Object
  extended bycbr.ccv.Area

public class Area
extends Object

This class represents a pixel area with a size and color.

Version:
"$Id: Area.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth

Field Summary
protected  int color_
          The color of the area.
protected  boolean flag_
          A flag that is used to determine whether an area was increased on the current scanline and must therefor be kept.
protected  Area redirect_
          The redirect area.
protected  int size_
          The size of the area.
 
Constructor Summary
Area(int color, int size)
          Creates an instance with the given color and size.
 
Method Summary
 void accumulate(Span span)
          Accumulates the pixels of the given span to the appropriate area.
 Area getArea()
           
 void init(int color, int size)
           
 boolean isFresh()
           
 boolean isRedirecting()
           
 void reset()
          Resets the flag to false.
 void setRedirect(Area area)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color_

protected int color_
The color of the area.


size_

protected int size_
The size of the area.


redirect_

protected Area redirect_
The redirect area.


flag_

protected boolean flag_
A flag that is used to determine whether an area was increased on the current scanline and must therefor be kept. By default the flag is false.

Constructor Detail

Area

public Area(int color,
            int size)
Creates an instance with the given color and size.

Parameters:
color - The color.
size - The size in pixels.
Method Detail

init

public void init(int color,
                 int size)

isRedirecting

public boolean isRedirecting()

setRedirect

public void setRedirect(Area area)

getArea

public Area getArea()

reset

public void reset()
Resets the flag to false. A value of true signals that the area must be carried over to the next scanline.


isFresh

public boolean isFresh()

accumulate

public void accumulate(Span span)
Accumulates the pixels of the given span to the appropriate area. Tricky, to say the least. If the given span does not already belong to an area then it is added to this area's root area.

Parameters:
span - The span to add to this area.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.