Skip to content
Snippets Groups Projects
Commit 931b3fa4 authored by Chenyang Zhong's avatar Chenyang Zhong Committed by FlowerSea0208
Browse files

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: default avatarChenyang Zhong <zhongcy95@gmail.com>
Change-Id: I2b5e8257e0987f6a975a4bf4cc7d971587510c08
parent d1f3740c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment