Hi,

Ive currently got a library which isnt *exactly* cross platform, but the same principle would apply.

The current problem i have is that i have my own Point class, that is the building blocks for custom Rectangle, Circle, Polygon classes. Now they all have their own collision detection built in and can be transformed amongst each other.

Anyway the issue i have is that now i want to draw my polygon to the screen, so it exposes a list of its custom Point objects, but the FillPolygon in GDI takes a list of System.Drawing.Point. So im sure this is a common problem faced by people who do cross platform development.

So my only option that i can see at the moment is whenever i need to draw convert all internal custom points to .net points and shoot them over. However this would be done every redraw event, meaning it would end up throwing memory away all over the place, which sounds quite bad to me.

Also this is just for GDI, it may be used with other drawing libraries, but all options seem to end with duplicating the data, i can possibly inherit a custom GDIPoint from that class or something that makes sense, and then have a cached list of points that GDI can use, but is there any trick to this, or do you always have to duplicate your data? (i guess in C/C++ you can manually fudge the memory into the correct objects making it alot faster)

Any advice would be great!