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

Unsupressable output to stdout(?) #440

Open
nomadbl opened this issue Jul 7, 2023 · 0 comments
Open

Unsupressable output to stdout(?) #440

nomadbl opened this issue Jul 7, 2023 · 0 comments

Comments

@nomadbl
Copy link

nomadbl commented Jul 7, 2023

This follows issue GiovineItalia/Gadfly.jl#1621
Here is a MWE involving only Compose functions, adapted from the example arrow.jl

using Compose
import Cairo, Fontconfig

X =  [0.047 0.87 0.95 0.93;
0.22 0.01 0.21 0.7;
0.86 0.85 0.95 0.21]

point_array = [[(x1,y1), (x2,y2)] for (x1,y1,x2,y2) in zip(X[:,1],X[:,2],X[:,3],X[:,4])]
img = compose(context(),
    (context(), line(point_array), stroke(["red","green","deepskyblue"]), arrow())
)

pb = PipeBuffer();
show(pb, MIME("image/png"), img);

As before, during writing to the PipeBuffer, the following output can be observed on the REPL, which is unwanted behavior - we are not trying to write to stdout:

Compose.Image{Compose.PNGBackend}(IOBuffer(data=UInt8[...], readable=true, writable=true, seekable=false, append=true, size=8139, maxsize=Inf, ptr=1, mark=-1), Cairo.CairoSurfaceBase{UInt32}(Ptr{Nothing} @0x0000000000000000, 535.0, 378.0), Cairo.CairoContext(Ptr{Nothing} @0x0000000000000000, Cairo.CairoSurfaceBase{UInt32}(Ptr{Nothing} @0x0000000000000000, 535.0, 378.0), Ptr{Nothing} @0x00000000018a60d0), 534.5059133378628, 377.9527559055118, RGBA{Float64}(0.0,0.0,0.0,0.0), RGBA{Float64}(0.0,0.0,0.0,1.0), Float64[], LineCapButt(), Compose.LineJoinMiter(), true, 0.3mm, 3.880555555555555mm, "Helvetica Neue,Helvetica,Arial,sans", nothing, false, Compose.ImagePropertyState[], Compose.ImagePropertyFrame[], Dict{Type, Union{Nothing, Compose.Property}}(Compose.Property{Compose.StrokePrimitive} => nothing), true, false, nothing, true, true, 3.7795275590551185, nothing, nothing)
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