Skip to content

Backport PR #12019 on branch v3.0.x (typo: s/unmultipled/unmultiplied) #12020

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_cairo.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def _draw_paths():
_draw_paths()

def draw_image(self, gc, x, y, im):
im = cbook._unmultipled_rgba8888_to_premultiplied_argb32(im[::-1])
im = cbook._unmultiplied_rgba8888_to_premultiplied_argb32(im[::-1])
surface = cairo.ImageSurface.create_for_data(
im.ravel().data, cairo.FORMAT_ARGB32,
im.shape[1], im.shape[0], im.shape[1] * 4)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_gtk3agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def on_draw_event(self, widget, ctx):
width = int(bbox.x1) - int(bbox.x0)
height = int(bbox.y1) - int(bbox.y0)

buf = cbook._unmultipled_rgba8888_to_premultiplied_argb32(
buf = cbook._unmultiplied_rgba8888_to_premultiplied_argb32(
np.asarray(self.copy_from_bbox(bbox)))
image = cairo.ImageSurface.create_for_data(
buf.ravel().data, cairo.FORMAT_ARGB32, width, height)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_qt5agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def paintEvent(self, event):
[[left, self.renderer.height - (top + height * self._dpi_ratio)],
[left + width * self._dpi_ratio, self.renderer.height - top]])
reg = self.copy_from_bbox(bbox)
buf = cbook._unmultipled_rgba8888_to_premultiplied_argb32(
buf = cbook._unmultiplied_rgba8888_to_premultiplied_argb32(
memoryview(reg))
qimage = QtGui.QImage(buf, buf.shape[1], buf.shape[0],
QtGui.QImage.Format_ARGB32_Premultiplied)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/cbook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ def _premultiplied_argb32_to_unmultiplied_rgba8888(buf):
return rgba


def _unmultipled_rgba8888_to_premultiplied_argb32(rgba8888):
def _unmultiplied_rgba8888_to_premultiplied_argb32(rgba8888):
"""
Convert an unmultiplied RGBA8888 buffer to a premultiplied ARGB32 buffer.
"""
Expand Down