You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(12) |
2
(3) |
3
(3) |
4
(3) |
5
(6) |
6
(3) |
7
|
8
(2) |
9
|
10
(1) |
11
(2) |
12
(1) |
13
(9) |
14
(5) |
15
(7) |
16
(2) |
17
|
18
|
19
(7) |
20
(1) |
21
(2) |
22
|
23
|
24
|
25
(3) |
26
|
27
|
28
|
29
(2) |
|
Revision: 4929 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4929&view=rev Author: mdboom Date: 2008年02月01日 12:15:59 -0800 (2008年2月01日) Log Message: ----------- Fix tick-alignment problem (Thanks J?195円?182円rgen Stenarson) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/lines.py trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2008年02月01日 19:15:20 UTC (rev 4928) +++ trunk/matplotlib/lib/matplotlib/lines.py 2008年02月01日 20:15:59 UTC (rev 4929) @@ -875,7 +875,7 @@ path, path_trans) - _tickhoriz_path = Path([[0.0, 0.5], [1.0, 0.5]]) + _tickhoriz_path = Path([[0.0, 0.0], [1.0, 0.0]]) def _draw_tickleft(self, renderer, gc, path, path_trans): offset = renderer.points_to_pixels(self._markersize) marker_transform = Affine2D().scale(-offset, 1.0) @@ -890,7 +890,7 @@ path, path_trans) - _tickvert_path = Path([[-0.5, 0.0], [-0.5, 1.0]]) + _tickvert_path = Path([[-0.0, 0.0], [-0.0, 1.0]]) def _draw_tickup(self, renderer, gc, path, path_trans): offset = renderer.points_to_pixels(self._markersize) marker_transform = Affine2D().scale(1.0, offset) Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年02月01日 19:15:20 UTC (rev 4928) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年02月01日 20:15:59 UTC (rev 4929) @@ -465,7 +465,7 @@ RendererAgg::draw_markers(const Py::Tuple& args) { typedef agg::conv_transform<PathIterator> transformed_path_t; typedef SimplifyPath<transformed_path_t> simplify_t; - typedef agg::conv_curve<transformed_path_t> curve_t; + typedef agg::conv_curve<simplify_t> curve_t; typedef agg::conv_stroke<curve_t> stroke_t; typedef agg::pixfmt_amask_adaptor<pixfmt, alpha_mask_type> pixfmt_amask_type; typedef agg::renderer_base<pixfmt_amask_type> amask_ren_type; @@ -488,15 +488,15 @@ trans *= agg::trans_affine_translation(0.0, (double)height); PathIterator marker_path(marker_path_obj); + bool marker_snap = should_snap(marker_path, marker_trans); transformed_path_t marker_path_transformed(marker_path, marker_trans); - curve_t marker_path_curve(marker_path_transformed); + simplify_t marker_path_simplified(marker_path_transformed, marker_snap, false, width, height); + curve_t marker_path_curve(marker_path_simplified); PathIterator path(path_obj); - bool snap = should_snap(path, trans); transformed_path_t path_transformed(path, trans); GCAgg gc = GCAgg(gc_obj, dpi); - simplify_t path_simplified(path_transformed, snap, false, width, height); - path_simplified.rewind(0); + path_transformed.rewind(0); facepair_t face = _get_rgba_face(face_obj, gc.alpha); @@ -549,7 +549,7 @@ agg::serialized_scanlines_adaptor_aa8::embedded_scanline sl; if (has_clippath) { - while (path_simplified.vertex(&x, &y) != agg::path_cmd_stop) { + while (path_transformed.vertex(&x, &y) != agg::path_cmd_stop) { pixfmt_amask_type pfa(*pixFmt, *alphaMask); amask_ren_type r(pfa); amask_aa_renderer_type ren(r); @@ -564,7 +564,7 @@ agg::render_scanlines(sa, sl, ren); } } else { - while (path_simplified.vertex(&x, &y) != agg::path_cmd_stop) { + while (path_transformed.vertex(&x, &y) != agg::path_cmd_stop) { if (face.first) { rendererAA->color(face.second); sa.init(fillCache, fillSize, x, y); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4928 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4928&view=rev Author: mdboom Date: 2008年02月01日 11:15:20 -0800 (2008年2月01日) Log Message: ----------- Merged revisions 4926-4927 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r4927 | mdboom | 2008年02月01日 14:13:09 -0500 (2008年2月01日) | 2 lines Fix doubly-included fonts in Postscript files. ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mathtext.py Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Name: svnmerge-integrated - /branches/v0_91_maint:1-4925 + /branches/v0_91_maint:1-4927 Modified: trunk/matplotlib/lib/matplotlib/mathtext.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mathtext.py 2008年02月01日 19:13:09 UTC (rev 4927) +++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008年02月01日 19:15:20 UTC (rev 4928) @@ -552,7 +552,6 @@ A generic base class for all font setups that use Truetype fonts (through ft2font) """ - basepath = os.path.join( get_data_path(), 'fonts' ) _fonts = {} class CachedFont: @@ -686,7 +685,7 @@ TruetypeFonts.__init__(self, *args, **kwargs) if not len(self.fontmap): for key, val in self._fontmap.iteritems(): - fullpath = os.path.join(self.basepath, 'ttf', val + ".ttf") + fullpath = findfont(val) self.fontmap[key] = fullpath self.fontmap[val] = fullpath @@ -913,7 +912,7 @@ TruetypeFonts.__init__(self, *args, **kwargs) if not len(self.fontmap): for key, name in self._fontmap.iteritems(): - fullpath = os.path.join(self.basepath, 'ttf', name + ".ttf") + fullpath = findfont(name) self.fontmap[key] = fullpath self.fontmap[name] = fullpath This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4927 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4927&view=rev Author: mdboom Date: 2008年02月01日 11:13:09 -0800 (2008年2月01日) Log Message: ----------- Fix doubly-included fonts in Postscript files. Modified Paths: -------------- branches/v0_91_maint/lib/matplotlib/mathtext.py Modified: branches/v0_91_maint/lib/matplotlib/mathtext.py =================================================================== --- branches/v0_91_maint/lib/matplotlib/mathtext.py 2008年02月01日 18:39:59 UTC (rev 4926) +++ branches/v0_91_maint/lib/matplotlib/mathtext.py 2008年02月01日 19:13:09 UTC (rev 4927) @@ -552,7 +552,6 @@ A generic base class for all font setups that use Truetype fonts (through ft2font) """ - basepath = os.path.join( get_data_path(), 'fonts' ) _fonts = {} class CachedFont: @@ -686,7 +685,7 @@ TruetypeFonts.__init__(self, *args, **kwargs) if not len(self.fontmap): for key, val in self._fontmap.iteritems(): - fullpath = os.path.join(self.basepath, 'ttf', val + ".ttf") + fullpath = findfont(val) self.fontmap[key] = fullpath self.fontmap[val] = fullpath @@ -913,7 +912,7 @@ TruetypeFonts.__init__(self, *args, **kwargs) if not len(self.fontmap): for key, name in self._fontmap.iteritems(): - fullpath = os.path.join(self.basepath, 'ttf', name + ".ttf") + fullpath = findfont(name) self.fontmap[key] = fullpath self.fontmap[name] = fullpath This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4926 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4926&view=rev Author: mdboom Date: 2008年02月01日 10:39:59 -0800 (2008年2月01日) Log Message: ----------- Merged revisions 4921-4925 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r4922 | mdboom | 2008年02月01日 13:02:14 -0500 (2008年2月01日) | 3 lines Backing out Glyph object leak fix, since it causes segfaults with PDF backend. Will look into it further. ........ r4924 | mdboom | 2008年02月01日 13:03:52 -0500 (2008年2月01日) | 2 lines Oops in last commit. ........ r4925 | mdboom | 2008年02月01日 13:36:38 -0500 (2008年2月01日) | 2 lines Hopefully fixing the Glyph memory leak properly now. ........ Modified Paths: -------------- trunk/matplotlib/src/ft2font.cpp trunk/matplotlib/src/ft2font.h Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Name: svnmerge-integrated - /branches/v0_91_maint:1-4920 + /branches/v0_91_maint:1-4925 Modified: trunk/matplotlib/src/ft2font.cpp =================================================================== --- trunk/matplotlib/src/ft2font.cpp 2008年02月01日 18:36:38 UTC (rev 4925) +++ trunk/matplotlib/src/ft2font.cpp 2008年02月01日 18:39:59 UTC (rev 4926) @@ -749,10 +749,6 @@ for (size_t i=0; i<glyphs.size(); i++) { FT_Done_Glyph( glyphs[i] ); } - - for (size_t i=0; i<gms.size(); i++) { - Py_DECREF(gms[i]); - } } int @@ -792,13 +788,8 @@ FT_Done_Glyph( glyphs[i] ); } - for (size_t i=0; i<gms.size(); i++) { - Py_DECREF(gms[i]); - } + glyphs.clear(); - glyphs.resize(0); - gms.resize(0); - return Py::Object(); } @@ -1020,26 +1011,6 @@ return xys; } - -char FT2Font::get_glyph__doc__[] = -"get_glyph(num)\n" -"\n" -"Return the glyph object with num num\n" -; -Py::Object -FT2Font::get_glyph(const Py::Tuple & args){ - _VERBOSE("FT2Font::get_glyph"); - - args.verify_length(1); - int num = Py::Int(args[0]); - - if ( (size_t)num >= gms.size()) - throw Py::ValueError("Glyph index out of range"); - - Py_INCREF(gms[num]); - return Py::asObject(gms[num]); -} - char FT2Font::get_num_glyphs__doc__[] = "get_num_glyphs()\n" "\n" @@ -1093,9 +1064,7 @@ size_t num = glyphs.size(); //the index into the glyphs list glyphs.push_back(thisGlyph); Glyph* gm = new Glyph(face, thisGlyph, num); - gms.push_back(gm); - Py_INCREF(gm); - return Py::asObject( gm); + return Py::asObject(gm); } char FT2Font::get_width_height__doc__[] = @@ -1763,8 +1732,6 @@ add_varargs_method("get_xys", &FT2Font::get_xys, FT2Font::get_xys__doc__); - add_varargs_method("get_glyph", &FT2Font::get_glyph, - FT2Font::get_glyph__doc__); add_varargs_method("get_num_glyphs", &FT2Font::get_num_glyphs, FT2Font::get_num_glyphs__doc__); add_keyword_method("load_char", &FT2Font::load_char, Modified: trunk/matplotlib/src/ft2font.h =================================================================== --- trunk/matplotlib/src/ft2font.h 2008年02月01日 18:36:38 UTC (rev 4925) +++ trunk/matplotlib/src/ft2font.h 2008年02月01日 18:39:59 UTC (rev 4926) @@ -30,11 +30,11 @@ void draw_bitmap(FT_Bitmap* bitmap, FT_Int x, FT_Int y); void write_bitmap(const char* filename) const; - void draw_rect(unsigned long x0, unsigned long y0, + void draw_rect(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1); - void draw_rect_filled(unsigned long x0, unsigned long y0, + void draw_rect_filled(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1); - + unsigned int get_width() const { return _width; }; unsigned int get_height() const { return _height; }; const unsigned char *const get_buffer() const { return _buffer; }; @@ -94,7 +94,6 @@ Py::Object set_size(const Py::Tuple & args); Py::Object set_charmap(const Py::Tuple & args); Py::Object set_text(const Py::Tuple & args, const Py::Dict & kwargs); - Py::Object get_glyph(const Py::Tuple & args); Py::Object get_kerning(const Py::Tuple & args); Py::Object get_num_glyphs(const Py::Tuple & args); Py::Object load_char(const Py::Tuple & args, const Py::Dict & kws); @@ -124,7 +123,6 @@ FT_Error error; std::vector<FT_Glyph> glyphs; std::vector<FT_Vector> pos; - std::vector<Glyph*> gms; double angle; double ptsize; double dpi; @@ -168,16 +166,16 @@ Glyph::init_type(); FT2Font::init_type(); - add_varargs_method("FT2Font", &ft2font_module::new_ft2font, + add_varargs_method("FT2Font", &ft2font_module::new_ft2font, "FT2Font"); - add_varargs_method("FT2Image", &ft2font_module::new_ft2image, + add_varargs_method("FT2Image", &ft2font_module::new_ft2image, "FT2Image"); initialize( "The ft2font module" ); } - - ~ft2font_module(); + + ~ft2font_module(); //static FT_Library ft2Library; - + private: Py::Object new_ft2font (const Py::Tuple &args); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4925 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4925&view=rev Author: mdboom Date: 2008年02月01日 10:36:38 -0800 (2008年2月01日) Log Message: ----------- Hopefully fixing the Glyph memory leak properly now. Modified Paths: -------------- branches/v0_91_maint/src/ft2font.cpp branches/v0_91_maint/src/ft2font.h Modified: branches/v0_91_maint/src/ft2font.cpp =================================================================== --- branches/v0_91_maint/src/ft2font.cpp 2008年02月01日 18:03:52 UTC (rev 4924) +++ branches/v0_91_maint/src/ft2font.cpp 2008年02月01日 18:36:38 UTC (rev 4925) @@ -749,10 +749,6 @@ for (size_t i=0; i<glyphs.size(); i++) { FT_Done_Glyph( glyphs[i] ); } - - for (size_t i=0; i<gms.size(); i++) { - Py_DECREF(gms[i]); - } } int @@ -792,13 +788,8 @@ FT_Done_Glyph( glyphs[i] ); } - for (size_t i=0; i<gms.size(); i++) { - Py_DECREF(gms[i]); - } + glyphs.clear(); - glyphs.resize(0); - gms.resize(0); - return Py::Object(); } @@ -1021,25 +1012,6 @@ } -char FT2Font::get_glyph__doc__[] = -"get_glyph(num)\n" -"\n" -"Return the glyph object with num num\n" -; -Py::Object -FT2Font::get_glyph(const Py::Tuple & args){ - _VERBOSE("FT2Font::get_glyph"); - - args.verify_length(1); - int num = Py::Int(args[0]); - - if ( (size_t)num >= gms.size()) - throw Py::ValueError("Glyph index out of range"); - - Py_INCREF(gms[num]); - return Py::asObject(gms[num]); -} - char FT2Font::get_num_glyphs__doc__[] = "get_num_glyphs()\n" "\n" @@ -1093,9 +1065,7 @@ size_t num = glyphs.size(); //the index into the glyphs list glyphs.push_back(thisGlyph); Glyph* gm = new Glyph(face, thisGlyph, num); - gms.push_back(gm); - Py_INCREF(gm); - return Py::asObject( gm); + return Py::asObject(gm); } char FT2Font::get_width_height__doc__[] = @@ -1763,8 +1733,6 @@ add_varargs_method("get_xys", &FT2Font::get_xys, FT2Font::get_xys__doc__); - add_varargs_method("get_glyph", &FT2Font::get_glyph, - FT2Font::get_glyph__doc__); add_varargs_method("get_num_glyphs", &FT2Font::get_num_glyphs, FT2Font::get_num_glyphs__doc__); add_keyword_method("load_char", &FT2Font::load_char, Modified: branches/v0_91_maint/src/ft2font.h =================================================================== --- branches/v0_91_maint/src/ft2font.h 2008年02月01日 18:03:52 UTC (rev 4924) +++ branches/v0_91_maint/src/ft2font.h 2008年02月01日 18:36:38 UTC (rev 4925) @@ -30,11 +30,11 @@ void draw_bitmap(FT_Bitmap* bitmap, FT_Int x, FT_Int y); void write_bitmap(const char* filename) const; - void draw_rect(unsigned long x0, unsigned long y0, + void draw_rect(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1); - void draw_rect_filled(unsigned long x0, unsigned long y0, + void draw_rect_filled(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1); - + unsigned int get_width() const { return _width; }; unsigned int get_height() const { return _height; }; const unsigned char *const get_buffer() const { return _buffer; }; @@ -94,7 +94,6 @@ Py::Object set_size(const Py::Tuple & args); Py::Object set_charmap(const Py::Tuple & args); Py::Object set_text(const Py::Tuple & args, const Py::Dict & kwargs); - Py::Object get_glyph(const Py::Tuple & args); Py::Object get_kerning(const Py::Tuple & args); Py::Object get_num_glyphs(const Py::Tuple & args); Py::Object load_char(const Py::Tuple & args, const Py::Dict & kws); @@ -124,7 +123,6 @@ FT_Error error; std::vector<FT_Glyph> glyphs; std::vector<FT_Vector> pos; - std::vector<Glyph*> gms; double angle; double ptsize; double dpi; @@ -168,16 +166,16 @@ Glyph::init_type(); FT2Font::init_type(); - add_varargs_method("FT2Font", &ft2font_module::new_ft2font, + add_varargs_method("FT2Font", &ft2font_module::new_ft2font, "FT2Font"); - add_varargs_method("FT2Image", &ft2font_module::new_ft2image, + add_varargs_method("FT2Image", &ft2font_module::new_ft2image, "FT2Image"); initialize( "The ft2font module" ); } - - ~ft2font_module(); + + ~ft2font_module(); //static FT_Library ft2Library; - + private: Py::Object new_ft2font (const Py::Tuple &args); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4924 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4924&view=rev Author: mdboom Date: 2008年02月01日 10:03:52 -0800 (2008年2月01日) Log Message: ----------- Oops in last commit. Modified Paths: -------------- branches/v0_91_maint/src/ft2font.cpp Modified: branches/v0_91_maint/src/ft2font.cpp =================================================================== --- branches/v0_91_maint/src/ft2font.cpp 2008年02月01日 18:03:04 UTC (rev 4923) +++ branches/v0_91_maint/src/ft2font.cpp 2008年02月01日 18:03:52 UTC (rev 4924) @@ -1036,7 +1036,7 @@ if ( (size_t)num >= gms.size()) throw Py::ValueError("Glyph index out of range"); - Py_INCREF(gm); + Py_INCREF(gms[num]); return Py::asObject(gms[num]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4923 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4923&view=rev Author: mdboom Date: 2008年02月01日 10:03:04 -0800 (2008年2月01日) Log Message: ----------- Backing out Glyph object leak fix, since it causes segfaults with PDF backend. Will look into it further. Modified Paths: -------------- trunk/matplotlib/src/ft2font.cpp Modified: trunk/matplotlib/src/ft2font.cpp =================================================================== --- trunk/matplotlib/src/ft2font.cpp 2008年02月01日 18:02:14 UTC (rev 4922) +++ trunk/matplotlib/src/ft2font.cpp 2008年02月01日 18:03:04 UTC (rev 4923) @@ -1036,6 +1036,7 @@ if ( (size_t)num >= gms.size()) throw Py::ValueError("Glyph index out of range"); + Py_INCREF(gms[num]); return Py::asObject(gms[num]); } @@ -1093,6 +1094,7 @@ glyphs.push_back(thisGlyph); Glyph* gm = new Glyph(face, thisGlyph, num); gms.push_back(gm); + Py_INCREF(gm); return Py::asObject( gm); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4922 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4922&view=rev Author: mdboom Date: 2008年02月01日 10:02:14 -0800 (2008年2月01日) Log Message: ----------- Backing out Glyph object leak fix, since it causes segfaults with PDF backend. Will look into it further. Modified Paths: -------------- branches/v0_91_maint/src/ft2font.cpp Modified: branches/v0_91_maint/src/ft2font.cpp =================================================================== --- branches/v0_91_maint/src/ft2font.cpp 2008年02月01日 17:36:48 UTC (rev 4921) +++ branches/v0_91_maint/src/ft2font.cpp 2008年02月01日 18:02:14 UTC (rev 4922) @@ -1036,6 +1036,7 @@ if ( (size_t)num >= gms.size()) throw Py::ValueError("Glyph index out of range"); + Py_INCREF(gm); return Py::asObject(gms[num]); } @@ -1093,6 +1094,7 @@ glyphs.push_back(thisGlyph); Glyph* gm = new Glyph(face, thisGlyph, num); gms.push_back(gm); + Py_INCREF(gm); return Py::asObject( gm); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4921 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4921&view=rev Author: mdboom Date: 2008年02月01日 09:36:48 -0800 (2008年2月01日) Log Message: ----------- Merged revisions 4919-4920 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r4920 | mdboom | 2008年02月01日 12:24:56 -0500 (2008年2月01日) | 3 lines Change "delete" to "delete []" for arrays on the heap. (It's technically more correct, but also pleases valgrind.) ........ Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Name: svnmerge-integrated - /branches/v0_91_maint:1-4918 + /branches/v0_91_maint:1-4920 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4920 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4920&view=rev Author: mdboom Date: 2008年02月01日 09:24:56 -0800 (2008年2月01日) Log Message: ----------- Change "delete" to "delete []" for arrays on the heap. (It's technically more correct, but also pleases valgrind.) Modified Paths: -------------- branches/v0_91_maint/src/_backend_agg.cpp Modified: branches/v0_91_maint/src/_backend_agg.cpp =================================================================== --- branches/v0_91_maint/src/_backend_agg.cpp 2008年02月01日 17:23:41 UTC (rev 4919) +++ branches/v0_91_maint/src/_backend_agg.cpp 2008年02月01日 17:24:56 UTC (rev 4920) @@ -1110,10 +1110,10 @@ newXCoords[k] += newXOffsets[k]; newYCoords[k] += newYOffsets[k]; } - delete xOffsets; - delete yOffsets; - delete newXOffsets; - delete newYOffsets; + delete[] xOffsets; + delete[] yOffsets; + delete[] newXOffsets; + delete[] newYOffsets; } for(q=0; q < Nverts; q++) @@ -1129,8 +1129,8 @@ Py_XDECREF(xCoords); Py_XDECREF(yCoords); Py_XDECREF(colors); - delete newXCoords; - delete newYCoords; + delete[] newXCoords; + delete[] newYCoords; //printf("#2: %d\n", clock()); return Py::Object(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4919 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4919&view=rev Author: mdboom Date: 2008年02月01日 09:23:41 -0800 (2008年2月01日) Log Message: ----------- Merged revisions 4915-4918 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r4916 | dsdale | 2008年01月31日 14:05:28 -0500 (2008年1月31日) | 2 lines fixed a bug in ticker, unicode string passed to tex ........ r4917 | dsdale | 2008年01月31日 14:14:20 -0500 (2008年1月31日) | 2 lines forgot to change unicode string to raw string ........ r4918 | mdboom | 2008年02月01日 12:19:02 -0500 (2008年2月01日) | 2 lines Fix reference leak on Glyph objects. ........ Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/src/ft2font.cpp Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Name: svnmerge-integrated - /branches/v0_91_maint:1-4914 + /branches/v0_91_maint:1-4918 Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008年02月01日 17:19:02 UTC (rev 4918) +++ trunk/matplotlib/CHANGELOG 2008年02月01日 17:23:41 UTC (rev 4919) @@ -1,3 +1,7 @@ +2008年02月01日 Fix reference leak in ft2font Glyph objects. - MGD + +2008年01月31日 Don't use unicode strings with usetex by default - DSD + 2008年01月31日 Fix text spacing problems in PDF backend with *some* fonts, such as STIXGeneral. Modified: trunk/matplotlib/src/ft2font.cpp =================================================================== --- trunk/matplotlib/src/ft2font.cpp 2008年02月01日 17:19:02 UTC (rev 4918) +++ trunk/matplotlib/src/ft2font.cpp 2008年02月01日 17:23:41 UTC (rev 4919) @@ -8,9 +8,9 @@ /** To improve the hinting of the fonts, this code uses a hack presented here: - + http://antigrain.com/research/font_rasterization/index.html - + The idea is to limit the effect of hinting in the x-direction, while preserving hinting in the y-direction. Since freetype does not support this directly, the dpi in the x-direction is set higher than @@ -20,7 +20,7 @@ hinting, whereas the global transform does not, this is documented behavior of freetype, and therefore hopefully unlikely to change. The freetype 2 tutorial says: - + NOTE: The transformation is applied to every glyph that is loaded through FT_Load_Glyph and is completely independent of any hinting process. This means that you won't get the same @@ -42,7 +42,7 @@ FT_Library _ft2Library; -// FT2Image::FT2Image() : +// FT2Image::FT2Image() : // _isDirty(true), // _buffer(NULL), // _width(0), _height(0), @@ -53,7 +53,7 @@ FT2Image::FT2Image(unsigned long width, unsigned long height) : _isDirty(true), - _buffer(NULL), + _buffer(NULL), _width(0), _height(0), _rgbCopy(NULL), _rgbaCopy(NULL) { @@ -61,10 +61,10 @@ resize(width, height); } -FT2Image::~FT2Image() { +FT2Image::~FT2Image() { _VERBOSE("FT2Image::~FT2Image"); - delete [] _buffer; - _buffer=NULL; + delete [] _buffer; + _buffer=NULL; delete _rgbCopy; delete _rgbaCopy; } @@ -151,7 +151,7 @@ } void -FT2Image::draw_rect(unsigned long x0, unsigned long y0, +FT2Image::draw_rect(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1) { if ( x0<0 || y0<0 || x1<0 || y1<0 || x0>_width || x1>_width || @@ -195,7 +195,7 @@ return Py::Object(); } -void FT2Image::draw_rect_filled(unsigned long x0, unsigned long y0, +void FT2Image::draw_rect_filled(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1) { x0 = CLAMP(x0, 0, _width); y0 = CLAMP(y0, 0, _height); @@ -209,7 +209,7 @@ } _isDirty = true; -} +} char FT2Image::draw_rect_filled__doc__[] = "draw_rect_filled(x0, y0, x1, y1)\n" @@ -245,7 +245,7 @@ args.verify_length(0); return Py::asObject - (PyString_FromStringAndSize((const char *)_buffer, + (PyString_FromStringAndSize((const char *)_buffer, _width*_height) ); } @@ -284,7 +284,7 @@ args.verify_length(0); makeRgbCopy(); - + return _rgbCopy->py_as_str(args); } @@ -321,7 +321,7 @@ args.verify_length(0); makeRgbaCopy(); - + return _rgbaCopy->py_as_str(args); } @@ -671,7 +671,7 @@ } // set a default fontsize 12 pt at 72dpi -#ifdef VERTICAL_HINTING +#ifdef VERTICAL_HINTING error = FT_Set_Char_Size( face, 12 * 64, 0, 72 * HORIZ_HINTING, 72 ); static FT_Matrix transform = { 65536 / HORIZ_HINTING, 0, 0, 65536 }; FT_Set_Transform( face, &transform, 0 ); @@ -829,7 +829,7 @@ int error = FT_Set_Char_Size( face, (long)(ptsize * 64), 0, (unsigned int)dpi, (unsigned int)dpi ); -#endif +#endif if (error) throw Py::RuntimeError("Could not set the fontsize"); return Py::Object(); @@ -1036,7 +1036,6 @@ if ( (size_t)num >= gms.size()) throw Py::ValueError("Glyph index out of range"); - Py_INCREF(gms[num]); return Py::asObject(gms[num]); } @@ -1078,7 +1077,7 @@ long charcode = Py::Long(args[0]), flags = Py::Long(FT_LOAD_FORCE_AUTOHINT); if (kwargs.hasKey("flags")) flags = Py::Long(kwargs["flags"]); - + int error = FT_Load_Char( face, (unsigned long)charcode, flags); if (error) @@ -1094,7 +1093,6 @@ glyphs.push_back(thisGlyph); Glyph* gm = new Glyph(face, thisGlyph, num); gms.push_back(gm); - Py_INCREF(gm); //todo: refcount correct? return Py::asObject( gm); } @@ -1659,7 +1657,7 @@ } } -char FT2Font::get_image__doc__ [] = +char FT2Font::get_image__doc__ [] = "get_image()\n" "\n" "Returns the underlying image buffer for this font object.\n"; @@ -1669,7 +1667,7 @@ if (image) { Py_XINCREF(image); return Py::asObject(image); - } + } throw Py::RuntimeError("You must call .set_text() before .get_image()"); } @@ -1684,7 +1682,7 @@ args.verify_length(1); std::string filename = Py::String(args[0]); - FT_Error error = + FT_Error error = FT_Attach_File(face, filename.c_str()); if (error) { @@ -1884,7 +1882,7 @@ d["KERNING_DEFAULT"] = Py::Int(FT_KERNING_DEFAULT); d["KERNING_UNFITTED"] = Py::Int(FT_KERNING_UNFITTED); d["KERNING_UNSCALED"] = Py::Int(FT_KERNING_UNSCALED); - + d["LOAD_DEFAULT"] = Py::Long(FT_LOAD_DEFAULT); d["LOAD_NO_SCALE"] = Py::Long(FT_LOAD_NO_SCALE); d["LOAD_NO_HINTING"] = Py::Long(FT_LOAD_NO_HINTING); @@ -1894,7 +1892,7 @@ d["LOAD_FORCE_AUTOHINT"] = Py::Long(FT_LOAD_FORCE_AUTOHINT); d["LOAD_CROP_BITMAP"] = Py::Long(FT_LOAD_CROP_BITMAP); d["LOAD_PEDANTIC"] = Py::Long(FT_LOAD_PEDANTIC); - d["LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH"] = + d["LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH"] = Py::Long(FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH); d["LOAD_NO_RECURSE"] = Py::Long(FT_LOAD_NO_RECURSE); d["LOAD_IGNORE_TRANSFORM"] = Py::Long(FT_LOAD_IGNORE_TRANSFORM); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4918 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4918&view=rev Author: mdboom Date: 2008年02月01日 09:19:02 -0800 (2008年2月01日) Log Message: ----------- Fix reference leak on Glyph objects. Modified Paths: -------------- branches/v0_91_maint/CHANGELOG branches/v0_91_maint/src/ft2font.cpp Modified: branches/v0_91_maint/CHANGELOG =================================================================== --- branches/v0_91_maint/CHANGELOG 2008年01月31日 19:14:20 UTC (rev 4917) +++ branches/v0_91_maint/CHANGELOG 2008年02月01日 17:19:02 UTC (rev 4918) @@ -1,3 +1,5 @@ +2008年02月01日 Fix reference leak in ft2font Glyph objects. - MGD + 2008年01月31日 Don't use unicode strings with usetex by default - DSD 2008年01月31日 Fix text spacing problems in PDF backend with *some* fonts, Modified: branches/v0_91_maint/src/ft2font.cpp =================================================================== --- branches/v0_91_maint/src/ft2font.cpp 2008年01月31日 19:14:20 UTC (rev 4917) +++ branches/v0_91_maint/src/ft2font.cpp 2008年02月01日 17:19:02 UTC (rev 4918) @@ -8,9 +8,9 @@ /** To improve the hinting of the fonts, this code uses a hack presented here: - + http://antigrain.com/research/font_rasterization/index.html - + The idea is to limit the effect of hinting in the x-direction, while preserving hinting in the y-direction. Since freetype does not support this directly, the dpi in the x-direction is set higher than @@ -20,7 +20,7 @@ hinting, whereas the global transform does not, this is documented behavior of freetype, and therefore hopefully unlikely to change. The freetype 2 tutorial says: - + NOTE: The transformation is applied to every glyph that is loaded through FT_Load_Glyph and is completely independent of any hinting process. This means that you won't get the same @@ -42,7 +42,7 @@ FT_Library _ft2Library; -// FT2Image::FT2Image() : +// FT2Image::FT2Image() : // _isDirty(true), // _buffer(NULL), // _width(0), _height(0), @@ -53,7 +53,7 @@ FT2Image::FT2Image(unsigned long width, unsigned long height) : _isDirty(true), - _buffer(NULL), + _buffer(NULL), _width(0), _height(0), _rgbCopy(NULL), _rgbaCopy(NULL) { @@ -61,10 +61,10 @@ resize(width, height); } -FT2Image::~FT2Image() { +FT2Image::~FT2Image() { _VERBOSE("FT2Image::~FT2Image"); - delete [] _buffer; - _buffer=NULL; + delete [] _buffer; + _buffer=NULL; delete _rgbCopy; delete _rgbaCopy; } @@ -151,7 +151,7 @@ } void -FT2Image::draw_rect(unsigned long x0, unsigned long y0, +FT2Image::draw_rect(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1) { if ( x0<0 || y0<0 || x1<0 || y1<0 || x0>_width || x1>_width || @@ -195,7 +195,7 @@ return Py::Object(); } -void FT2Image::draw_rect_filled(unsigned long x0, unsigned long y0, +void FT2Image::draw_rect_filled(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1) { x0 = CLAMP(x0, 0, _width); y0 = CLAMP(y0, 0, _height); @@ -209,7 +209,7 @@ } _isDirty = true; -} +} char FT2Image::draw_rect_filled__doc__[] = "draw_rect_filled(x0, y0, x1, y1)\n" @@ -245,7 +245,7 @@ args.verify_length(0); return Py::asObject - (PyString_FromStringAndSize((const char *)_buffer, + (PyString_FromStringAndSize((const char *)_buffer, _width*_height) ); } @@ -284,7 +284,7 @@ args.verify_length(0); makeRgbCopy(); - + return _rgbCopy->py_as_str(args); } @@ -321,7 +321,7 @@ args.verify_length(0); makeRgbaCopy(); - + return _rgbaCopy->py_as_str(args); } @@ -671,7 +671,7 @@ } // set a default fontsize 12 pt at 72dpi -#ifdef VERTICAL_HINTING +#ifdef VERTICAL_HINTING error = FT_Set_Char_Size( face, 12 * 64, 0, 72 * HORIZ_HINTING, 72 ); static FT_Matrix transform = { 65536 / HORIZ_HINTING, 0, 0, 65536 }; FT_Set_Transform( face, &transform, 0 ); @@ -829,7 +829,7 @@ int error = FT_Set_Char_Size( face, (long)(ptsize * 64), 0, (unsigned int)dpi, (unsigned int)dpi ); -#endif +#endif if (error) throw Py::RuntimeError("Could not set the fontsize"); return Py::Object(); @@ -1036,7 +1036,6 @@ if ( (size_t)num >= gms.size()) throw Py::ValueError("Glyph index out of range"); - Py_INCREF(gms[num]); return Py::asObject(gms[num]); } @@ -1078,7 +1077,7 @@ long charcode = Py::Long(args[0]), flags = Py::Long(FT_LOAD_FORCE_AUTOHINT); if (kwargs.hasKey("flags")) flags = Py::Long(kwargs["flags"]); - + int error = FT_Load_Char( face, (unsigned long)charcode, flags); if (error) @@ -1094,7 +1093,6 @@ glyphs.push_back(thisGlyph); Glyph* gm = new Glyph(face, thisGlyph, num); gms.push_back(gm); - Py_INCREF(gm); //todo: refcount correct? return Py::asObject( gm); } @@ -1659,7 +1657,7 @@ } } -char FT2Font::get_image__doc__ [] = +char FT2Font::get_image__doc__ [] = "get_image()\n" "\n" "Returns the underlying image buffer for this font object.\n"; @@ -1669,7 +1667,7 @@ if (image) { Py_XINCREF(image); return Py::asObject(image); - } + } throw Py::RuntimeError("You must call .set_text() before .get_image()"); } @@ -1684,7 +1682,7 @@ args.verify_length(1); std::string filename = Py::String(args[0]); - FT_Error error = + FT_Error error = FT_Attach_File(face, filename.c_str()); if (error) { @@ -1884,7 +1882,7 @@ d["KERNING_DEFAULT"] = Py::Int(FT_KERNING_DEFAULT); d["KERNING_UNFITTED"] = Py::Int(FT_KERNING_UNFITTED); d["KERNING_UNSCALED"] = Py::Int(FT_KERNING_UNSCALED); - + d["LOAD_DEFAULT"] = Py::Long(FT_LOAD_DEFAULT); d["LOAD_NO_SCALE"] = Py::Long(FT_LOAD_NO_SCALE); d["LOAD_NO_HINTING"] = Py::Long(FT_LOAD_NO_HINTING); @@ -1894,7 +1892,7 @@ d["LOAD_FORCE_AUTOHINT"] = Py::Long(FT_LOAD_FORCE_AUTOHINT); d["LOAD_CROP_BITMAP"] = Py::Long(FT_LOAD_CROP_BITMAP); d["LOAD_PEDANTIC"] = Py::Long(FT_LOAD_PEDANTIC); - d["LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH"] = + d["LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH"] = Py::Long(FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH); d["LOAD_NO_RECURSE"] = Py::Long(FT_LOAD_NO_RECURSE); d["LOAD_IGNORE_TRANSFORM"] = Py::Long(FT_LOAD_IGNORE_TRANSFORM); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.