sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.69k stars 641 forks source link

[DWrite] ColorGlyphRun.GlyphRunDescription property should have type GlyphRunDescription rather than IntPtr. #1015

Open Jayonas opened 6 years ago

Jayonas commented 6 years ago

I suspect that the type of this property is IntPtr just because nobody has gotten around to writing custom marshaling code for ColorGlyphRun yet, so the auto-generated code is just doing its default pointer marshaling.

(Note that I'm basing this off my usage of SharpDX 3.1.1, which I realize is out of date, but it also doesn't look like much has happened in the DWrite code since then so I think it's likely that this is still an issue.)

jkoritzinsky commented 6 years ago

The issue here is that the property on DWRITE_COLOR_GLYPH_RUN is a pointer to an instance of DWRITE_GLYPH_RUN_DESCRIPTION. Currently, pointer members in structures are all marshalled as IntPtrs.

xoofx commented 6 years ago

The issue here is that the property on DWRITE_COLOR_GLYPH_RUN is a pointer to an instance of DWRITE_GLYPH_RUN_DESCRIPTION. Currently, pointer members in structures are all marshalled as IntPtrs.

Yes, usually they require a custom marshalling