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


Python Resources.getHandImage方法代码示例

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


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

示例1: __init__

# 需要导入模块: import Resources [as 别名]
# 或者: from Resources import getHandImage [as 别名]
 def __init__(self):
     if "wxMac" in wx.PlatformInfo: # use 16X16 cursors for wxMac
         self.HandCursor = wx.CursorFromImage(Resources.getHand16Image())
         self.GrabHandCursor = wx.CursorFromImage(Resources.getGrabHand16Image())
     
         img = Resources.getMagPlus16Image()
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6)
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6)
         self.MagPlusCursor = wx.CursorFromImage(img)
     
         img = Resources.getMagMinus16Image()
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6)
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6)
         self.MagMinusCursor = wx.CursorFromImage(img)
     else: # use 24X24 cursors for GTK and Windows
         self.HandCursor = wx.CursorFromImage(Resources.getHandImage())
         self.GrabHandCursor = wx.CursorFromImage(Resources.getGrabHandImage())
     
         img = Resources.getMagPlusImage()
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 9)
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 9)
         self.MagPlusCursor = wx.CursorFromImage(img)
     
         img = Resources.getMagMinusImage()
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 9)
         img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 9)
         self.MagMinusCursor = wx.CursorFromImage(img)
开发者ID:KarthikSync,项目名称:3DPrinter,代码行数:29,代码来源:GUIMode.py

示例2:

# 需要导入模块: import Resources [as 别名]
# 或者: from Resources import getHandImage [as 别名]
## create all the Cursors, so they don't need to be created each time.
if "wxMac" in wx.PlatformInfo: # use 16X16 cursors for wxMac
    HandCursor = wx.CursorFromImage(Resources.getHand16Image())
    GrabHandCursor = wx.CursorFromImage(Resources.getGrabHand16Image())

    img = Resources.getMagPlus16Image()
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6)
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6)
    MagPlusCursor = wx.CursorFromImage(img)

    img = Resources.getMagMinus16Image()
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6)
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6)
    MagMinusCursor = wx.CursorFromImage(img)
else: # use 24X24 cursors for GTK and Windows
    HandCursor = wx.CursorFromImage(Resources.getHandImage())
    GrabHandCursor = wx.CursorFromImage(Resources.getGrabHandImage())

    img = Resources.getMagPlusImage()
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 9)
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 9)
    MagPlusCursor = wx.CursorFromImage(img)

    img = Resources.getMagMinusImage()
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 9)
    img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 9)
    MagMinusCursor = wx.CursorFromImage(img)


class GUIBase:
    """
开发者ID:Einstein-NTE,项目名称:einstein,代码行数:33,代码来源:GUIMode.py


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