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

Lines don't render if the graph is built with a fill #327

Open
1 task done
axelson opened this issue Aug 19, 2023 · 0 comments
Open
1 task done

Lines don't render if the graph is built with a fill #327

axelson opened this issue Aug 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@axelson
Copy link
Collaborator

axelson commented Aug 19, 2023

Checklist

  • Check other issues and make sure that it is not reported yet.

Versions and Environment

Elixir:

# elixir -v
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]

Elixir 1.14.3 (compiled with Erlang/OTP 25)

Erlang:

# erl -v
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]

Eshell V13.1.5  (abort with ^G)

Scenic:

# mix deps | grep scenic
* scenic 0.11.1 (Hex package) (mix)
  locked at 0.11.1 (scenic) 86845290
* scenic_driver_local 0.11.0 (Hex package) (mix)
  locked at 0.11.0 (scenic_driver_local) 77b27b82

OS:

Linux Mint

Steps to reproduce

Broken:

    graph = Graph.build(font: :roboto, font_size: @text_size, fill: :white)

    graph =
      graph
      |> add_specs_to_graph([
        text_spec(info, translate: {20, 40}),
        text_spec(@note, translate: {20, 120}),
	# This only renders if there's no fill set on the graph
        line_spec({{0, 400}, {450, 400}}, stroke: {4, :red}),
        rect_spec({width, height}, fill: :transparent)
      ])

works:

    graph = Graph.build(font: :roboto, font_size: @text_size)

    graph =
      graph
      |> add_specs_to_graph([
        text_spec(info, translate: {20, 40}),
        text_spec(@note, translate: {20, 120}),
	# This only renders if there's no fill set on the graph
        line_spec({{0, 400}, {450, 400}}, stroke: {4, :red}),
        rect_spec({width, height}, fill: :transparent)
      ])

Note: even passing a fill directly to the line (or line_spec) isn't enough to allow the line to render.

I've created a reproduction repo here: https://github.com/axelson/repro_scenic_line_fill

Expected Behavior

The line to render regardless of the fill

Actual Behavior

The line does not render if the fill is set on the graph

@crertel crertel added the bug Something isn't working label Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants