Class ScaleTransformationBase<T>
Base implementation for scale render pass data transformations within SciChart.
Note: This base class and inheritors are used for animations purposes. You can use it to just transform render pass data, it's not recommended though.
See Also: ScaleXyzTransformation, ScaleXyyTransformation, ScaleOhlcTransformation, ScaleXyTransformation, ScaleHlTransformationInheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public abstract class ScaleTransformationBase<T> extends BaseRenderPassDataTransformation<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
ScaleTransformationBase(Class<T> rpdType, double zeroLine)
Create new instance of ScaleTransformationBase class.
Declaration
protected ScaleTransformationBase(Class<T> rpdType, double zeroLine)
Parameters
Type | Name | Description |
---|---|---|
Class<T> | rpdType | Type of associated render pass data. |
double | zeroLine | Data value which determines the zero line in Y direction, from which scaling will be performed. |
Methods
applyTransformation()
Applies this transformation to associated series.
Note: This is used for animations purposes, so you need to take into account BaseRenderPassDataTransformation#getCurrentTransformationValue() as well as BaseRenderPassDataTransformation#getCurrentDelta() during implementing this.
Declaration
protected final void applyTransformation()
Overrides
applyTransformationInternal(float currentDelta)
Applies transformation using ScaleTransformationBase#transformValues(float, FloatValues, FloatValues) method. FloatValues to be supplied from inheritors. First arg is values to transform. Second is to get original coordinates from.
Declaration
protected abstract void applyTransformationInternal(float currentDelta)
Parameters
Type | Name | Description |
---|---|---|
float | currentDelta | The current delta value, due to which values will be transformed. |
applyTransformationOnRenderPassDataChanged(FloatValues valuesToTransform)
Transforms valuesToTransform based on updated render pass data, according to current state of transformation.
Declaration
protected void applyTransformationOnRenderPassDataChanged(FloatValues valuesToTransform)
Parameters
Type | Name | Description |
---|---|---|
FloatValues | valuesToTransform | Values to transform. |
getZeroLineCoordinate()
Gets the value which determines the zero line in Y direction, from which scaling will be performed.
Declaration
public final float getZeroLineCoordinate()
Returns
Type | Description |
---|---|
float | The zero line coordinate value. |
onAnimationStartInternal()
Called on start of animation associated with current transformation
Declaration
protected final void onAnimationStartInternal()
Overrides
prepareDataToTransformation()
Prepares associated render pass data to transformation.
Declaration
protected abstract void prepareDataToTransformation()
saveOriginalData()
Saves original data from render pass data, which supposed to be changed during #applyTransformation() call.
Declaration
protected void saveOriginalData()
Overrides
transformValues(float currentDelta, FloatValues valuesToTransform, FloatValues originalCoordinates)
Transforms valuesToTransform based on original coordinates and currentDelta, to achieve scale transform.
Declaration
protected void transformValues(float currentDelta, FloatValues valuesToTransform, FloatValues originalCoordinates)
Parameters
Type | Name | Description |
---|---|---|
float | currentDelta | The current delta value, due to which values will be transformed. |
FloatValues | valuesToTransform | Values to transform. |
FloatValues | originalCoordinates | Original coordinates, which stored on last change of render pass data. |