Home > GSOC2015, kivy, matplotlib > Improvements to the RendererKivy (Part 2)

Improvements to the RendererKivy (Part 2)

The following modifications have been implemented in these days:

  • Fixed problem when rendering concave polygons. It can be seen from previous images that in the case of an arrow and a wedge there was a defect on the rendering due to the triangulation algorithm to fill it. The mesh renderer uses “triangle_fan” and since all the points form triangles always with the hub in concave polygons this was a problem. It was fixed by splitting concave polygons into convex ones. This was implemented using Tesselator a utility class in the graphics kivy package.
  • Path was being closed when it should not. It has been fixed that a path line was being closed by default, the initial point was removed so the line does not try to close a path when it is not necessary.
  • Elements out of the figure axes are not rendered. The problem here is that everything was being drawn in the same layer. A stencil widget is used as a mask so everything out of bounds it is hidden. In the second figure, 4 stencil instructions are created to show just the graphics instructions visible in the clip rectangle.
  • Focus behavior was added to the FigureCanvasKivy. Keyboard events are automatically bound by the focus behavior.
  • Added support for multiple dash length and offset in a same line. Line can receive a list with the values of length and offset for the respective rendering. For instance [10, 5, 20, 10] would create a line with 10 visible points then 5 hidden 20 visible and 10 hidden. This can be seen on the figure of the sin function below

dynamic dashes in a line4 stencil widgetsartist demointegral demo

Advertisements
Categories: GSOC2015, kivy, matplotlib Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: