windrobin / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 1 forks source link

Function IntermediatePoint changes origin #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call IntermediatePoint passing in an origin point
2. Both the return value and origin are now the same value
3.

What is the expected output? What do you see instead?
The origin parameter should not be changed

What version of the product are you using? On what operating system?
Vista 64

Please provide any additional information below.
The error occurs in this line;

IKmlPoint result = origin;

Since the "origin" parm is passed by ref, changes to the "result" object 
will change the "origin" object

This is likely a kludge to get around the fact that you cannot create a 
IKmlPoint without the IGEPlugin object. The method should be changed to 
either take a IKmlPoint output parm, or add a IGEPlugin parm to the 
method. The latter is what I am doing with my static methods. 
Alternatively you could potentially add this as an extension method to 
IGEPlugin.

Original issue reported on code.google.com by robert.s...@lacota.com on 1 Nov 2009 at 6:12

GoogleCodeExporter commented 9 years ago
Yes, I will amend the methods that return point objects to accept a plug-in 
object as a 
parameter so that a new 'result' point can be created. Thanks for pointing that 
out.

F.

Original comment by fraser.c...@gmail.com on 1 Nov 2009 at 7:00

GoogleCodeExporter commented 9 years ago

Original comment by fraser.c...@gmail.com on 3 Nov 2009 at 4:48