Giter Site home page Giter Site logo

pixels's Introduction

Toy support library for primitive graphics programming.

pixels's People

Contributors

araq avatar iffy avatar narimiran avatar

Stargazers

Armando Hinojosa avatar Magnus Nemo avatar David Sarma avatar  avatar  avatar GAURAV avatar Sultan Al Isaiee avatar Charles  Cianos avatar Mamy Ratsimbazafy avatar Constantine Molchanov avatar Qaziquza avatar

Watchers

 avatar  avatar  avatar Solitude avatar  avatar

pixels's Issues

nothing appears in window

I have the "Mastering Nim" book. Trying to run the first code example:

import pixels

# needed to install sdl2 and sdl2_tff

put_pixel(5, 9)
put_pixel(11, 18, Red)

(btw the book didn't say I needed the sdl2 and sdl2_tff libraries; kept getting compilation errors until I figured it out)

Anyway, I run this example and a window appears, but nothing is in it. It just shows the background pixels fixed in place:

untitled.mp4

Is there anything else I need to install to make this work? Or some kind of config setting?

OS is Manjaro Linux KDE.

drawText with Unicode doesn't work

import pixels
drawText 30, 40, "Hello, 世界", 16, Yellow

Results in the following on my macOS machine:
Screen Shot 2022-07-15 at 4 00 17 PM

If I get some time, I'll dig into what changes need to happen to make this work.

Great book, btw!

Implicit dependencies : sdl2 and sdl2_ttf

On Archlinux 5.18.14-zen1-1-zen, I need to install sdl2_ttf, otherwise I get a runtime error.

could not load: libSDL2_ttf(|-2.0).so(|.0)
(compile with -d:nimDebugDlOpen for more information)
Error: execution of an external program failed: '/home/kolmogorov/Documents/dev/mastering_nim/src/chapter1 '

I added import sdl2 on top of the first script of mastering nim example, and downloaded sdl2_ttf via pacman:
sudo pacman -S sdl2_ttf
I had also installed sdl2 nim package through nimble. I solved my problem by this installation of sdl2_ttf. The dependency sdl2_ttf should be added to pixels.nimble.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.