Skip to content

Commit

Permalink
inktool fix, linemode duration adj
Browse files Browse the repository at this point in the history
inktool was missing barrel rotation
linemode was using a duration of 0.001,
which renders lines as if they were drawn
insanely fast.  We should add a control
to vary this, but for now I made it
one second in duration.
  • Loading branch information
briend committed Feb 19, 2019
1 parent 8f23c97 commit 4490f06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions gui/inktool.py
Expand Up @@ -811,6 +811,7 @@ def insert_node(self, i):
time=(cn.time + nn.time) / 2.0,
viewzoom=(cn.viewzoom + nn.viewzoom) / 2.0,
viewrotation=(cn.viewrotation + nn.viewrotation) / 2.0,
barrel_rotation=(cn.barrel_rotation + nn.barrel_rotation) / 2.0,
)
self.nodes.insert(i + 1, newnode)

Expand Down
3 changes: 2 additions & 1 deletion gui/linemode.py
Expand Up @@ -673,7 +673,8 @@ def draw_curve_2(self, cx, cy, sx, sy, ex, ey, kx, ky):
self._stroke_to(px, py, pressure)

def _stroke_to(self, x, y, pressure):
duration = 0.001
# FIXME add control for time, similar to inktool
duration = 1.0

self.stroke_to(self.model, duration, x, y, pressure, 0.0, 0.0,
self.doc.tdw.scale, self.doc.tdw.rotation, 0.0,
Expand Down

0 comments on commit 4490f06

Please sign in to comment.