示例#1
0
 def get_macport(dc):
     """
     Returns the Port or the CGContext of a wxDC (or child class) instance.
     """
     if 'GetCGContext' in dir(dc):
         ptr = dc.GetCGContext()
         return int(ptr)
     else:
         from macport import get_macport as _get_macport
         return _get_macport(str(dc.this))
示例#2
0
文件: __init__.py 项目: eteq/enable
def get_macport(dc):
    """
    Returns the m_macPort of a wxDC (or child class) instance.
    """
    return _get_macport(str(dc.this))