~ubuntu-branches/ubuntu/trusty/python-enable/trusty

« back to all changes in this revision

Viewing changes to enthought/kiva/agg/src/x11/agg_bmp.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-04-06 19:28:09 UTC
  • mfrom: (8.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110406192809-20ikzqm4uj9qxwuu
Tags: 3.4.1-2
d/rules: fix pyshared directory path

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#include "x11/agg_bmp.h"
6
6
#include "x11/agg_platform_specific.h"
7
7
/* #include <agg_pixfmt_rgba32.h> */
 
8
#include "agg_pixfmt_rgb.h"
8
9
#include "agg_pixfmt_rgba.h"
9
10
#include "agg_color_rgba.h"
10
11
 
144
145
            }
145
146
      }
146
147
      break;
 
148
    case pix_format_rgb24:
 
149
      {
 
150
        pixfmt_rgb24 r((rendering_buffer&)m_rbuf_window);
 
151
 
 
152
        for (j=0;j<h;++j)
 
153
        {
 
154
          memcpy(data, r.row_ptr(h-j-1), w*3);
 
155
          data += w*3;
 
156
        }
 
157
      }
 
158
      break;
147
159
    default:
148
160
      fprintf(stderr,"pix_format %d not handled!\n",format);
149
161
    }
182
194
          }
183
195
      }
184
196
      break;
185
 
 
186
197
    default:
187
198
      Py_DECREF(str);
188
199
      PyErr_Format(PyExc_ValueError, "pix_format %d not handled", format);