ok. is this an bug with bridgesupport, or just the way things are designed?

i was writing a small fractal app, and wanted to try to write directly to a 
bitmap, to see if it was faster than using setPixel() repeatedly. but i gues 
ruby doesn't allow writing to memory directly without some class (like String 
or Pointer) range-checking every write?



-emil



On 03/08/2010, at 04.25, MacRuby wrote:

> #818: NSBitmapImageRep#bitmapData returns empty String
> -------------------------+--------------------------------------------------
> Reporter:  e...@…       |       Owner:  lsansone...@…                         
>                   
>     Type:  defect       |      Status:  new                                   
>                   
> Priority:  major        |   Milestone:                                        
>                   
> Component:  MacRuby      |    Keywords:  bitmap,NSBitmapImageRep, 
> @nsBitmapImageRepObj.bitmapData
> -------------------------+--------------------------------------------------
> 
> Comment(by lsansone...@…):
> 
> Unfortunately there is little we can do here. -bitmapData returns a
> "unsigned char *" type and MacRuby assumes this is a string. However,
> since the first byte is null, the resulted string object is empty.
> 
> There are other ways of getting the data. -getPixel:atX:y: for example
> might work better.
> 
> I am leaving this bug open in the idea that we might find a solution for
> the -bitmapData problem.
> 
> -- 
> Ticket URL: <http://www.macruby.org/trac/ticket/818#comment:2>
> MacRuby <http://macruby.org/>
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to