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


Python Resources.getMagPlus16Image方法代码示例

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


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

示例1: __init__

# 需要导入模块: import Resources [as 别名]
# 或者: from Resources import getMagPlus16Image [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 getMagPlus16Image [as 别名]
version of the code.

"""

import wx
## fixme: events should live in their own module, so all of FloatCanvas
##        wouldn't have to be imported here.
import FloatCanvas, Resources
import numpy as N

## 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)
开发者ID:Einstein-NTE,项目名称:einstein,代码行数:33,代码来源:GUIMode.py


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