org.das2.graph.DataGeneralPathBuilder

introduce class to handle the task of creating GeneralPaths from a series of data points. We notice that creating the GeneralPath is plenty fast, and it's rendering it that is slow, so this will allow for future optimizations.

DataGeneralPathBuilder( org.das2.graph.DasAxis xaxis, org.das2.graph.DasAxis yaxis )


PROP_HISTOGRAM_MODE


addBreak

addBreak( ) → void

manually assert that the line script be interrupted at this point.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


addDataPoint

addDataPoint( boolean valid, Datum x, Datum y ) → void

add a data point to the curve.

Parameters

valid - if invalid, then break the line at this point.
x - the x value
y - the y value

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]

addDataPoint( boolean valid, double x, double y ) → void

finishThought

finishThought( ) → void

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getCadenceDouble

getCadenceDouble( ) → double

return the x cadence used as a double. This is should interpreted with the xaxis units and with isCadenceRatiometric.

Returns:

the cadence as a double, or 1e38 if there is no cadence.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getGeneralPath

getGeneralPath( ) → GeneralPath

get the generalPath for drawing. This may affect the path, when histogramMode is true.

Returns:

the generalPath for drawing.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPathIterator

getPathIterator( ) → PathIterator

get the path iterator.

Returns:

the path iterator.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPenPosition

getPenPosition( ) → Point2D

this is added so that the fill-to-zero code can add the returns.

Returns:

a java.awt.geom.Point2D

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getXUnits

getXUnits( ) → Units

return the units of the xaxis.

Returns:

the units of the xaxis.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getYUnits

getYUnits( ) → Units

return the units of the yaxis.

Returns:

the units of the yaxis.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


insertLineTo

insertLineTo( double x, double y ) → void

allow client to insert a point. This is used when trying to implement the fill-to-zero.

Parameters

x - pixel position
y - pixel position

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


isCadenceRatiometric

isCadenceRatiometric( ) → boolean

return true if the spacing in x has been identified as ratiometric (linearly spaced on a log axis). Note this is for the data, which is not necessarily the x axis setting.

Returns:

true if the data has been marked as ratiometric.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


isHistogramMode

isHistogramMode( ) → boolean

Returns:

boolean

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setCadence

setCadence( Datum sw ) → void

set the limit where two points are considered adjacent, or null if no check should be done.

Parameters

sw - a Datum

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setHistogramFillFlag

setHistogramFillFlag( ) → void

kludge to tell the builder to subtract a half cadence from the next point

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setHistogramMode

setHistogramMode( boolean histogramMode ) → void

Parameters

histogramMode - a boolean

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setModuloY

setModuloY( Datum mody ) → void

set the value for which two values of Y are equivalent.

Parameters

mody - a Datum

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setName

setName( String name ) → void

set the name of this DataGeneralPathBuilder when logging.

Parameters

name - "" or the name of the general path object in log messages.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]