当前位置: 首页>>代码示例>>Python>>正文


Python Control.__init__方法代码示例

本文整理汇总了Python中kytten.widgets.Control.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Control.__init__方法的具体用法?Python Control.__init__怎么用?Python Control.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kytten.widgets.Control的用法示例。


在下文中一共展示了Control.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
    def __init__(self, width, height, disabled=False):
        """
        Blocks occupy a fixed width and height.

        @param width Width
        @param height Height
        """
        Control.__init__(self, width=width, height=height, disabled=disabled)
        self.color = None
        self.vertex_list = None
        self.is_dragging = False
开发者ID:Parashurama,项目名称:Kytten,代码行数:13,代码来源:resizable.py

示例2: __init__

# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
 def __init__(self, id, image, scale_size=None, anchor=ANCHOR_CENTER,
              palette=None, disabled=False, padding=0):
     Control.__init__(self, disabled=disabled)
     self.id = id
     self.image = image
     self.scale_size = scale_size
     self.anchor = anchor
     self.palette = palette
     self.sprite = None
     self.background = None
     self.highlight = None
     self.is_selected = False
     self.padding = padding
开发者ID:HieuLsw,项目名称:blobjob.editor,代码行数:15,代码来源:kwidgets.py

示例3: __init__

# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
 def __init__(self, texture, x=0, y=0, width=0, height=0, scale=1,
              on_resize=None):
     Control.__init__(self)
     self.texture = texture
     self.on_resize = on_resize
     self.texture_group = None
     self.texture_vlist = None
     self.resizer_vlist = None
     self.limits_vlist = None
     self.region = [x, y, width, height]
     self.limits = None
     self.scale = scale
     self.color = self.IMAGE_REGION_COLOR
     self.is_dragging = False
     self.corner = None
开发者ID:ChrisNeveu,项目名称:Kytten,代码行数:17,代码来源:image_region_placer.py

示例4: __init__

# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
 def __init__(self, color, width=16, height=16, id=None, on_select=None):
     Control.__init__(self, id=id)
     self.color = color
     self.content_width = width
     self.content_height = height
     self.swatch_label = None
     self.swatch = None
     self.vlist = None
     self.on_select = on_select
     self.select_dialog = None
     self.wheel = None
     self.red_input = None
     self.green_input = None
     self.blue_input = None
     self.slider = None
     self.accept_button = None
     self.cancel_button = None
开发者ID:kitanata,项目名称:Kytten,代码行数:19,代码来源:color_selector.py

示例5: __init__

# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
    def __init__(self, color, id=None, on_select=None):
	Control.__init__(self, id=id)
	self.alpha = color[3]
	self.tip_color = [0, 0, 0]
	self.on_select = on_select
	self.circle_vlist = None
	self.inner_circle_vlist = None
	self.inner_circle_bg_vlist = None
	self.colors_vlist = None
	self.triangle_vlist = None
	self.crosshair = None
	self.tri_angle = 0.0
	self.point = (0, 0)
	self.is_turning = False
	self.is_dragging = False
	self.center_x = 0
	self.center_y = 0
	self.pointer_i = 1.0
	self.pointer_j = 0.0
	self.vector_i = [0, 1]
	self.vector_j = [1, 0]
	self.point_a = [0, 0]

	self.set_color(color)
开发者ID:marky1991,项目名称:Kytten,代码行数:26,代码来源:color_selector.py


注:本文中的kytten.widgets.Control.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。