A android project explained how to draw sketch smooth corner in android canvas
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gradle
.idea
app
art
gradle/wrapper
README.md
RoundConrner.iml
build.gradle
gradle.properties
gradlew
gradlew.bat
local.properties
settings.gradle
sketch-smooth-corner-android.iml

README.md

sketch-smooth-corner-android

1:1 实现 UI 设计师使用 Sketch 时候更为喜欢的 平滑圆角 的绘制算法,自定义 View | Layout | Drawable 需提取绘制函数重写绘制方法


An android project explained how to draw Sketch's smooth corner in Android Canvas.

You can customize drawing function in your custom view n' achieve cool animation effect.

Also you can try it in this web demo —— compare uploaded image with effect in Web Canvas

APK download

See in release page

Parameter comparison

If the round radius is bigger than 90% of the shortest edge ,there will be tiny difference between real value in Sketch and the output value in Andoird (But in that case,I would use Round Corners)

parameters

Gifs

gif1 gif2 gif3

Web version

sketch-smooth-corner-web

License

MIT License

Copyright (c) 2018 MartinRGB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.