Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capped StrokeWidth on canvas.Line #831

Closed
ajstarks opened this issue Apr 8, 2020 · 3 comments
Closed

Capped StrokeWidth on canvas.Line #831

ajstarks opened this issue Apr 8, 2020 · 3 comments
Milestone

Comments

@ajstarks
Copy link

ajstarks commented Apr 8, 2020

Describe the bug:

After 10, the StrokeWidth of canvas.Line is capped, and will not increase.

To Reproduce:

Steps to reproduce the behaviour:

Specify a StrokeWidth > 10, compare to widths

Screenshots:

Screenshot from 2020-04-08 07-32-56

expected behavior

Screenshot from 2020-04-08 07-32-38

Example code:

deck
	slide
		line 10 10 10 90 0.1 "blue"
		line 20 10 20 90 0.2 "blue"
		line 30 10 30 90 0.3 "blue"
		line 40 10 40 90 0.4 "blue"
		line 50 10 50 90 1   "blue"
		line 60 10 60 90 2   "blue"
		line 70 10 70 90 3   "blue"
		line 80 10 80 90 4   "blue"
		line 90 10 90 90 7   "blue"
	eslide
edeck

Trace of calls to canvas.Line

line=&canvas.Line{Position1:fyne.Position{X:79, Y:550}, Position2:fyne.Position{X:79, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:0.792}
line=&canvas.Line{Position1:fyne.Position{X:158, Y:550}, Position2:fyne.Position{X:158, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:1.584}
line=&canvas.Line{Position1:fyne.Position{X:237, Y:550}, Position2:fyne.Position{X:237, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:2.376}
line=&canvas.Line{Position1:fyne.Position{X:316, Y:550}, Position2:fyne.Position{X:316, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:3.168}
line=&canvas.Line{Position1:fyne.Position{X:396, Y:550}, Position2:fyne.Position{X:396, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:7.92}
line=&canvas.Line{Position1:fyne.Position{X:475, Y:550}, Position2:fyne.Position{X:475, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:15.84}
line=&canvas.Line{Position1:fyne.Position{X:554, Y:550}, Position2:fyne.Position{X:554, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:23.76}
line=&canvas.Line{Position1:fyne.Position{X:633, Y:550}, Position2:fyne.Position{X:633, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:31.68}
line=&canvas.Line{Position1:fyne.Position{X:712, Y:550}, Position2:fyne.Position{X:712, Y:61}, Hidden:false, StrokeColor:color.RGBA{R:0x0, G:0x0, B:0xff, A:0xff}, StrokeWidth:55.44}

Device (please complete the following information):

  • OS: [Linux, MacOS ]
  • Go version: [1.14.1]
  • Fyne version: [1.2.3]
@andydotxyz
Copy link
Member

As discussed on the call yesterday I wonder if this "cap" (which exists for memory bandwidth / performance reasons) could be a little more dynamic?
Instead of "10" it could possibly be as simple as setting it to StrokeWidth+2 (adding a little for possible antialiasing etc)? Is this something you can experiment with at your end @ajstarks?

@ajstarks
Copy link
Author

ajstarks commented Apr 9, 2020

Sure.. Happy to help

@andydotxyz
Copy link
Member

On develop ready for release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants