Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

cairo rendering for wx#9202

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
anntzer wants to merge17 commits intomatplotlib:masterfromanntzer:wxcairo
Closed
Changes from1 commit
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
2abdcea
Qt5Cairo backend.
anntzerJun 15, 2017
d4957ec
Qt4Cairo backend.
anntzerJun 18, 2017
d2f2bc0
Update backends docs.
anntzerJun 18, 2017
f884ffa
Update backends API docs.
anntzerJun 18, 2017
bcb08e9
Let cairo track surface size; fix Pyside refcnt bug.
anntzerJun 19, 2017
2eac3fa
Fix mandelbrot example.
anntzerJun 20, 2017
138ba58
Make sure only one cairo binding is ever used; fix docs.
anntzerJun 20, 2017
d96d104
No need to process_updates in gtk3.
anntzerJul 23, 2017
5087c05
Qt dpi handling should be renderer-agnostic.
anntzerAug 1, 2017
89a87d0
Fix vector output from cairo.
anntzerAug 3, 2017
56854ae
In QtCairo, also save figures using cairo.
anntzerAug 3, 2017
ab61783
Fix doc builds.
anntzerAug 26, 2017
8946c38
Fix hidpi in qt5cairo.
anntzerDec 29, 2017
89a3ca8
Cleanup gtk3cairo.
anntzerSep 19, 2017
ecc9143
Cleanup wxagg.
anntzerSep 18, 2017
28ccff8
Unify wx toolbars.
anntzerSep 18, 2017
82e8360
WXCairo backend.
anntzerSep 18, 2017
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
PrevPrevious commit
NextNext commit
Fix hidpi in qt5cairo.
  • Loading branch information
@anntzer
anntzer committedJan 9, 2018
commit8946c385940e83b44bc80738a2dd1a66b4afc555
8 changes: 6 additions & 2 deletionslib/matplotlib/backends/backend_qt5cairo.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,8 +10,9 @@ def __init__(self, figure):

def paintEvent(self, event):
self._update_dpi()
width = self.width()
height = self.height()
dpi_ratio = self._dpi_ratio
width = dpi_ratio * self.width()
height = dpi_ratio * self.height()
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
self._renderer.set_ctx_from_surface(surface)
self._renderer.set_width_height(width, height)
Expand All@@ -23,6 +24,9 @@ def paintEvent(self, event):
# QImage under PySide on Python 3.
if QT_API == 'PySide' and six.PY3:
ctypes.c_long.from_address(id(buf)).value = 1
if hasattr(qimage, 'setDevicePixelRatio'):
# Not available on Qt4 or some older Qt5.
qimage.setDevicePixelRatio(dpi_ratio)
painter = QtGui.QPainter(self)
painter.drawImage(0, 0, qimage)
self._draw_rect_callback(painter)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp