This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let bitmapBuffer = UnsafePointer<UInt8>.alloc(Int(height * width * 4)) | |
let pixelNumber = (x * 4) + (y * width * 4) | |
bitmapBuffer[pixelNumber + 3] = 255 // Alpha | |
bitmapBuffer[pixelNumber + 2] = redValue | |
bitmapBuffer[pixelNumber + 1] = greenValue | |
bitmapBuffer[pixelNumber + 0] = blueValue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
STDOUT.sync = true | |
STDERR.sync = true | |
require 'pathname' | |
at_exit do | |
if (e = $!) && !e.instance_of?(SystemExit) | |
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape" |