JuliaGraphics / Luxor.jl

Simple drawings using vector graphics; Cairo "for tourists!"
http://juliagraphics.github.io/Luxor.jl/
Other
590 stars 72 forks source link

Hello world example not working #320

Closed itsdfish closed 1 month ago

itsdfish commented 1 month ago

Hello,

Nice package! I am going through the documentation and noticed the hello world example is not working. Evidently, the text function needs to be prefixed with Luxor or text needs to be exported.

using Luxor

@png begin
    text("Hello world")
    circle(Point(0, 0), 200, action = :stroke)
end

Error Message

ERROR: UndefVarError: `text` not defined
Stacktrace:
 [1] macro expansion
   @ ~/.julia/dev/sandbox/true_error_logo/make_true_error_logo.jl:8 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/Luxor/0kqwd/src/drawings.jl:1238 [inlined]
 [3] top-level scope
   @ ~/.julia/dev/sandbox/true_error_logo/make_true_error_logo.jl:7

Version Info [ae8d54c2] Luxor v4.1.0

cormullion commented 1 month ago

Hi! What’s the output of ] status? And can you start a new session and try the same code?

itsdfish commented 1 month ago

You are right. Starting a new session fixed the issue. I was not expecting that to be the issue because I started a new session and created a new environment before adding Luxor. Anyways, sorry for the noise!