Changeset - 69f9170d3c89
[Not reviewed]
default
6 2 0
Laman - 8 years ago 2017-02-14 22:27:34

cleaned redundant whitespace in SVG, cleaned old files
8 files changed with 6 insertions and 3432 deletions:
0 comments (0 inline, 0 general)
example.lyx
Show inline comments
 
deleted file
insertMatrix1.lyx
Show inline comments
 
deleted file
notes.txt
Show inline comments
 
deleted file
src/diana.py
Show inline comments
 
@@ -12,12 +12,14 @@ from drawer.svg import Svg
 
from drawer.tikz import Tikz
 

	
 

	
 
curDir=os.path.dirname(__file__)
 
templateDir=os.path.join(curDir,"templ")
 
env=Environment(loader=FileSystemLoader(templateDir))
 
env.trim_blocks=True
 
env.lstrip_blocks=True
 

	
 

	
 
def collectMoves(root):
 
	node=root
 
	while len(node.children)>0:
 
		b=node.getProp("B")
src/templ/templ.svg
Show inline comments
 
<?xml version="1.0" encoding="utf-8"?>
 
{% set cellSize=boardSize/18 %}
 
{% set stoneRadius=cellSize/2-1 %}
 
{% set stoneRadius=cellSize/2-1 -%}
 

	
 
{% if not labeledPoint %}
 
	{% macro labeledPoint(p) %}
 
	<g class="{{p.color or 'e'}}" transform="translate({{(p.x*cellSize) | round(2)}},{{(p.y*cellSize) | round(2)}})">
 
		<circle cx="0" cy="0" r="{{stoneRadius|round(2)}}"/>
 
		<text y="0.35em" font-size="{{adjustFont(cellSize,p.label)}}">{{p.label}}</text>
 
	</g>
 
	{% endmacro %}
 
{% endif %}
 
{% endif -%}
 

	
 
<svg width="{{boardSize+padding*2}}" height="{{boardSize+padding*2}}" version="1.1" xmlns="http://www.w3.org/2000/svg">
 
	<defs>
 
		<style type="text/css"><![CDATA[
 
		{% block style %}
 
			rect{fill:white;stroke:black;stroke-width:1px}
 
@@ -43,16 +43,16 @@
 
		{# stones #}
 
		{% for p in stones %}
 
			<circle cx="{{(p.x*cellSize) | round(2)}}" cy="{{(p.y*cellSize) | round(2)}}" r="{{stoneRadius|round(2)}}" class="{{p.color}}"/>
 
		{% endfor %}
 

	
 
		{# moves #}
 
		{% for p in moves %}
 
		{% for p in moves -%}
 
			{{labeledPoint(p)}}
 
		{% endfor %}
 

	
 
		{# labels #}
 
		{% for p in labels %}
 
		{% for p in labels -%}
 
			{{labeledPoint(p)}}
 
		{% endfor %}
 
	</g>
 
</svg>
work.lyx
Show inline comments
 
deleted file
work2.lyx
Show inline comments
 
deleted file
work2.tex
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)