Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 57ea055

Browse files
committed
Add a helpful comment.
svn path=/trunk/matplotlib/; revision=3783
1 parent f9cef5d commit 57ea055

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/ft2font.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,10 @@ FT2Image::py_as_str(const Py::Tuple & args) {
243243
_VERBOSE("FT2Image::as_str");
244244
args.verify_length(0);
245245

246-
return Py::asObject(PyString_FromStringAndSize((const char *)_buffer, _width*_height));
246+
return Py::asObject
247+
(PyString_FromStringAndSize((const char *)_buffer,
248+
_width*_height)
249+
);
247250
}
248251

249252
void FT2Image::makeRgbCopy() {
@@ -298,6 +301,8 @@ void FT2Image::makeRgbaCopy() {
298301
unsigned char *dst = _rgbaCopy->_buffer;
299302

300303
while (src != src_end) {
304+
// We know the array has already been zero'ed out in
305+
// the resize method, so we just skip over the r, g and b.
301306
dst += 3;
302307
*dst++ = *src++;
303308
}

0 commit comments

Comments
 (0)