public abstract class ScaleTransformationBase<T extends XSeriesRenderPassData> extends BaseRenderPassDataTransformation<T>
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.
renderPassData
Modifier | Constructor and Description |
---|---|
protected |
ScaleTransformationBase(java.lang.Class<T> rpdType,
double zeroLine)
Create new instance of
ScaleTransformationBase class. |
Modifier and Type | Method and Description |
---|---|
protected void |
applyTransformation()
Applies this transformation to associated series.
|
protected abstract void |
applyTransformationInternal(float currentDelta)
Applies transformation using
transformValues(float, FloatValues, FloatValues) method. |
protected void |
applyTransformationOnRenderPassDataChanged(com.scichart.core.model.FloatValues valuesToTransform)
Transforms valuesToTransform based on updated render pass data, according to current state of transformation.
|
float |
getZeroLineCoordinate()
Gets the value which determines the zero line in Y direction, from which scaling will be performed.
|
protected void |
onAnimationStartInternal()
Called on start of animation associated with current transformation
|
protected abstract void |
prepareDataToTransformation()
Prepares associated render pass data to transformation.
|
protected void |
saveOriginalData()
Saves original data from render pass data, which supposed to be changed during
RenderPassDataTransformationBase.applyTransformation() call. |
protected void |
transformValues(float currentDelta,
com.scichart.core.model.FloatValues valuesToTransform,
com.scichart.core.model.FloatValues originalCoordinates)
Transforms valuesToTransform based on original coordinates and currentDelta, to achieve scale transform.
|
getCurrentDelta, getCurrentTransformationValue, onAnimationEnd, onAnimationStart, setCurrentProgress, shouldUpdateOnRenderPassDataChanged
attachTo, detach, discardTransformation, isAttached, onInternalRenderPassDataChanged, onRenderPassDataChanged, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onRenderPassDataChanged, transform
protected ScaleTransformationBase(java.lang.Class<T> rpdType, double zeroLine)
ScaleTransformationBase
class.rpdType
- Type of associated render pass data.zeroLine
- Data value which determines the zero line in Y direction, from which scaling will be performed.public final float getZeroLineCoordinate()
protected void saveOriginalData()
RenderPassDataTransformationBase.applyTransformation()
call.saveOriginalData
in class RenderPassDataTransformationBase<T extends XSeriesRenderPassData>
protected void applyTransformationOnRenderPassDataChanged(com.scichart.core.model.FloatValues valuesToTransform)
valuesToTransform
- Values to transform.protected final void onAnimationStartInternal()
onAnimationStartInternal
in class BaseRenderPassDataTransformation<T extends XSeriesRenderPassData>
protected abstract void prepareDataToTransformation()
protected final void applyTransformation()
Note: This is used for animations purposes, so you need to take into account BaseRenderPassDataTransformation.getCurrentTransformationValue()
as well as BaseRenderPassDataTransformation.getCurrentDelta()
during implementing this.
applyTransformation
in class RenderPassDataTransformationBase<T extends XSeriesRenderPassData>
protected abstract void applyTransformationInternal(float currentDelta)
transformValues(float, FloatValues, FloatValues)
method. FloatValues to be supplied from inheritors.
First arg is values to transform. Second is to get original coordinates from.currentDelta
- The current delta value, due to which values will be transformed.protected void transformValues(float currentDelta, com.scichart.core.model.FloatValues valuesToTransform, com.scichart.core.model.FloatValues originalCoordinates)
currentDelta
- The current delta value, due to which values will be transformed.valuesToTransform
- Values to transform.originalCoordinates
- Original coordinates, which stored on last change of render pass data.