Esempio n. 1
0
    def _get_screen_graphics ( self ):
        control = self.control

        if is_mac:
            dc     = dc_for( wx.ClientDC( control ) )
            x, y   = control.GetPositionTuple()
            dx, dy = control.GetSizeTuple()
            while True:
                control = control.GetParent()
                if control is None:
                    break

                xw, yw   = control.GetPositionTuple()
                dxw, dyw = control.GetSizeTuple()
                dx, dy   = min( dx, dxw - x ), min( dy, dyw - y )
                x += xw
                y += yw

            dc.SetClippingRegion( 0, 0, dx, dy )

            return ( WxGraphics( dc ), 0, 0 )

        x, y = control.ClientToScreenXY( 0, 0 )

        return ( WxGraphics( dc_for( wx.ScreenDC() ) ), x, y )
Esempio n. 2
0
 def _get_temp_graphics ( self ):
     return WxGraphics(
         dc_for( set_standard_font( wx.ClientDC( self.control ) ) )
     )
Esempio n. 3
0
 def _get_graphics ( self ):
     return WxGraphics(
         dc_for( set_standard_font( wx.PaintDC( self.control ) ) )
     )