<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
	<_name>Measure Path</_name>
	<id>com.njhurst.filter.measure_length</id>
	<dependency type="executable" location="extensions">measure.py</dependency>
	<dependency type="executable" location="extensions">inkex.py</dependency>
	<param name="tab" type="notebook">
		<page name="measure" _gui-text="Measure">
			<param name="type" type="enum" _gui-text="Measurement Type: ">
				<_item value="length">Length</_item>
				<_item msgctxt="measure extension" value="area">Area</_item>
				<_item msgctxt="measure extension" value="cofm">Center of Mass</_item>
			</param>
			<param name="format" type="notebook">
				<page name="presets" _gui-text="Presets">
					<param name="presetFormat" type="enum">
						<_item value="default">Default</_item>
						<_item value="TaP_start">Text on Path, Start</_item>
						<_item value="TaP_middle">Text on Path, Middle</_item>
						<_item value="TaP_end">Text on Path, End</_item>
						<_item value="FT_start">Fixed Text, Start of Path</_item>
						<_item value="FT_bbox">Fixed Text, Center of BBox</_item>
						<_item value="FT_mass">Fixed Text, Center of Mass</_item>
					</param>
				</page>
				<page name="textonpath" _gui-text="Text on Path">
					<param name="startOffset" type="string" gui-hidden="true">custom</param>
					<param name="startOffsetCustom" type="int" appearance="full" min="0" max="100" _gui-text="Offset (%)">50</param>
					<param name="anchor" type="enum" _gui-text="Text anchor:">
						<_item value="start">Left</_item>
						<_item value="middle">Center</_item>
						<_item value="end">Right</_item>
					</param>
				</page>
				<page name="fixedtext" _gui-text="Fixed Text">
					<param name="position" type="enum" _gui-text="Position:">
						<_item value="start">Start of Path</_item>
						<_item value="center">Center of BBox</_item>
						<_item value="mass">Center of Mass</_item>
					</param>
					<param name="angle" type="float" min="-360" max="360" _gui-text="Angle (°):">0</param>
				</page>
			</param>
			<param name="fontsize" type="int" min="1" max="1000" _gui-text="Font size (px):">12</param>
			<param name="offset" type="float" min="-10000" max="10000" _gui-text="Offset (px):">-6</param>
			<param name="precision" type="int" min="0" max="25" _gui-text="Precision:">2</param>
			<param name="scale" type="float" min="1e-8" max="1e10" _gui-text="Scale Factor (Drawing:Real Length) = 1:">1</param>
			<param name="unit" type="enum" _gui-text="Length Unit:">
				<item value="px">px</item>
				<item value="pt">pt</item>
				<item value="in">in</item>
				<item value="ft">ft</item>
				<item value="yd">yd</item>
				<item value="mm">mm</item>
				<item value="cm">cm</item>
				<item value="m">m</item>
				<item value="km">km</item>
			</param>
		</page>
		<page name="desc" _gui-text="Help">
			<_param name="measurehelp" type="description" xml:space="preserve">This effect measures the length, area, or center-of-mass of the selected paths. Length and area are added as a text object with the selected units. Center-of-mass is shown as a cross symbol.

  * Text display format can be either Text-On-Path, or stand-alone text at a specified angle.
  * The number of significant digits can be controlled by the Precision field.
  * The Offset field controls the distance from the text to the path.
  * The Scale factor can be used to make measurements in scaled drawings. For example, if 1 cm in the drawing equals 2.5 m in the real world, Scale must be set to 250.
  * When calculating area, the result should be precise for polygons and Bezier curves. If a circle is used, the area may be too high by as much as 0.03%.</_param>
		</page>
	</param>
	<effect>
		<object-type>path</object-type>
		<effects-menu>
			<submenu _name="Visualize Path"/>
		</effects-menu>
	</effect>
	<script>
		<command reldir="extensions" interpreter="python">measure.py</command>
	</script>
</inkscape-extension>
