public static BufferedImage setBorderRadius(BufferedImage srcImage, int radius){ int width = srcImage.getWidth(); int height = srcImage.getHeight(); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d =
使用贝塞尔曲线, // 小于四个角 圆角 -(void)setbor{ NSString *str = @" couldn't fit this all in a comment to @lomanf's answer. So I'm adding it as an answer."; //计算字符高度 [Corner layoutHeightWithLable:self.label text:str]; /* 1.使用空白 view addSubView label 2.得到类似 q