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

LineStyle.dashOffset doesn't have any effect (is ignored in implementation) #534

Closed
hoelzro opened this Issue Mar 23, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@hoelzro

hoelzro commented Mar 23, 2016

I was playing with some code to try to create the "marching ants" effect with a line, but changing dashOffset on my line style doesn't appear to affect the way the line is drawn. Here's a minimal example that produces the issue:

import Color exposing (black)
import Graphics.Collage exposing (collage, dashed, segment, traced)
import Graphics.Element exposing (Element)

main : Element
main =
  let styleSansOffset = dashed black
      styleWithOffset = { styleSansOffset | dashOffset = 8 }

      lineSansOffset = traced styleSansOffset <| segment (0, 0) (100, 100)
      lineWithOffset = traced styleWithOffset <| segment (0, 10) (100, 110)

  in collage 300 300 [ lineSansOffset, lineWithOffset ]

and its output:

2016-03-23-114348_274x206_scrot

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Mar 23, 2016

Contributor

Indeed, dashOffset is completely ignored in Native/Graphics/Collage.js. In fact, the dashOffset field is never accessed in the whole core code base. It might as well not exist.

Clearly an unsupported feature at the moment. Might make sense to remove it from the LineStyle type.

Contributor

jvoigtlaender commented Mar 23, 2016

Indeed, dashOffset is completely ignored in Native/Graphics/Collage.js. In fact, the dashOffset field is never accessed in the whole core code base. It might as well not exist.

Clearly an unsupported feature at the moment. Might make sense to remove it from the LineStyle type.

@jvoigtlaender jvoigtlaender changed the title from LineStyle.dashOffset doesn't appear to have any effect to LineStyle.dashOffset doesn't have any effect (is ignored in implementation) Mar 23, 2016

@evancz evancz closed this Jun 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment