Skip to content

Commit 65a5d62

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Add KDoc documentation to Gradient.kt
Summary: Added KDoc documentation to the Gradient interface: - Interface documentation explaining CSS gradient to Android Shader conversion - getShader() method documentation with parameter and return descriptions - Added see references to implementations changelog: [internal] internal Reviewed By: javache Differential Revision: D91554867
1 parent fdbcfb6 commit 65a5d62

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/style

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/Gradient.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ package com.facebook.react.uimanager.style
99

1010
import android.graphics.Shader
1111

12+
/**
13+
* Interface representing a CSS gradient that can be rendered as an Android Shader.
14+
*
15+
* Implementations of this interface (such as [LinearGradient] and [RadialGradient]) convert CSS
16+
* gradient definitions into Android Shader objects for rendering backgrounds.
17+
*
18+
* @see LinearGradient
19+
* @see RadialGradient
20+
*/
1221
internal interface Gradient {
22+
/**
23+
* Creates an Android Shader for rendering this gradient.
24+
*
25+
* @param width The width of the area to fill
26+
* @param height The height of the area to fill
27+
* @return A Shader instance configured for this gradient
28+
*/
1329
fun getShader(width: Float, height: Float): Shader
1430
}

0 commit comments

Comments
 (0)