changed 'fixed' line option to 'fix'

This commit is contained in:
Hannes Janetzek 2013-06-07 02:07:33 +02:00
parent 38b3443927
commit a3e82be917
2 changed files with 215 additions and 247 deletions

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mapsforge.org/renderTheme"
targetNamespace="http://mapsforge.org/renderTheme" xmlns:tns="http://mapsforge.org/renderTheme" xmlns:tns="http://mapsforge.org/renderTheme" elementFormDefault="qualified" xml:lang="en">
elementFormDefault="qualified" xml:lang="en">
<!-- attribute types --> <!-- attribute types -->
<xs:simpleType name="cap"> <xs:simpleType name="cap">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
@ -83,83 +82,61 @@
<!-- rendering instructions --> <!-- rendering instructions -->
<xs:complexType name="area"> <xs:complexType name="area">
<xs:attribute name="name" type="xs:string" use="optional" <xs:attribute name="name" type="xs:string" use="optional" default="0" />
default="0" />
<xs:attribute name="src" type="tns:src" use="optional" /> <xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="fill" type="tns:color" use="optional" <xs:attribute name="fill" type="tns:color" use="optional" default="#000000" />
default="#000000" /> <xs:attribute name="stroke" type="tns:color" use="optional" default="#00000000" />
<xs:attribute name="stroke" type="tns:color" use="optional" <xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional"
default="#00000000" /> default="0" />
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat" <xs:attribute name="fade" type="xs:integer" use="optional" default="-1" />
use="optional" default="0" /> <xs:attribute name="blend" type="xs:integer" use="optional" default="-1" />
<xs:attribute name="fade" type="xs:integer" use="optional" <xs:attribute name="blend-fill" type="tns:color" use="optional" default="#000000" />
default="-1" />
<xs:attribute name="blend" type="xs:integer" use="optional"
default="-1" />
<xs:attribute name="blend-fill" type="tns:color" use="optional"
default="#000000" />
</xs:complexType> </xs:complexType>
<xs:complexType name="caption"> <xs:complexType name="caption">
<xs:attribute name="k" type="tns:textKey" use="required" /> <xs:attribute name="k" type="tns:textKey" use="required" />
<xs:attribute name="dy" type="xs:float" use="optional" <xs:attribute name="dy" type="xs:float" use="optional" default="0" />
default="0" /> <xs:attribute name="font-family" type="tns:fontFamily" use="optional"
<xs:attribute name="font-family" type="tns:fontFamily" default="default" />
use="optional" default="default" />
<xs:attribute name="font-style" type="tns:fontStyle" use="optional" <xs:attribute name="font-style" type="tns:fontStyle" use="optional"
default="normal" /> default="normal" />
<xs:attribute name="font-size" type="tns:nonNegativeFloat" <xs:attribute name="font-size" type="tns:nonNegativeFloat" use="optional"
use="optional" default="0" /> default="0" />
<xs:attribute name="fill" type="tns:color" use="optional" <xs:attribute name="fill" type="tns:color" use="optional" default="#000000" />
default="#000000" /> <xs:attribute name="stroke" type="tns:color" use="optional" default="#000000" />
<xs:attribute name="stroke" type="tns:color" use="optional" <xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional"
default="#000000" /> default="0" />
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat"
use="optional" default="0" />
</xs:complexType> </xs:complexType>
<xs:complexType name="circle"> <xs:complexType name="circle">
<xs:attribute name="r" type="tns:nonNegativeFloat" use="required" /> <xs:attribute name="r" type="tns:nonNegativeFloat" use="required" />
<xs:attribute name="scale-radius" type="xs:boolean" use="optional" <xs:attribute name="scale-radius" type="xs:boolean" use="optional"
default="false" /> default="false" />
<xs:attribute name="fill" type="tns:color" use="optional" <xs:attribute name="fill" type="tns:color" use="optional" default="#00000000" />
default="#00000000" /> <xs:attribute name="stroke" type="tns:color" use="optional" default="#00000000" />
<xs:attribute name="stroke" type="tns:color" use="optional" <xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional"
default="#00000000" /> default="0" />
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat"
use="optional" default="0" />
</xs:complexType> </xs:complexType>
<xs:complexType name="line"> <xs:complexType name="line">
<!-- named style --> <!-- named style -->
<xs:attribute name="name" type="xs:string" use="optional" <xs:attribute name="name" type="xs:string" use="optional" default="0" />
default="0" />
<!-- inherited style --> <!-- inherited style -->
<xs:attribute name="from" type="xs:string" use="optional" <xs:attribute name="from" type="xs:string" use="optional" default="0" />
default="0" />
<xs:attribute name="src" type="tns:src" use="optional" /> <xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="stroke" type="tns:color" use="optional" <xs:attribute name="stroke" type="tns:color" use="optional" default="#000000" />
default="#000000" /> <xs:attribute name="width" type="xs:float" use="optional" default="0" />
<xs:attribute name="width" type="xs:float"
use="optional" default="0" />
<!-- minimum scaled width to draw outline --> <!-- minimum scaled width to draw outline -->
<xs:attribute name="min" type="xs:float" <xs:attribute name="min" type="xs:float" use="optional" default="0" />
use="optional" default="0" /> <xs:attribute name="stroke-dasharray" type="tns:strokeDasharray" use="optional" />
<xs:attribute name="stroke-dasharray" type="tns:strokeDasharray" <xs:attribute name="cap" type="tns:cap" use="optional" default="round" />
use="optional" /> <xs:attribute name="outline" type="xs:integer" use="optional" default="0" />
<xs:attribute name="cap" type="tns:cap" use="optional" <xs:attribute name="fade" type="xs:integer" use="optional" default="-1" />
default="round" /> <xs:attribute name="blur" type="xs:float" use="optional" default="-1" />
<xs:attribute name="outline" type="xs:integer" use="optional" <xs:attribute name="fix" type="xs:boolean" use="optional" default="false" />
default="0" />
<xs:attribute name="fade" type="xs:integer" use="optional"
default="-1" />
<xs:attribute name="blur" type="xs:float" use="optional"
default="-1" />
<xs:attribute name="fixed" type="xs:boolean" use="optional"
default="false" />
</xs:complexType> </xs:complexType>
<!-- <xs:complexType name="outline"> <!-- <xs:complexType name="outline">
<xs:attribute name="name" type="xs:string" use="optional" <xs:attribute name="name" type="xs:string" use="optional"
default="0" /> default="0" />
<xs:attribute name="src" type="tns:src" use="optional" /> <xs:attribute name="src" type="tns:src" use="optional" />
@ -168,37 +145,30 @@
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat" <xs:attribute name="stroke-width" type="tns:nonNegativeFloat"
use="optional" default="0" /> use="optional" default="0" />
</xs:complexType> </xs:complexType>
--> -->
<xs:complexType name="lineSymbol"> <xs:complexType name="lineSymbol">
<xs:attribute name="src" type="tns:src" use="required" /> <xs:attribute name="src" type="tns:src" use="required" />
<xs:attribute name="align-center" type="xs:boolean" use="optional" <xs:attribute name="align-center" type="xs:boolean" use="optional"
default="false" /> default="false" />
<xs:attribute name="repeat" type="xs:boolean" use="optional" <xs:attribute name="repeat" type="xs:boolean" use="optional" default="false" />
default="false" />
</xs:complexType> </xs:complexType>
<xs:complexType name="text"> <xs:complexType name="text">
<xs:attribute name="name" type="xs:string" use="optional" <xs:attribute name="name" type="xs:string" use="optional" default="0" />
default="0" /> <xs:attribute name="style" type="xs:string" use="optional" default="0" />
<xs:attribute name="style" type="xs:string" use="optional" <xs:attribute name="k" type="tns:textKey" use="optional" default="name" />
default="0" /> <xs:attribute name="dy" type="xs:float" use="optional" default="0" />
<xs:attribute name="k" type="tns:textKey" use="optional" default="name"/> <xs:attribute name="font-family" type="tns:fontFamily" use="optional"
<xs:attribute name="dy" type="xs:float" use="optional" default="default" />
default="0" />
<xs:attribute name="font-family" type="tns:fontFamily"
use="optional" default="default" />
<xs:attribute name="font-style" type="tns:fontStyle" use="optional" <xs:attribute name="font-style" type="tns:fontStyle" use="optional"
default="normal" /> default="normal" />
<xs:attribute name="font-size" type="tns:nonNegativeFloat" <xs:attribute name="font-size" type="tns:nonNegativeFloat" use="optional"
use="optional" default="0" /> default="0" />
<xs:attribute name="fill" type="tns:color" use="optional" <xs:attribute name="fill" type="tns:color" use="optional" default="#000000" />
default="#000000" /> <xs:attribute name="stroke" type="tns:color" use="optional" default="#000000" />
<xs:attribute name="stroke" type="tns:color" use="optional" <xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional"
default="#000000" /> default="0" />
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat" <xs:attribute name="caption" type="xs:boolean" use="optional" default="false" />
use="optional" default="0" />
<xs:attribute name="caption" type="xs:boolean" use="optional"
default="false" />
</xs:complexType> </xs:complexType>
<xs:complexType name="symbol"> <xs:complexType name="symbol">
@ -231,8 +201,7 @@
<xs:attribute name="e" type="tns:elementList" use="required" /> <xs:attribute name="e" type="tns:elementList" use="required" />
<xs:attribute name="k" type="xs:string" use="required" /> <xs:attribute name="k" type="xs:string" use="required" />
<xs:attribute name="v" type="xs:string" use="required" /> <xs:attribute name="v" type="xs:string" use="required" />
<xs:attribute name="closed" type="tns:closed" use="optional" <xs:attribute name="closed" type="tns:closed" use="optional" default="any" />
default="any" />
<xs:attribute name="zoom-min" type="xs:unsignedByte" use="optional" <xs:attribute name="zoom-min" type="xs:unsignedByte" use="optional"
default="0" /> default="0" />
<xs:attribute name="zoom-max" type="xs:unsignedByte" use="optional" <xs:attribute name="zoom-max" type="xs:unsignedByte" use="optional"
@ -256,14 +225,13 @@
<xs:element name="rule" type="tns:rule" /> <xs:element name="rule" type="tns:rule" />
</xs:sequence> </xs:sequence>
</xs:sequence> </xs:sequence>
<xs:attribute name="version" type="xs:positiveInteger" <xs:attribute name="version" type="xs:positiveInteger" use="required" />
use="required" />
<xs:attribute name="map-background" type="tns:color" use="optional" <xs:attribute name="map-background" type="tns:color" use="optional"
default="#ffffff" /> default="#ffffff" />
<xs:attribute name="base-stroke-width" type="tns:nonNegativeFloat" <xs:attribute name="base-stroke-width" type="tns:nonNegativeFloat" use="optional"
use="optional" default="1" /> default="1" />
<xs:attribute name="base-text-size" type="tns:nonNegativeFloat" <xs:attribute name="base-text-size" type="tns:nonNegativeFloat" use="optional"
use="optional" default="1" /> default="1" />
</xs:complexType> </xs:complexType>

View File

@ -93,7 +93,7 @@ public final class Line extends RenderInstruction {
width = Float.parseFloat(value); width = Float.parseFloat(value);
} else if ("cap".equals(name)) { } else if ("cap".equals(name)) {
cap = Cap.valueOf(value.toUpperCase(Locale.ENGLISH)); cap = Cap.valueOf(value.toUpperCase(Locale.ENGLISH));
} else if ("fixed".equals(name)) { } else if ("fix".equals(name)) {
fixed = Boolean.parseBoolean(value); fixed = Boolean.parseBoolean(value);
} else if ("stipple".equals(name)) { } else if ("stipple".equals(name)) {
stipple = Integer.parseInt(value); stipple = Integer.parseInt(value);