Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

backend_wx.py: ReleaseMouse() when the capture is lost #7652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
eac63b7
remove all CaptureMouse() and ReleaseMouse() calls
newville Dec 21, 2016
b4a083e
Merge branch 'master' of github.com:matplotlib/matplotlib
newville Dec 22, 2016
a8437a9
avoiding wx C++ assertions by handling Capture Lost and Changed events
newville Dec 22, 2016
331e6f7
Merge branch 'master' of github.com:matplotlib/matplotlib
newville Dec 24, 2016
0d5d1d5
now with _set_capture() method so that Capture is always released bef…
newville Dec 24, 2016
6135b14
Decode error messages from image converters.
QuLogic Dec 22, 2016
c96d50e
Also decode stdout from image verifiers.
QuLogic Dec 22, 2016
2d7b735
Make style change examples consistent
dstansby Dec 23, 2016
75a4986
Make plot titles consistent
dstansby Dec 23, 2016
8e45f4d
Allow to store metadata in png files
Xarthisius Oct 25, 2016
afaa4c4
Ensure that metadata pointer is initially set to NULL
Xarthisius Oct 25, 2016
26a8af8
Allow to pass custom infoDict to images created with pdf backend
Xarthisius Oct 25, 2016
15999fe
Allow to pass custom metadata to png images created with agg backend
Xarthisius Oct 25, 2016
80b2361
Allow to pass custom Creator to images created with ps backend
Xarthisius Oct 25, 2016
095db35
'Software' starts with capital letter as per PNG specification
Xarthisius Oct 25, 2016
19e9ad8
fix pep8 issue
Xarthisius Oct 25, 2016
17e8231
Drop debug statements
Xarthisius Oct 25, 2016
9fea731
Preserve the default values of the metadata. Allow user to update if …
Xarthisius Oct 25, 2016
cdc2185
Revert accidental changes and fix indentation
Xarthisius Oct 27, 2016
fa42ced
Handle unicode/bytes directly in the C extension
Xarthisius Oct 27, 2016
f0681de
Use 'latin_1' encoding instead of ascii
Xarthisius Oct 29, 2016
7912f00
Fix numpydoc format issues
Xarthisius Oct 29, 2016
2a5e3b0
Add example info dictionary
Xarthisius Oct 29, 2016
2ba99e1
Add a description for the 'metadata' keyword to the docstring
Xarthisius Oct 31, 2016
ad1dad9
Explicitly define 'metadata' kwarg in '_print_figure'
Xarthisius Oct 31, 2016
46afd9f
Define 'metadata' as kwarg in _print_figure_tex for consistency
Xarthisius Oct 31, 2016
7c2a94d
Use default value for invalid key instead of NULL
Xarthisius Oct 31, 2016
a499650
Use OrderedDict for metadata
Xarthisius Nov 17, 2016
5afb67a
Add 'what is new' entry for metadata kwarg in matplotlib.pyplot.savefig
Xarthisius Nov 17, 2016
5302ff7
Fix merge
Xarthisius Dec 25, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert accidental changes and fix indentation
  • Loading branch information
Xarthisius authored and newville committed Dec 27, 2016
commit cdc218582c9cd29e38cb7db7d75b73deefb006d9
3 changes: 1 addition & 2 deletions 3 lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,7 @@ def __init__(self, filename, metadata=None):
source_date = datetime.today()

self.infoDict = {
'Creator': 'matplotlib ' + __version__ +
', http://matplotlib.org',
'Creator': 'matplotlib %s, http://matplotlib.org' % __version__,
'Producer': 'matplotlib pdf backend%s' % revision,
'CreationDate': source_date
}
Expand Down
29 changes: 14 additions & 15 deletions 29 src/_png.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,27 +285,26 @@ static PyObject *Py_write_png(PyObject *self, PyObject *args, PyObject *kwds)

#ifdef PNG_TEXT_SUPPORTED
// Save the metadata
if (metadata != NULL)
{
meta_size = PyDict_Size(metadata);
text = new png_text[meta_size];
if (metadata != NULL) {
meta_size = PyDict_Size(metadata);
text = new png_text[meta_size];

while (PyDict_Next(metadata, &pos, &meta_key, &meta_val)) {
text[meta_pos].compression = PNG_TEXT_COMPRESSION_NONE;
while (PyDict_Next(metadata, &pos, &meta_key, &meta_val)) {
text[meta_pos].compression = PNG_TEXT_COMPRESSION_NONE;
#if PY3K
text[meta_pos].key = PyBytes_AsString(meta_key);
text[meta_pos].text = PyBytes_AsString(meta_val);
text[meta_pos].key = PyBytes_AsString(meta_key);
text[meta_pos].text = PyBytes_AsString(meta_val);
#else
text[meta_pos].key = PyString_AsString(meta_key);
text[meta_pos].text = PyString_AsString(meta_val);
text[meta_pos].key = PyString_AsString(meta_key);
text[meta_pos].text = PyString_AsString(meta_val);
#endif
#ifdef PNG_iTXt_SUPPORTED
text[meta_pos].lang = NULL;
text[meta_pos].lang = NULL;
#endif
meta_pos++;
}
png_set_text(png_ptr, info_ptr, text, meta_size);
delete[] text;
meta_pos++;
}
png_set_text(png_ptr, info_ptr, text, meta_size);
delete[] text;
}
#endif

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.