Harmonize Snapshot functions
Description
I'm working on the documentation and are now checking the SnapShot functions.
I noticed SnapShot() is generated as
Image _DMap.SnapShot(object boundBox)
And used as
axMap1.SnapShot(_axMap1.Extents);
And SnapShotToDC2() is generated as
{{public bool SnapShotToDC2(IntPtr hDc, Extents extents, int width, }}
The differences I see, which I don't understand, are:
1) SnapShot is using the interface: _DMap.SnapShot, like SnapShot2 and SnapShot3.
2) For SnapShot the extents is passed as an object.
For SnapShotToDC2() the extents is passed as an Extents, but instead of bool _DMap. public bool is generated. The same for SnapShotToDC2.
I know the SnapShotToDC2 functions are newer than the SnapShot functions.
Can't we harmonize these functions, to make it more clear to the users?
I think we should avoid passing objects when we know the type we expect, like the extents in this example.
Activity
At least for round one, the primary change was passing and IExtents* rather than an IDispatch* into the SnapShot method. So now,
All SnapShot methods return an Image*
All SnapShotToDC methods return a VARIANT_BOOL
All Extents references in these function take an IExtents*
Were there other recommendations?
Â