SimplePointMarker draws incorrect ellipse #137

platinumICE opened this Issue Aug 24, 2016 · 3 comments


None yet

2 participants


Ellipse drawn by SimplePointMarker draws incorrectly.

Function call pg.ellipse() by default uses ellipseMode(CORNER) by default so the ellipse center is drawn off by the value of radius.

Call to pg.ellipse() in draw() should be preceded by call to pg.ellipseMode(pg.RADIUS);

@tillnagel tillnagel self-assigned this Aug 24, 2016

Correction: default is ellipseMode(CENTER), but it should be ellipseMode(RADIUS), otherwise the size of the marker is wrong (twice as small), not the position.


Can you give an example on why you think the size of the marker is wrong? ellipseMode(CENTER) is Processing's default.



Here is an example sketch. If you use ellipseMode(CENTER), then don't call this attribute radius, it should be called diameter. This is especially apparent when you try getHitMarkers(). In the sketch red circle is drawn by marker with radius = 200px. Black circle is drawn manually with ellipse command, ellipseMode = RADIUS and radius = 200px.

If you click the map "Marker is hit\missed" is displayed in output via getHitMarkers(). Watch how hit area actually covers black circle area, not only the red one.

@tillnagel tillnagel added a commit that closed this issue Oct 7, 2016
@tillnagel Fixed #137 SimplePointMarker size display and hit test. Now radius
parameter is used correctly as radius. NB: This might break previous
behavior and modify the visual result of your existing code!
@tillnagel tillnagel closed this in 68ec193 Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment