An image zoom component ZoomImage that I am developing that supports Compose encountered problems when adapting to GlideImage.
Because ContentScale.None needs to be supported, and the user can also drag to view content that cannot be seen at first, GlideImage needs to add a clipToBounds: Boolean = true parameter to control not clip the content.
GlideImage needs to add the clipToBounds: Boolean = true parameter:
@Composable
public fun GlideImage(
model: Any?,
contentDescription: String?,
modifier: Modifier = Modifier,
alignment: Alignment = Alignment.Center,
contentScale: ContentScale = ContentScale.Fit,
alpha: Float = DefaultAlpha,
colorFilter: ColorFilter? = null,
clipToBounds: Boolean = true,
// TODO(judds): Consider using separate GlideImage* methods instead of sealed classes.
// See http://shortn/_x79pjkMZIH for an internal discussion.
loading: Placeholder? = null,
failure: Placeholder? = null,
transition: Transition.Factory? = null,
// TODO(judds): Consider defaulting to load the model here instead of always doing so below.
requestBuilderTransform: RequestBuilderTransform<Drawable> = { it },
)
Please also consider my request!
If can't add parameters to support my request, I will have to clone all the source code of GlideImage and modify the implementation myself, but this will not be able to synchronize the updates of GlideImage in time, resulting in a split situation, which I don't want to see.
An image zoom component ZoomImage that I am developing that supports Compose encountered problems when adapting to GlideImage.
Because ContentScale.None needs to be supported, and the user can also drag to view content that cannot be seen at first, GlideImage needs to add a
clipToBounds: Boolean = true
parameter to control not clip the content.The final modified location is at GlideModifier.kt at line 324:
The modification is as follows:
GlideImage needs to add the
clipToBounds: Boolean = true
parameter:Please also consider my request!
If can't add parameters to support my request, I will have to clone all the source code of GlideImage and modify the implementation myself, but this will not be able to synchronize the updates of GlideImage in time, resulting in a split situation, which I don't want to see.