Stay organized with collections
Save and categorize content based on your preferences.
PorterDuffColorFilter
open class PorterDuffColorFilter : ColorFilter
A color filter that can be used to tint the source pixels using a single color and a specific Porter-Duff composite mode
.
Summary
Public constructors |
Create a color filter that uses the specified color and Porter-Duff mode.
|
Public constructors
PorterDuffColorFilter
PorterDuffColorFilter(
color: Int,
mode: PorterDuff.Mode)
Create a color filter that uses the specified color and Porter-Duff mode.
Parameters |
color |
Int: The ARGB source color used with the specified Porter-Duff mode |
mode |
PorterDuff.Mode: The porter-duff mode that is applied This value cannot be null . |
Public methods
equals
open fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
hashCode
open fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
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,["# PorterDuffColorFilter\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPorterDuffColorFilter\n=====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/PorterDuffColorFilter \"View this page in Java\") \n\n```\nopen class PorterDuffColorFilter : ColorFilter\n```\n\n|---|---|---------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.graphics.ColorFilter](/reference/kotlin/android/graphics/ColorFilter) ||\n| | ↳ | [android.graphics.PorterDuffColorFilter](#) |\n\nA color filter that can be used to tint the source pixels using a single color and a specific [Porter-Duff composite mode](/reference/kotlin/android/graphics/PorterDuff).\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [PorterDuffColorFilter](#PorterDuffColorFilter(kotlin.Int,%20android.graphics.PorterDuff.Mode))`(`color:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `mode:` `[PorterDuff.Mode](/reference/kotlin/android/graphics/PorterDuff.Mode)`)` Create a color filter that uses the specified color and Porter-Duff mode. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### PorterDuffColorFilter\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPorterDuffColorFilter(\n color: Int, \n mode: PorterDuff.Mode)\n```\n\nCreate a color filter that uses the specified color and Porter-Duff mode.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `color` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The ARGB source color used with the specified Porter-Duff mode |\n| `mode` | [PorterDuff.Mode](/reference/kotlin/android/graphics/PorterDuff.Mode): The porter-duff mode that is applied This value cannot be `null`. |\n\n**See Also**\n\n- [android.graphics.Color](/reference/kotlin/android/graphics/Color)\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun equals(other: Any?): Boolean\n```\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | the reference object with which to compare. |\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if this object is the same as the obj argument; `false` otherwise. |\n\n### hashCode\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun hashCode(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |"]]