Skip to content
This diff is collapsed.
......@@ -22,3 +22,13 @@
implements standard primitives like line, segment and Bezier curve.
"""
####################################################################################################
from .Primitive import Primitive2DMixin
from .Vector import Vector2D
####################################################################################################
# Fixme: to fix cyclic import issue
Primitive2DMixin.__vector_cls__ = Vector2D
This diff is collapsed.
This diff is collapsed.
......@@ -83,6 +83,14 @@ class PaperSize:
def width(self):
return self._width
@property
def height_in(self):
return self._height / 25.4
@property
def width_in(self):
return self._width / 25.4
@property
def margin(self):
return self._margin
This diff is collapsed.
This diff is collapsed.
......@@ -72,7 +72,7 @@ class TexPainter(Painter):
def __init__(self, path, scene, paper):
super(TexPainter, self).__init__(scene)
super().__init__(scene)
self._document = Document(path, 'article', '12pt')
self._paper = paper
......
......@@ -36,12 +36,12 @@ class TikzFigure(Environment):
'none': None,
'solid': 'solid',
}
}
__COLOR__ = {
None : None,
'black': 'black',
}
}
@staticmethod
def format_path_style(path_syle):
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -564,7 +564,7 @@ class NormalPoint(Point, LinePropertiesMixin, FirstSecondPointMixin, LengthAngle
vector = self._second_point.vector - self._first_point.vector
self._pattern.calculator.set_current_segment(vector)
direction = vector.to_normalised()
direction = direction.normal()
direction = direction.normal
angle = self._angle.value
if angle:
direction = direction.rotate(angle)
......
......@@ -168,10 +168,10 @@ class Calculator:
def _function_AngleLine(self, point_name1, point_name2):
point1, point2 = self._names_to_vector_points(point_name1, point_name2)
return (point2 - point1).orientation()
return (point2 - point1).orientation
def _function_CurrentLength(self):
return self._current_segment.magnitude()
return self._current_segment.magnitude
def _function_C1LengthSpl(self, point_name1, point_name2):
point1, point2 = self._names_to_vector_points(point_name1, point_name2)
......@@ -183,7 +183,7 @@ class Calculator:
def _function_Line(self, point_name1, point_name2):
point1, point2 = self._names_to_vector_points(point_name1, point_name2)
return (point2 - point1).magnitude()
return (point2 - point1).magnitude
def _function_Spl(self, point_name1, point_name2):
point1, point2 = self._names_to_vector_points(point_name1, point_name2)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.