mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix outline drawing 1px width when outlineWidth = 0 (#46586)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46586 When Paint.strokeWidth is set to 0 its not actually 0 but "hairline mode" so the fix is just to make outline not draw at all when outlineWidth = 0 {F1879399325} Changelog: [Internal] Reviewed By: joevilches Differential Revision: D63136220 fbshipit-source-id: 81ef7ce0b72158c6b7c332191d332008c5a919b4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6e0e712c2a
commit
8ad4b7d0cf
+4
@@ -109,6 +109,10 @@ internal class OutlineDrawable(
|
||||
((outlinePaint.alpha / 255f) / (Color.alpha(outlineColor) / 255f) * 255f).roundToInt()
|
||||
|
||||
override fun draw(canvas: Canvas) {
|
||||
if (outlineWidth == 0f) {
|
||||
return
|
||||
}
|
||||
|
||||
pathForOutline.reset()
|
||||
|
||||
computedBorderRadius =
|
||||
|
||||
Reference in New Issue
Block a user