org.shapelogic.imageutil
Class PixelArea

java.lang.Object
  extended by org.shapelogic.imageutil.PixelArea
All Implemented Interfaces:
PixelHandler

public class PixelArea
extends java.lang.Object
implements PixelHandler

SegmentArea holds the information.

Author:
Sami Badawi

Field Summary
protected  CPointDouble _aggregationPoint
           
protected  int _area
          Number of pixels.
protected  java.lang.Boolean _background
          Area is background, value null means not known.
protected  BBox _boundingBox
           
protected  boolean _gapInLine
          If any line in the area has a line that was split.
protected  int _startX
           
protected  int _startY
           
 
Constructor Summary
PixelArea(int x, int y)
           
 
Method Summary
 void addPoint(int x, int y)
           
 int getArea()
          Number of pixels.
 java.lang.Boolean getBackground()
           
 BBox getBoundingBox()
           
 IPoint2D getCenterPoint()
           
 int getStartX()
           
 int getStartY()
           
 boolean isGapInLine()
          If any line in the area has a line that was split.
 void putPixel(int x, int y, int color)
          Handle a pixel with a color and a coordinate.
 void setBackground(java.lang.Boolean background)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_aggregationPoint

protected CPointDouble _aggregationPoint

_startX

protected int _startX

_startY

protected int _startY

_boundingBox

protected BBox _boundingBox

_area

protected int _area
Number of pixels.


_background

protected java.lang.Boolean _background
Area is background, value null means not known.


_gapInLine

protected boolean _gapInLine
If any line in the area has a line that was split.

Constructor Detail

PixelArea

public PixelArea(int x,
                 int y)
Method Detail

addPoint

public void addPoint(int x,
                     int y)

getCenterPoint

public IPoint2D getCenterPoint()

getArea

public int getArea()
Number of pixels.


isGapInLine

public boolean isGapInLine()
If any line in the area has a line that was split.


getBoundingBox

public BBox getBoundingBox()

getBackground

public java.lang.Boolean getBackground()

setBackground

public void setBackground(java.lang.Boolean background)

putPixel

public void putPixel(int x,
                     int y,
                     int color)
Description copied from interface: PixelHandler
Handle a pixel with a color and a coordinate.

Specified by:
putPixel in interface PixelHandler

getStartX

public int getStartX()

getStartY

public int getStartY()


Copyright © 2009. All Rights Reserved.