[Gambas-user] Clipper counter-intuitivities
Tobias Boege
taboege at ...626...
Thu Jun 18 20:38:03 CEST 2015
Hi Benoit,
the attached project shows two strange behaviours of Polygon from the
gb.clipper component.
(1) Polygon._get() returns a new PointF object created on the fly from
internal data. However, people would think that
hPolygon[0].X = 20
should modify the zeroth point's x coordinate to 20, which it doesn't
in the current implementation. Can't we cache the PointF objects such
that changes to the return values of _get() are updated into the
Polygon?
(2) If I AddPoint() like this
pPoint = New PointF(10, 10)
hPolygon.AddPoint(pPoint)
Print hPolygon[hPolygon.Max].X
it yields zero, but I feel it should be 10. I have no explanation for
this one.
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clipper-strangeness-0.0.1.tar.gz
Type: application/octet-stream
Size: 3833 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20150618/6015743f/attachment.obj>
More information about the User
mailing list