class Iup::ImageRGBA
Image
made from RGBA values.
Public Class Methods
new(width, height, pixels, &block)
click to toggle source
Constructor creates an image from raw pixels, using 4-values per pixel.
- width
-
width of image in pixels
- height
-
height of image in pixels
- pixels
-
an array of pixel values
- block
-
an optional block to set attributes
# File lib/wrapped/image.rb, line 111 def initialize width, height, pixels, &block @handle = IupLib.IupImageRGBA width, height, IupLib.pointer_from_chars(pixels) # run any provided block on instance, to set up further attributes self.instance_eval &block if block_given? end