Re: [sdljava-users] Anyone using get/setPixelDataXX()?
Status: Beta
Brought to you by:
ivan_ganza
|
From: Ivan Z. G. <iva...@ya...> - 2005-07-12 21:54:31
|
Hi Steph,
Not a problem. I did not have time to properly test them, however, the
code was actually still in the native layer from where I first coded
that part , and I know it was working at that point.
The reason for long instead of int is because that is how swig maps it.
void SWIG_GetPixelData32(SDL_Surface *surface, Uint32 pixelData[])
For the above SWIG mapg the Uint32 to a long[]. I suppose we could add
our own (additonal) method with takes an int[] and casts it to long[]
calling the appropriate method (for conviencence). Not sure if that
would cause any problems due to the cast.
-Ivan/
S. Meslin-Weber wrote:
>Hi Ivan,
>
>Thanks for the additions! Is there a reason for going with long[] for
>32bit instead of int[] ?
>
>Thanks,
>
>Steph
>
>On Fri, Jul 08, 2005 at 10:55:19AM -0400, Ivan Z. Ganza wrote:
>
>
>>Greetings,
>>
>>I have checked in code which adds the following methods to SDLSurface:
>>
>> public long[] getPixelData32()
>> public int[] getPixelData16()
>> public short[] getPixelData8()
>>
>> public void setPixelData32(long[] pixelData)
>> public void setPixelData16(int[] pixelData)
>> public void setPixelData8(short[] pixelData)
>>
>>Cheers,
>>-Ivan/
>>
>>S. Meslin-Weber wrote:
>>
>>
>>
>>>Hi everyone,
>>>
>>>I'm cleaning up some code in Odonata and in the sdljava provider I've
>>>found that I use get/setPixelData32(long[]). Would it be possible to
>>>rationalise the types used for these methods? Does anyone still use
>>>them?
>>>
>>>long[] 64 bit colour data
>>>int[] 32 ...
>>>short[] 16 ...
>>>byte[] 8 ...
>>>
>>>Essentially it'd mean changing the signatures for the get/set methods to
>>>match the bit sizes they're operating with.
>>>
>>>I've seen the gradual move to using ByteBuffer and Buffers in general...
>>>Odonata intends to work with JVM versions 1.1+ so those classes wouldn't
>>>necessarily be available on those targets :)
>>>
>>>Cheers,
>>>
>>>Steph
>>>
>>>
>>>
>>>
>>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
>>July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
>>core and dual graphics technology at this free one hour event hosted by HP,
>>AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
>>_______________________________________________
>>sdljava-users mailing list
>>sdl...@li...
>>https://lists.sourceforge.net/lists/listinfo/sdljava-users
>>
>>
>
>
>
|