本文整理汇总了Python中color.Color.cyan方法的典型用法代码示例。如果您正苦于以下问题:Python Color.cyan方法的具体用法?Python Color.cyan怎么用?Python Color.cyan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类color.Color
的用法示例。
在下文中一共展示了Color.cyan方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from color import Color [as 别名]
# 或者: from color.Color import cyan [as 别名]
def __init__(self, position, color=Color.cyan()):
"""
:type position: Vector
:type color: Color
"""
self.position = position
self.color = color
示例2: draw_point
# 需要导入模块: from color import Color [as 别名]
# 或者: from color.Color import cyan [as 别名]
def draw_point(self, point, color=Color.cyan()):
"""
:type point: Vector
:type color: Color
:return: None
"""
if 0 <= point.x < self.width and 0 <= point.y < self.height:
self.put_pixel(point.x, point.y, color)
示例3: __init__
# 需要导入模块: from color import Color [as 别名]
# 或者: from color.Color import cyan [as 别名]
def __init__(self, pixels, width, height):
self.pixels = pixels
self.width = width
self.height = height
self.canvas = Canvas(width, height, pixels)
# setup key handlers
key_esc = 27
self.handlers = {
key_esc: self.exit
}
self.v1 = Vertex(Vector(0, 0), Color.cyan())
self.v2 = Vertex(Vector(300, 100), Color.red())
self.v3 = Vertex(Vector(200, 300), Color.green())
示例4: __init__
# 需要导入模块: from color import Color [as 别名]
# 或者: from color.Color import cyan [as 别名]
def __init__(self, position: Vector, normal: Vector, u: float, v: float, color: Color = Color.cyan()):
self.position = position
self.normal = normal
self.u = u
self.v = v
self.color = color