这是indexloc提供的服务,不要输入任何密码
Skip to content

Implement a discrete straight line constraint for drawing tools #1248

@Jose-Moreno

Description

@Jose-Moreno

Issue Summary

As the name implies, having a discrete constraint (i.e variable degree from initial click placement) to create straight lines is a very widespread and useful feature that Pencil2D has been missing ever since it was created.

Even the polyline tool could benefit from this behavior as creating straight lines at odd angles doesn't look really nice when you need precision drawing for creating certain shapes.

Expected Results

To be able to create a straight line at regular or odd intervals depending on a modifier key (normally SHIFT). This would however have to be validated against the Quick-sizing behavior which already uses the hard coded SHIFT key to change the brush size when enabled

Angle based on initial mouse / stylus direction
H: Horizontal Angle (0°, 180°)
V: Vertical Angle (90°, 270°)
D: Discreet Angle (Depends on degree setting, initially 45° steps)

  • Pencil Tool: H & V
  • Pen Tool: H & V
  • Brush Tool: H & V
  • Eraser Tool: H & V
  • Polyline Tool: H, V, D

Video or Image Reference

image

Red: odd angle straight lines (current)
Blue: discrete angle straight lines

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementGood First IssueHacktoberfestIn support of Digital Ocean's yearly open source event running from Oct 1st - Oct 31st.

    Type

    No type

    Projects

    Status

    Medium Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions