flexagon-toolkit.git
6 years agoAdd an example to show how Inkscape can be used as a tetraflexagon editor
Antonio Ospite [Wed, 27 Jun 2018 10:07:51 +0000 (12:07 +0200)]
Add an example to show how Inkscape can be used as a tetraflexagon editor

6 years agoAdd support for tetraflexagons
Antonio Ospite [Wed, 27 Jun 2018 09:31:05 +0000 (11:31 +0200)]
Add support for tetraflexagons

6 years agosvgwrite_diagram: add a test function
Antonio Ospite [Tue, 26 Jun 2018 14:18:31 +0000 (16:18 +0200)]
svgwrite_diagram: add a test function

Add a test function similar to the one used in the cairo backend.

Add also the same workaround to handle local includes in python2.

6 years agosvgwrite_diagram: return "something" from draw_centered_text()
Antonio Ospite [Tue, 26 Jun 2018 14:15:36 +0000 (16:15 +0200)]
svgwrite_diagram: return "something" from draw_centered_text()

Add a quick and dirty way to advance text when calling
draw_centered_text() just for consistency with the cairo backend.

The return value is just a rough estimate, it does not consider the
particular font in use.

6 years agocairo_diagram: save a file when generating the test diagram
Antonio Ospite [Tue, 26 Jun 2018 14:14:29 +0000 (16:14 +0200)]
cairo_diagram: save a file when generating the test diagram

6 years agodiagram: factor out a generic drawing test
Antonio Ospite [Tue, 26 Jun 2018 14:02:35 +0000 (16:02 +0200)]
diagram: factor out a generic drawing test

Factor out from cairo_diagram.py some code which draws a test diagram
and put it into diagram.py

6 years agosvgwrite_diagram: implement draw_circle, draw_line and draw_rect
Antonio Ospite [Tue, 26 Jun 2018 13:49:50 +0000 (15:49 +0200)]
svgwrite_diagram: implement draw_circle, draw_line and draw_rect

Complete the implementation of the svgwrite diagram backend by
implementing the missing methods.

6 years agosvgwrite_diagram: proper support for stroke_width
Antonio Ospite [Tue, 26 Jun 2018 13:46:14 +0000 (15:46 +0200)]
svgwrite_diagram: proper support for stroke_width

Support stroke_width for all drawing operations that call the _stroke()
method, and remove ad-hoc support for draw_polygon_by_verts() and
draw_star_by_verts()

6 years agosvgwrite_diagram: implement the clear() method
Antonio Ospite [Tue, 26 Jun 2018 13:45:24 +0000 (15:45 +0200)]
svgwrite_diagram: implement the clear() method

6 years agodiagram: move draw_rect_from_center to the generic Diagram class
Antonio Ospite [Tue, 26 Jun 2018 13:42:26 +0000 (15:42 +0200)]
diagram: move draw_rect_from_center to the generic Diagram class

Move draw_rect_from_center from cairo_diagram.py to diagram.py as it
does not depend on any specific backend.

6 years agoTODO: mention that showing the "wrong" faces could be useful too
Antonio Ospite [Wed, 4 Apr 2018 10:50:25 +0000 (12:50 +0200)]
TODO: mention that showing the "wrong" faces could be useful too

6 years agoAdd an example to show how Inkscape can be used as a flexagon editor
Antonio Ospite [Tue, 30 Jan 2018 11:18:15 +0000 (12:18 +0100)]
Add an example to show how Inkscape can be used as a flexagon editor

6 years agoInitial import
Antonio Ospite [Mon, 29 Jan 2018 14:31:26 +0000 (15:31 +0100)]
Initial import