vydd / sketch

A Common Lisp framework for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction, and more.
MIT License
1.4k stars 67 forks source link

Using images. #68

Closed aykaramba closed 1 year ago

aykaramba commented 1 year ago

I am trying to use images in Sketch on Linux and the rectangle fill renders out weird. I am looking for clues as to what might be causing this issue from anyone here in the community.

Code:

(defsketch tutorial
    ((title "line")
     (width 400)
     (height 400))
     (background +orange+)
     (with-pen (make-pen :stroke +red+ :weight 1 :fill (load-resource "mia.png")) 
               (rect 50 30 200 113)))

Here is what Sketch renders:

sketch

Here is the source image:

mia

Details:

1) I tried creating a rectangle of the same size as the image @ 200 x 113 px but the weird artifacting still happens regardless.

2) This happens on Linux machines with AMD and Intel gpus.

3) I am using latest Debian everything and latest Sketch pull.

Does anyone have any thought son why this might be happening? What might be the fix?

Thanks.

compmstr commented 1 year ago

Do you have the most recent version? This looks like one of the issues that was fixed with https://github.com/vydd/sketch/pull/55 You may need to do (ql:update-all-dists) to get a more recent version. After doing that I'm seeing the version of sketch as sketch-20221106-git (from (ql:system-apropos-list "sketch"))

To keep up to date, you can also clone this repo into ~/.quicklisp/local-projects

aykaramba commented 1 year ago

Oh! You are absolutely correct. I thought I was using the latest code. Huh.

Okay issue is resolved, thank you very much for that!