Ticket #46584: enable-4.5.0-swig_fix.patch

File enable-4.5.0-swig_fix.patch, 2.1 KB (added by jjstickel (Jonathan Stickel), 10 years ago)
  • kiva/agg/src/affine_matrix.i

    diff -ur enable-4.5.0/kiva/agg/src/affine_matrix.i enable-4.5.0_swig_fix/kiva/agg/src/affine_matrix.i
    old new  
    157157    };
    158158};
    159159
    160 %pythoncode {
     160%pythoncode %{
    161161def is_sequence(arg):
    162162    try:
    163163        len(arg)
     
    184184        """
    185185        self.multiply(other)
    186186        return self
    187 }
     187%}
    188188
    189189%extend agg24::trans_affine
    190190{
  • kiva/agg/src/constants.i

    diff -ur enable-4.5.0/kiva/agg/src/constants.i enable-4.5.0_swig_fix/kiva/agg/src/constants.i
    old new  
    4444unsigned path_cmd(unsigned c);
    4545unsigned path_flags(unsigned c);
    4646
    47 %pythoncode {
     47%pythoncode %{
    4848
    4949#----------------------------------------------------------------------------
    5050#
     
    141141for key,value in interp_string_map.items():
    142142    interp_enum_map[value] = key
    143143
    144 }
     144%}
  • kiva/agg/src/hit_test.i

    diff -ur enable-4.5.0/kiva/agg/src/hit_test.i enable-4.5.0_swig_fix/kiva/agg/src/hit_test.i
    old new  
    2222}
    2323
    2424%pythoncode
    25 {
     25%{
    2626from numpy import shape, transpose, zeros, rank, reshape, int32
    2727
    2828def points_in_polygon(pts, poly_pts, use_winding=False):
     
    9292    else:
    9393        _agg.points_in_polygon(pts, poly_pts, results)
    9494    return results   
    95 }
     95%}
  • kiva/agg/src/rgba.i

    diff -ur enable-4.5.0/kiva/agg/src/rgba.i enable-4.5.0_swig_fix/kiva/agg/src/rgba.i
    old new  
    7474}
    7575
    7676
    77 %pythoncode {
     77%pythoncode %{
    7878def is_sequence(arg):
    7979    try:
    8080        len(arg)
     
    9090            if len(args) not in [3,4]:
    9191                raise ValueError, "array argument must be 1x3 or 1x4"
    9292        _Rgba.__init__(self,*args)
    93 }
     93%}
    9494
    9595%clear double r, double g, double b, double a;