mars: 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: I2b5e8257e0987f6a975a4bf4cc7d971587510c08
Showing
- overlay/frameworks/base/core/res/res/values/dimens.xml 5 additions, 2 deletionsoverlay/frameworks/base/core/res/res/values/dimens.xml
- overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml 20 additions, 0 deletions...rameworks/base/packages/SystemUI/res/drawable/rounded.xml
- overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_bottom.xml 20 additions, 0 deletions.../packages/SystemUI/res/drawable/rounded_corner_bottom.xml
- overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_top.xml 20 additions, 0 deletions...ase/packages/SystemUI/res/drawable/rounded_corner_top.xml
- overlay/frameworks/base/packages/SystemUI/res/values/config.xml 17 additions, 0 deletions...y/frameworks/base/packages/SystemUI/res/values/config.xml
Loading
Please register or sign in to comment