Hi Scott,
On Mar 5, 2010, at 8:34 AM, Scott Thompson wrote:
> I'm using MacRuby to work with CoreGraphics and having some trouble with
> pointers.
>
> My first attempt was to create the data for a bitmap context using
> NSMutableData:
>
> bitmap_data = NSMutableData.alloc.initWithLength(image
> The good news is that you might not need to worry about it in this
> case. In 10.6, you can pass NULL (use 'nil' in MacRuby) as the first
> argument to CGBitmapContextCreate, as long as you don't mind letting
> CoreGraphics manage the memory allocation for you:
I am very much aware of that.
U
Hi Scott,
The problem is due to the way the macruby Pointer class handles types,
which apparently is due to an LLVM issue... The Pointer class is
defined in compiler.cpp. See this comment:
---
VALUE
rb_pointer_new(const char *type_str, void *val, size_t len)
{
// LLVM doesn't allow to get a p
I'm using MacRuby to work with CoreGraphics and having some trouble with
pointers.
My first attempt was to create the data for a bitmap context using
NSMutableData:
bitmap_data = NSMutableData.alloc.initWithLength(image_data_size)
bitmap_context = CGBitmapContextCreate(