mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: This diff adds an example in RNTester to verify that we can draw text on top of a colored background and non uniform border radius. As you can see from the test plan, the current code works well when: * There is only the background color * There is a background color and uniform cornerRadius * There are non uniform border radius but the background is transparent. The current code **does not** work when: * there is a background and non-uniform border radius * there is a background, uniform border radius and borderwidth The reason why this happens is because: * `RCTParagraphComponentView` draws the text in the View's main layer in the `drawRect` method * `RCTViewComponentView` has a method `invalidateLayer` that, when there are non-uniform border radii o there is a borderWidth, it creates an extra `CALayer` with an image as content and that layer is put on top of the base layer, covering the text. ## Changelog [Internal] - Add example to RNTester Reviewed By: cortinico Differential Revision: D61389317 fbshipit-source-id: 3e0a9e6c611190f90198a1b0b5855431b9f6ed12