@@ -77,7 +77,6 @@ FT2Image::~FT2Image() {
7777 _buffer = NULL ;
7878}
7979
80-
8180Py::PythonClassObject<FT2Image> FT2Image::factory (int width, int height)
8281{
8382 Py::Callable class_type (type ());
@@ -90,16 +89,6 @@ Py::PythonClassObject<FT2Image> FT2Image::factory(int width, int height)
9089 return o;
9190}
9291
93-
94- // FT2Image::~FT2Image()
95- // {
96- // _VERBOSE("FT2Image::~FT2Image");
97- // delete [] _buffer;
98- // _buffer = NULL;
99- // delete _rgbCopy;
100- // delete _rgbaCopy;
101- // }
102-
10392void
10493FT2Image::resize (long width, long height)
10594{
@@ -209,7 +198,7 @@ PYCXX_VARARGS_METHOD_DECL(FT2Image, py_write_bitmap)
209198
210199void
211200FT2Image::draw_rect(unsigned long x0, unsigned long y0,
212- unsigned long x1, unsigned long y1)
201+ unsigned long x1, unsigned long y1)
213202{
214203 if (x0 > _width || x1 > _width ||
215204 y0 > _height || y1 > _height)
@@ -260,7 +249,7 @@ PYCXX_VARARGS_METHOD_DECL(FT2Image, py_draw_rect)
260249
261250void
262251FT2Image::draw_rect_filled(unsigned long x0, unsigned long y0,
263- unsigned long x1, unsigned long y1)
252+ unsigned long x1, unsigned long y1)
264253{
265254 x0 = std::min (x0, _width);
266255 y0 = std::min (y0, _height);
@@ -356,7 +345,7 @@ FT2Image::makeRgbCopy()
356345 return ;
357346 }
358347
359- if (! _rgbCopy.ptr ())
348+ if (_rgbCopy.isNone ())
360349 {
361350 _rgbCopy = factory (_width * 3 , _height);
362351 rgbCopy = Py::PythonClassObject<FT2Image>(_rgbCopy).getCxxObject ();
@@ -407,7 +396,7 @@ void FT2Image::makeRgbaCopy()
407396 return ;
408397 }
409398
410- if (_rgbaCopy.ptr ())
399+ if (_rgbaCopy.isNone ())
411400 {
412401 _rgbaCopy = factory (_width * 4 , _height);
413402 rgbaCopy = Py::PythonClassObject<FT2Image>(_rgbaCopy).getCxxObject ();
0 commit comments