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

Long dashed lines break #27

Open
stuartmscott opened this issue Apr 28, 2021 · 0 comments
Open

Long dashed lines break #27

stuartmscott opened this issue Apr 28, 2021 · 0 comments

Comments

@stuartmscott
Copy link

When using the "stroke-dasharray" attribute short lines render correctly, but long lines break

Screenshot

Left: Chrome
Right: Fyne (using OKSVG)
Screen Shot 2021-04-28 at 11 53 52

Sample SVG

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" width="480" height="640" viewBox="0 0 480 640">
    <g stroke="red">
        <line x1="60" y1="0" x2="60" y2="40" stroke-dasharray="4" />
        <line x1="120" y1="0" x2="120" y2="140" stroke-dasharray="4" />
        <line x1="180" y1="0" x2="180" y2="240" stroke-dasharray="4" />
        <line x1="240" y1="0" x2="240" y2="340" stroke-dasharray="4" />
        <line x1="300" y1="0" x2="300" y2="440" stroke-dasharray="4" />
        <line x1="360" y1="0" x2="360" y2="540" stroke-dasharray="4" />
        <line x1="420" y1="0" x2="420" y2="640" stroke-dasharray="4" />
    </g>
</svg>

Sample Code

//go:generate fyne bundle -o bundled.go dasharray.svg
package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/canvas"
)

func main() {
	a := app.New()
	w := a.NewWindow("Dashes")
	w.SetContent(&canvas.Image{
		Resource: resourceDasharraySvg,
		FillMode: canvas.ImageFillOriginal,
	})
	w.ShowAndRun()
}

Command

go generate ./...
go run ./...
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

1 participant