
CirclePlugin is a Weland plugin for drawing circles.

Installation notes: There are three files included in the zip file (in addition to this README). Put CirclePlugin.dll in the Weland Plugins directory before launching Weland. Make sure you have the latest version of Weland (currently 1.4.1). CirclePlugin.cs and CirclePlugin.glade are the source code files, included for anyone interested in writing their own plugins. Note this was the first code I've written in C# (and, by extension, for Mono), so it may not be the best example of how to do it. Notably, it uses GladeXML, which was deprecated by the GNOME group years ago, but Mono still doesn't have documentation for Gtk.Builder.

Usage notes: The center and radius parameters are specified in AlephOne's internal units of 1/1024 of a World Unit. Angles are specified in degrees as real numbers (decimals allowed). The last parameter specifies how many lines are used to draw the circle. Use the popup menu to select how you want to specify this. '# Arcs' directly specifies the number of lines, 'Arc Length' specifies the length of each line and computes the number based on that, and 'Arc Angle' specifies the angle subtended by each arc. Using 'Arc Angle' is really no different than '# Arcs' (number of lines = (EndAngle - StartAngle) / ArcAngle), but maybe some folks would rather use that. It's also a little helpful if you want to draw more than 360 degrees for making sure that end points don't fall on top of each other. In that case, just make sure that your arc angle does not divide evenly into 360.

New in v1.1: If a point is selected in the map before invoking Draw Circle, that point will be set as the center of the circle in the parameters. If a line is selected in the map before choosing the Draw Circle plugin, the parameters will be filled in such that that line will be the diameter of the circle. A best attempt will be made to connect the line to the circle, but it will only connect both ends when using an even number of arcs, and occasionally rounding errors will result in an unconnected line. In the latter case, it's relatively simple to fix by deleting the line(s) next to offending point, and redrawing them by hand to connect to the line. Also, the X, Y, and Radius fields now allow real numbers (to support the new feature), but it is generally recommended that they be specified as integers.

New in v1.2: A new parameter - "Connect Inwards" - will connect each point on the circle to the nearest point inwards along a radius from that point, or the center if no such point exists. Very useful for connecting corresponding points on concentric circles (creating rings). Fixed the parameters dialog box to handle longer inputs (needed for v1.1 added features). Reworked algorithm so that arc selection (number, length, or angle) is given priority when rounding values. Previously when specifying arc length or arc angle, the number of arcs would be computed and the specified value rounded. Removed source code files.


Any questions, suggestions, bug reports or other comments are best left in a topic at the Pfhorums (http://pfhorums.com/viewtopic.php?f=24&t=36870).

