GTKD Cairo get pixel color

TheDGuy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 5 09:37:04 PST 2016


On Tuesday, 5 January 2016 at 17:34:06 UTC, Basile B. wrote:
> On Tuesday, 5 January 2016 at 17:16:10 UTC, TheDGuy wrote:
>> On Tuesday, 5 January 2016 at 16:43:00 UTC, Basile B. wrote:
>>> [...]
>>
>> Okay, but what is this?
>>
>> "import iz.memory, iz.streams, iz.properties;"
>>
>> I dont' understand what "MemoryStream" is?
>
> MemoryStream is a managed pointer with methods to read and 
> write at a particlular postion. In the Bitmap class I often 
> refer to .memory which is just the managed pointer.
>
> - iz.properties is used to anotate what has to be serialiazed 
> or not and it's pointless here (@Set @Get).
> - iz.memory is just imported because I use (construct!T) 
> instead of "new" to allocate a class instance.
>
> But these are implementation details. Just try to imagine that 
> you manage the bitmap data yourself with realloc/free...

No offense, but why is the same thing done in 3 lines in C++ but 
needs 200 lines in D?


More information about the Digitalmars-d-learn mailing list