Stay organized with collections
Save and categorize content based on your preferences.
PointFEvaluator
open class PointFEvaluator : TypeEvaluator<PointF!>
This evaluator can be used to perform type interpolation between PointF
values.
Summary
Public methods |
open PointF! |
This function returns the result of linearly interpolating the start and end PointF values, with fraction representing the proportion between the start and end values.
|
Public constructors
Public methods
evaluate
open fun evaluate(
fraction: Float,
startValue: PointF!,
endValue: PointF!
): PointF!
This function returns the result of linearly interpolating the start and end PointF values, with fraction
representing the proportion between the start and end values. The calculation is a simple parametric calculation on each of the separate components in the PointF objects (x, y).
If PointFEvaluator(android.graphics.PointF)
was used to construct this PointFEvaluator, the object returned will be the reuse
passed into the constructor.
Parameters |
fraction |
Float: The fraction from the starting to the ending values |
startValue |
PointF!: The start PointF |
endValue |
PointF!: The end PointF |
Return |
PointF! |
A linear interpolation between the start and end values, given the fraction parameter. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# PointFEvaluator\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPointFEvaluator\n===============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/animation/PointFEvaluator \"View this page in Java\") \n\n```\nopen class PointFEvaluator : TypeEvaluator\u003cPointF!\u003e\n```\n\n|---|----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.animation.PointFEvaluator](#) |\n\nThis evaluator can be used to perform type interpolation between `PointF` values.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [PointFEvaluator](#PointFEvaluator())`()` Construct a PointFEvaluator that returns a new PointF on every evaluate call. |\n| [PointFEvaluator](#PointFEvaluator(android.graphics.PointF))`(`reuse:` `[PointF](../graphics/PointF.html#)!`)` Constructs a PointFEvaluator that modifies and returns `reuse` in [evaluate(float,android.graphics.PointF,android.graphics.PointF)](#evaluate(kotlin.Float,%20android.graphics.PointF,%20android.graphics.PointF)) calls. |\n\n| Public methods ||\n|------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [PointF](../graphics/PointF.html#)! | [evaluate](#evaluate(kotlin.Float,%20android.graphics.PointF,%20android.graphics.PointF))`(`fraction:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `startValue:` `[PointF](../graphics/PointF.html#)!`, `endValue:` `[PointF](../graphics/PointF.html#)!`)` This function returns the result of linearly interpolating the start and end PointF values, with `fraction` representing the proportion between the start and end values. |\n\nPublic constructors\n-------------------\n\n### PointFEvaluator\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPointFEvaluator()\n```\n\nConstruct a PointFEvaluator that returns a new PointF on every evaluate call. To avoid creating an object for each evaluate call, [PointFEvaluator.PointFEvaluator(android.graphics.PointF)](#PointFEvaluator(android.graphics.PointF)) should be used whenever possible. \n\n### PointFEvaluator\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPointFEvaluator(reuse: PointF!)\n```\n\nConstructs a PointFEvaluator that modifies and returns `reuse` in [evaluate(float,android.graphics.PointF,android.graphics.PointF)](#evaluate(kotlin.Float,%20android.graphics.PointF,%20android.graphics.PointF)) calls. The value returned from [evaluate(float,android.graphics.PointF,android.graphics.PointF)](#evaluate(kotlin.Float,%20android.graphics.PointF,%20android.graphics.PointF)) should not be cached because it will change over time as the object is reused on each call.\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------|\n| `reuse` | [PointF](../graphics/PointF.html#)!: A PointF to be modified and returned by evaluate. |\n\nPublic methods\n--------------\n\n### evaluate\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun evaluate(\n fraction: Float, \n startValue: PointF!, \n endValue: PointF!\n): PointF!\n```\n\nThis function returns the result of linearly interpolating the start and end PointF values, with `fraction` representing the proportion between the start and end values. The calculation is a simple parametric calculation on each of the separate components in the PointF objects (x, y).\n\nIf [PointFEvaluator(android.graphics.PointF)](#PointFEvaluator(android.graphics.PointF)) was used to construct this PointFEvaluator, the object returned will be the `reuse` passed into the constructor.\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `fraction` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): The fraction from the starting to the ending values |\n| `startValue` | [PointF](../graphics/PointF.html#)!: The start PointF |\n| `endValue` | [PointF](../graphics/PointF.html#)!: The end PointF |\n\n| Return ||\n|-------------------------------------|------------------------------------------------------------------------------------------|\n| [PointF](../graphics/PointF.html#)! | A linear interpolation between the start and end values, given the `fraction` parameter. |"]]