Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Graphical output under X.Org

tree: 1d1c55c382

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ext
Octocat-spinner-32 lib
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .yardopts
Octocat-spinner-32 COPYING
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
README.md

hornetseye-xorg

Author: Jan Wedekind Copyright: 2010 License: GPL

Synopsis

This Ruby extension provides graphical output under X.Org.

Installation

hornetseye-xorg requires the X.Org and Mesa development headers. If you are running Debian or (K)ubuntu, you can install them like this:

$ sudo aptitude install xserver-xorg-dev libxv-dev libxpm-dev libgl1-mesa-dev libglu1-mesa-dev

To install this Ruby extension, use the following command:

$ sudo gem install hornetseye-xorg

Alternatively you can build and install the Ruby extension from source as follows:

$ rake
$ sudo rake install

Usage

Simply run Interactive Ruby:

$ irb

You can load and use the X.Org wrappers as shown below. This example shows how to display an image:

require 'rubygems'
require 'hornetseye_xorg'
include Hornetseye
img = lazy( 640, 480 ) { RGB 255, 0, 0 }
img.show

Here is another example. It demonstrates display of a video:

require 'rubygems'
require 'hornetseye_xorg'
include Hornetseye
X11Display.show do
  lazy( 320, 240 ) { RGB ( Time.new.to_f * 256 ) % 256, 0, 0 }
end
Something went wrong with that request. Please try again.