Skip to content

Releases: yairpatch/device_xiaomi_venus

Arrow-v13.0-venus-UNOFFICIAL-20220822-GAPPS

22 Aug 12:56
67a54f1

Choose a tag to compare

K2: re-draw rounded corner vector assets

The current vector drawable was generated from an auto-traced svg
that was based on screen_round_corner_{top,bottom}.png in MIUI's
product/overlay/DevicesOverlay.apk. The problem is that the curve
edge in the png file is rasterized, which results in a vector asset
with jagged edges.

Here is what I did to re-draw the curve in native vectorized format:
- Open the png in PhotoShop and crop a corner with 1:1 square ratio
- Use the pen tool in shape mode to trace the black mask
- The corners on Mi 11 series are not perfect arcs. I had to add at
  least two adjust points to fit the original curve of the png file
- Fill the path with black
- Export as .svg. I had to convert the color mode to RGB without
  merging layers because PhotoShop wouldn't let me export svg in
  grayscale
- Import the svg in Android Studio as a vector asset
- Grab the content of the drawable .xml

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I02dce2d6a48d060ed4f0f8befc6f24c06c8061d2