List Info

Thread: flash export: rewrit the isEqual()in Polygon to solve the little error of the points




flash export: rewrit the isEqual()in Polygon to solve the little error of the points
user name
2007-08-21 21:19:06
Hi Christian,
I found the problem that the aPolyPolyg cannot be compared
to be equal is caused by the "map(aPolyPoly)" in
Writer::Impl_writePolyPolygon(). The
"map(aPolyPoly)" caused the little error of the
position of the points, so if I rewrite the isEqual() of
Polygon, which can obtain the little error, then the problem
can be solved. What do you think about that? Can I do this
in this place?

Best Regards,
Fang




Fang Yaqiong fangyqch2000.com.cn
2007-08-22
Regards&Thanks!
Tel:010-5802-2828 Ext.693
Beijing Redflag CH2000 Software Co., Ltd.
Re: flash export: rewrit the isEqual()in Polygon to solve the little error of the poi
user name
2007-08-22 03:28:00
Hi Fang,

great, have you found out why the mapping causes an error?
It should
have equal results for equal PolyPolygon so this
sounds weird.
Please do not change the IsEqual method of the Polygon,
unless you found
a real error. Depending on your fix I would
either suggest implementing an isEqual() method for the
flash writer or
maybe adding a compare method to the
Polygon where you can give a delta value as parameter wich
would be the
maximum difference between points to
consider them equal.

Something like

bool Polygon::compare( PolyPolygon other, int epsilon )
{
if number of points from this not equal to number of points
from other
return false

for each point in this and other
if distance between point of this and point of other is
greater epsilon
return false


return true
}

Regards,
Christian

Fang Yaqiong wrote:
> Hi Christian,
> I found the problem that the aPolyPolyg cannot be
compared to be equal
> is caused by the "map(aPolyPoly)" in
Writer::Impl_writePolyPolygon().
> The "map(aPolyPoly)" caused the little error
of the position of the
> points, so if I rewrite the isEqual() of Polygon, which
can obtain the
> little error, then the problem can be solved. What do
you think about
> that? Can I do this in this place?
> Best Regards,
> Fang
>
------------------------------------------------------------
------------
> Fang Yaqiong fangyqch2000.com.cn
<mailto:fangyqch2000.com.cn>
> 2007-08-22
> Regards&Thanks!
> Tel:010-5802-2828 Ext.693
> Beijing Redflag CH2000 Software Co., Ltd.


-- 
Sun Microsystems GmbH
Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribegraphics.openoffice.org
For additional commands, e-mail: dev-helpgraphics.openoffice.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )