Skip to content

Commit a7425ff

Browse files
committed
fixed tkagg blit problem
svn path=/trunk/matplotlib/; revision=1876
1 parent 4a595e0 commit a7425ff

File tree

9 files changed

+59
-32
lines changed

9 files changed

+59
-32
lines changed

CHANGELOG

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1+
2005-11-16 Changed the default default linewidth in rc to 1.0
2+
13
2005-11-16 Replaced agg_to_gtk_drawable with pure pygtk pixbuf code in
24
backend_gtkagg. When the equivalent is doe for blit, the
35
agg extension code will no longer be needed
46

7+
2005-11-16 Added a maxdict item to cbook to prevent caches from
8+
growing w/o bounds
9+
510
2005-11-15 Fixed a colorup/colordown reversal bug in finance.py --
611
Thanks Gilles
712

8-
2005-11-15 New entries should be added at the top 2005-08-14 Applied
9-
Jouni K Steppanen's boxplot patch SF patch#1349997 - JDH
13+
2005-11-15 Applied Jouni K Steppanen's boxplot patch SF patch#1349997
14+
- JDH
15+
16+
17+
2005-11-09 added axisbelow attr for Axes to determine whether ticks and such
18+
are above or below the actors
1019

1120
2005-11-08 Added Nicolas' irregularly spaced image patch
1221

22+
1323
2005-11-08 Deprecated HorizontalSpanSelector and replaced with
1424
SpanSelection that takes a third arg, direction. The
1525
new SpanSelector supports horizontal and vertical span
1626
selection, and the appropriate min/max is returned. - CM
1727

18-
2005-11-16 Added a maxdict item to cbook to prevent caches from
19-
growing w/o bounds
20-
21-
2005-11-09 added axisbelow attr for Axes to determine whether ticks and such
22-
are above or below the actors
23-
2428
2005-11-08 Added lineprops dialog for gtk
2529

2630
2005-11-03 Added FIFOBuffer class to mlab to support real time feeds
@@ -33,10 +37,9 @@
3337
2005-10-26 Added support for scatter legends - thanks John Gill
3438

3539
2005-10-20 Fixed image clipping bug that made some tex labels
36-
disappear. Closes bug - JDH
40+
disappear. JDH
3741

38-
2005-10-14 Removed aqrt from dvipng 1.6 alpha channel mask. Where did
39-
that come from?
42+
2005-10-14 Removed sqrt from dvipng 1.6 alpha channel mask.
4043

4144
2005-10-14 Added width kwarg to hist function
4245

@@ -54,6 +57,9 @@
5457
colorbar will follow suit. Fixed a bug introduced in
5558
0.84, in which contourf(...,colors=...) was broken - EF
5659

60+
=======================================================================
61+
2005-09-19 Released 0.84
62+
5763
2005-09-14 Added a new 'resize_event' which triggers a callback with a
5864
backend_bases.ResizeEvent object - JDH
5965

@@ -89,7 +95,7 @@
8995
Added two new keyword args (cspacing and clabels) that are
9096
only relevant for ContourMappable images - JSWHIT
9197

92-
2005-08-24 Fixes a PS image bug reported by Darren - JDH
98+
2005-08-24 Fixed a PS image bug reported by Darren - JDH
9399

94100
2005-08-23 colors.py: change hex2color() to accept unicode strings as well as
95101
normal strings. Use isinstance() instead of types.IntType etc - SC
@@ -118,7 +124,7 @@
118124

119125
2005-07-03 Fixed a bug related to TeX commands in backend_ps
120126

121-
2005-08-03 Fixed SVG images to respect uppoer and lower origins.
127+
2005-08-03 Fixed SVG images to respect upper and lower origins.
122128

123129
2005-08-03 Added flipud method to image and removed it from to_str.
124130

LICENSE/LICENSE

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LICENSE AGREEMENT FOR MATPLOTLIB 0.84
1+
LICENSE AGREEMENT FOR MATPLOTLIB 0.85
22
--------------------------------------
33

44
1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the
@@ -9,30 +9,30 @@ documentation.
99
2. Subject to the terms and conditions of this License Agreement, JDH
1010
hereby grants Licensee a nonexclusive, royalty-free, world-wide license
1111
to reproduce, analyze, test, perform and/or display publicly, prepare
12-
derivative works, distribute, and otherwise use matplotlib 0.84
12+
derivative works, distribute, and otherwise use matplotlib 0.85
1313
alone or in any derivative version, provided, however, that JDH's
1414
License Agreement and JDH's notice of copyright, i.e., "Copyright (c)
1515
2002-2005 John D. Hunter; All Rights Reserved" are retained in
16-
matplotlib 0.84 alone or in any derivative version prepared by
16+
matplotlib 0.85 alone or in any derivative version prepared by
1717
Licensee.
1818

1919
3. In the event Licensee prepares a derivative work that is based on or
20-
incorporates matplotlib 0.84 or any part thereof, and wants to
20+
incorporates matplotlib 0.85 or any part thereof, and wants to
2121
make the derivative work available to others as provided herein, then
2222
Licensee hereby agrees to include in any such work a brief summary of
23-
the changes made to matplotlib 0.84.
23+
the changes made to matplotlib 0.85.
2424

25-
4. JDH is making matplotlib 0.84 available to Licensee on an "AS
25+
4. JDH is making matplotlib 0.85 available to Licensee on an "AS
2626
IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
2727
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND
2828
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
29-
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.84
29+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.85
3030
WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
3131

3232
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
33-
0.84 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
33+
0.85 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
3434
LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
35-
MATPLOTLIB 0.84, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
35+
MATPLOTLIB 0.85, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
3636
THE POSSIBILITY THEREOF.
3737

3838
6. This License Agreement will automatically terminate upon a material
@@ -44,6 +44,6 @@ Licensee. This License Agreement does not grant permission to use JDH
4444
trademarks or trade name in a trademark sense to endorse or promote
4545
products or services of Licensee, or any third party.
4646

47-
8. By copying, installing or otherwise using matplotlib 0.84,
47+
8. By copying, installing or otherwise using matplotlib 0.85,
4848
Licensee agrees to be bound by the terms and conditions of this License
4949
Agreement.

TODO

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,4 +733,6 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
733733
-- John Gill's patch!
734734

735735
-- Fix latex texmanager caching bug that is preventing the cache from
736-
recognizing a font change
736+
recognizing a font change
737+
738+
-- handle lineprops.glade install file

examples/mpl_with_glade.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def on_buttonClickMe_clicked(event):
3838

3939
class WidgetsWrapper:
4040
def __init__(self):
41-
self.widgets = gtk.glade.XML('test.glade')
41+
self.widgets = gtk.glade.XML('mpl_with_glade.glade')
4242
self.widgets.signal_autoconnect(GladeHandlers.__dict__)
4343

4444
self['windowMain'].connect('destroy', lambda x: gtk.main_quit())
@@ -55,12 +55,27 @@ def __init__(self):
5555
self.canvas = FigureCanvas(self.figure) # a gtk.DrawingArea
5656
self.canvas.show()
5757
self.canvas.set_size_request(600, 400)
58+
self.canvas.set_events(
59+
gtk.gdk.BUTTON_PRESS_MASK |
60+
gtk.gdk.KEY_PRESS_MASK |
61+
gtk.gdk.KEY_RELEASE_MASK
62+
)
63+
self.canvas.set_flags(gtk.HAS_FOCUS|gtk.CAN_FOCUS)
64+
self.canvas.grab_focus()
65+
66+
def keypress(widget, event):
67+
print 'key press'
68+
def buttonpress(widget, event):
69+
print 'button press'
70+
71+
self.canvas.connect('key_press_event', keypress)
72+
self.canvas.connect('button_press_event', buttonpress)
5873

5974
def onselect(xmin, xmax):
6075
print xmin, xmax
6176

62-
span = HorizontalSpanSelector(self.axis, onselect, useblit=False,
63-
rectprops=dict(alpha=0.5, facecolor='red') )
77+
#span = HorizontalSpanSelector(self.axis, onselect, useblit=False,
78+
# rectprops=dict(alpha=0.5, facecolor='red') )
6479

6580

6681
self['vboxMain'].pack_start(self.canvas, True, True)

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
from __future__ import generators
144144

145145

146-
__version__ = '0.85.cvs'
146+
__version__ = '0.85'
147147
__revision__ = '$Revision$'
148148
__date__ = '$Date$'
149149

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(self,
102102
facecolor = None, # defaults to rc figure.facecolor
103103
edgecolor = None, # defaults to rc figure.edgecolor
104104
linewidth = 1.0, # the default linewidth of the frame
105-
frameon = True,
105+
frameon = True, # whether or not to draw the figure frame
106106
subplotpars = None, # default to rc
107107
):
108108
"""

matplotlibrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ timezone : UTC # a pytz timezone string, eg US/Central or Europe/Pari
4040
### LINES
4141
# See http://matplotlib.sourceforge.net/matplotlib.lines.html for more
4242
# information on line properties.
43-
lines.linewidth : 0.5 # line width in points
43+
lines.linewidth : 1.0 # line width in points
4444
lines.linestyle : - # solid line
4545
lines.color : blue
4646
lines.marker : None # the default marker

src/_tkagg.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ PyAggImagePhoto(ClientData clientdata, Tcl_Interp* interp,
6868
/* get array (or object that can be converted to array) pointer */
6969
aggo = (PyObject*)atol(argv[2]);
7070
RendererAgg *aggRenderer = (RendererAgg *)aggo;
71+
int srcstride = aggRenderer->get_width()*4;
72+
int srcwidth = (int)aggRenderer->get_width();
73+
int srcheight = (int)aggRenderer->get_height();
7174

7275
/* XXX insert aggRenderer type check */
7376

@@ -88,7 +91,8 @@ PyAggImagePhoto(ClientData clientdata, Tcl_Interp* interp,
8891
t = bbox->ur_api()->y_api()->val();
8992

9093
destx = (int)l;
91-
desty = (int)b;
94+
desty = srcheight-(int)t;
95+
//desty = (int)b;
9296
destwidth = (int)(r-l);
9397
destheight = (int)(t-b);
9498
deststride = 4*destwidth;

src/ft2font.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ FT2Font::set_text(const Py::Tuple & args) {
669669

670670

671671
Py::String text( args[0] );
672-
std::string stdtext;
672+
std::string stdtext="";
673673
Py_UNICODE* pcode=NULL;
674674
size_t N = 0;
675675
if (PyUnicode_Check(text.ptr())) {

0 commit comments

Comments
 (0)