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


Python ui_utils.draw_alpha_mask函数代码示例

本文整理汇总了Python中widget.ui_utils.draw_alpha_mask函数的典型用法代码示例。如果您正苦于以下问题:Python draw_alpha_mask函数的具体用法?Python draw_alpha_mask怎么用?Python draw_alpha_mask使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: on_expose_event

 def on_expose_event(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     failed_pixbuf = self.failed_dpixbuf.get_pixbuf()
     draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height, "layoutLeft")
     pixbuf_offset_x = (rect.width - failed_pixbuf.get_width()) / 2 
     pixbuf_offset_y = (rect.height - failed_pixbuf.get_height()) / 2 - 50
     icon_x = rect.x + pixbuf_offset_x
     icon_y = rect.y + pixbuf_offset_y
     draw_pixbuf(cr, failed_pixbuf, icon_x, icon_y)
     
     text_y = icon_y + failed_pixbuf.get_height() + self.text_padding_y
     text_x = icon_x + self.text_padding_x
     
     _width, _height = get_content_size(self.prompt_text)
     
     self.text_rect = gtk.gdk.Rectangle(text_x - rect.x, text_y - rect.y,
                                        rect.x + rect.width -  text_x - pixbuf_offset_x,
                                        _height)
     
     if self.is_hover:        
         text_color = self.hover_text_dcolor.get_color()
     else:    
         text_color = self.normal_text_dcolor.get_color()
         
     draw_text(cr, self.prompt_text, text_x, text_y, self.text_rect.width, _height,
               text_color=text_color, 
               underline=True, 
               alignment=pango.ALIGN_CENTER)
     return True
开发者ID:maskegger,项目名称:deepin-music-player,代码行数:30,代码来源:ui.py

示例2: on_expose_event

 def on_expose_event(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width - 1, rect.height ,"layoutRight")
     
     draw_line(cr, (rect.x + 1, rect.y), 
               (rect.x + 1, rect.y + rect.height), "#b0b0b0")
     return False
开发者ID:electricface,项目名称:deepin-music-player,代码行数:8,代码来源:browser_manager.py

示例3: draw_mask

    def draw_mask(self, widget, event):    
        cr = widget.window.cairo_create()
        rect = widget.allocation
        start_x = rect.x + 2
        start_y = rect.y + 8

        for size, color_info in self.rect_left_list:
            draw_alpha_mask(cr, start_x, start_y, size, rect.height - 8, color_info)
            start_x += size
        if self.draw_right_mask_flag:    
            draw_alpha_mask(cr, start_x, start_y, 140, rect.height - 8, "layoutRight")
            start_x += 140
            last_width = rect.width - (start_x - rect.x)    
            draw_alpha_mask(cr, start_x, start_y, last_width - 2, rect.height - 8, "layoutLast")
        return False
开发者ID:andy071001,项目名称:deepin-music-player,代码行数:15,代码来源:ui.py

示例4: draw_category_list_mask

 def draw_category_list_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
开发者ID:quyf,项目名称:dmusic-plugin-NeteaseCloudMusic,代码行数:2,代码来源:netease_music_playlist.py

示例5: expose_entry_mask

 def expose_entry_mask(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x , rect.y, rect.width, rect.height, "toolbarEntry")
开发者ID:linuxmint17,项目名称:deepin-music,代码行数:4,代码来源:playlist.py

示例6: draw_mask

 def draw_mask(self, cr, x, y, w, h):    
     draw_alpha_mask(cr, x, y, w, h ,"layoutRight")
     return False
开发者ID:electricface,项目名称:deepin-music-player,代码行数:3,代码来源:radio_view.py

示例7: on_loginbox_expose

 def on_loginbox_expose(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y,
             rect.width, rect.height, "layoutMiddle")
开发者ID:legendtang,项目名称:dmusic-plugin-NeteaseCloudMusic,代码行数:5,代码来源:netease_music_list_item.py

示例8: draw_treeview_mask

 def draw_treeview_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, ("#FFFFFF", 0.9))
开发者ID:electricface,项目名称:deepin-music-player,代码行数:2,代码来源:preference.py

示例9: on_webcastbar_draw_mask

 def on_webcastbar_draw_mask(self, cr, x, y, w, h):    
     draw_alpha_mask(cr, x, y, w, h ,"layoutRight")
开发者ID:WilliamRen,项目名称:deepin-music-player,代码行数:2,代码来源:webcasts_browser.py

示例10: draw_filter_view_mask

 def draw_filter_view_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLast")
开发者ID:andy071001,项目名称:deepin-music-player,代码行数:2,代码来源:browser.py

示例11: expose_upper_box_mask

 def expose_upper_box_mask(self, widget, event):
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width - 2, rect.height, "layoutLast")
     return False
开发者ID:andy071001,项目名称:deepin-music-player,代码行数:5,代码来源:browser.py

示例12: plugins_view_draw_mask

 def plugins_view_draw_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutLeft")
开发者ID:WilliamRen,项目名称:deepin-music-player,代码行数:2,代码来源:plugins_view.py

示例13: draw_bg_mask

 def draw_bg_mask(self, widget, event):    
     cr = widget.window.cairo_create()
     rect = widget.allocation
     draw_alpha_mask(cr, rect.x, rect.y, rect.width, rect.height, "frameLight")
开发者ID:WilliamRen,项目名称:deepin-music-player,代码行数:4,代码来源:jobs_manager.py

示例14: on_radiobar_draw_mask

 def on_radiobar_draw_mask(self, cr, x, y, w, h):    
     draw_alpha_mask(cr, x, y, w, h ,"layoutRight")
开发者ID:electricface,项目名称:deepin-music-player,代码行数:2,代码来源:radio_browser.py

示例15: draw_view_mask

 def draw_view_mask(self, cr, x, y, width, height):
     draw_alpha_mask(cr, x, y, width, height, "layoutMiddle")
开发者ID:legendtang,项目名称:dmusic-plugin-NeteaseCloudMusic,代码行数:2,代码来源:netease_music_browser.py


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