layer.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:uchroma 作者: cyanogen 项目源码 文件源码
def circle(self, row: int, col: int, radius: float,
               color: ColorType, fill: bool=False, alpha=1.0) -> 'Layer':
        """
        Draw a circle centered on the specified row and column,
        with the given radius.

        :param row: Center row of circle
        :param col: Center column of circle
        :param radius: Radius of circle
        :param color: Color to draw with
        :param fill: True if the circle should be filled

        :return: This frame instance
        """
        if fill:
            rr, cc = draw.circle(row, col, round(radius), shape=self.matrix.shape)
            self._draw(rr, cc, color, alpha)

        else:
            rr, cc, aa = draw.circle_perimeter_aa(row, col, round(radius), shape=self.matrix.shape)
            self._draw(rr, cc, color, aa)

        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号