Skip to content
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

Document image drawing in Kiva #680

Merged
merged 2 commits into from
Mar 5, 2021
Merged

Document image drawing in Kiva #680

merged 2 commits into from
Mar 5, 2021

Conversation

jwiggins
Copy link
Member

@jwiggins jwiggins commented Mar 4, 2021

Closes #616

Copy link
Contributor

@aaronayres35 aaronayres35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Unrelated to this PR, but while reviewing I went through the kiva examples looking for an image one. running the image_explorer.py example I saw the following error:

$ python image_explorer.py 
2021-03-04 12:20:39.724 Python[18846:396139] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
  File "/Users/aayres/Desktop/enable/enable/qt4/base_window.py", line 243, in paintEvent
    self.handler.paintEvent(event)
  File "/Users/aayres/Desktop/enable/enable/qt4/base_window.py", line 78, in paintEvent
    self._enable_window._paint(event)
  File "/Users/aayres/Desktop/enable/enable/abstract_window.py", line 506, in _paint
    self.component.draw(gc, view_bounds=(0, 0, size[0], size[1]))
  File "/Users/aayres/Desktop/enable/enable/component.py", line 432, in draw
    self._draw(gc, view_bounds, mode)
  File "/Users/aayres/Desktop/enable/enable/component.py", line 813, in _draw
    self._dispatch_draw(layer, gc, view_bounds, mode)
  File "/Users/aayres/Desktop/enable/enable/component.py", line 831, in _dispatch_draw
    handler(gc, view_bounds, mode)
  File "image_explorer.py", line 40, in _draw_mainlayer
    gc.draw_image(self.image, (0, 0, gc.width(), gc.height()))
  File "/Users/aayres/Desktop/enable/kiva/agg/agg.py", line 1379, in draw_image
    return _agg.GraphicsContextArray_draw_image(self,img,rect,force_copy)
TypeError: in method 'GraphicsContextArray_draw_image', argument 2 of type 'kiva::graphics_context_base *'
Abort trap: 6

This probably warrants an issue?

docs/source/kiva/images.rst Show resolved Hide resolved
@jwiggins
Copy link
Member Author

jwiggins commented Mar 5, 2021

Thanks for the feedback.

@jwiggins jwiggins merged commit fd1f9ee into master Mar 5, 2021
@jwiggins jwiggins deleted the dox/kiva-images branch March 5, 2021 09:48
@jwiggins
Copy link
Member Author

jwiggins commented Mar 5, 2021

#681 added to track the image_explorer.py issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kiva: Rendering images in a kiva GC
2 participants