Changes between Initial Version and Version 1 of MapGuideRfc113


Ignore:
Timestamp:
06/07/11 00:53:05 (14 years ago)
Author:
Aleck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc113

    v1 v1  
     1= !MapGuide RFC # - Title Goes Here =
     2
     3This page contains a change request (RFC) for the !MapGuide Open Source project.
     4More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
     5
     6
     7== Status ==
     8
     9||RFC Template Version||(1.0)||
     10||Submission Date||(June 7, 2010)||
     11||Last Modified||(Aleck Sun) (June 7, 2010)||
     12||Author||(Aleck Sun)||
     13||RFC Status||(draft)||
     14||Implementation Status||(pending)||
     15||Proposed Milestone||(2.3)||
     16||Assigned PSC guide(s)||(when determined)||
     17||'''Voting History'''||(vote date)||
     18||+1|| ||
     19||+0|| ||
     20||-0|| ||
     21||-1|| ||
     22||no vote|| ||
     23
     24== Overview ==
     25
     26There is one issue found with current symbol definition schema that there is no way to scale a path symbol easily for a user. This RFC describes the proposed schema changes which address the issues.
     27
     28== Motivation ==
     29
     30Currently with !CompositeTypeStyle, user can reference a predefined symbol on stylizing while he will be able to adjust value of any properties that are exposed by the symbol definition as parameters. However, unlike text and image graphics, a path cannot be scaled by setting any property. The only work-around to scale a path is to set the scale of a symbol instance. However, if the scale of a symbol instance is modified, not only the size of the path geometry is scaled, but also all the other length properties like size of other graphics, the repeat interval defined in area usage, etc.
     31
     32As an example, think of the following symbol.
     33
     34[Image]
     35
     36If the user wants to make the highway shield bigger, the only way he can do is to set the scale of the symbol instance. However, it also affects the repeat interval of the line usage, and he’ll get this:
     37
     38[Image]
     39
     40Therefore, the only way to solve this problem is to add an ability to set individual scale for path in symbol definition.
     41
     42== Proposed Solution ==
     43
     44To add ability of defining scale for path in symbol definition, we need to modify the schema a bit to add a scale property for path.
     45{{{
     46  <xs:complexType name="Path">
     47    <xs:annotation>
     48      <xs:documentation>A 2D path defining vector geometry to include in the symbol definition.</xs:documentation>
     49    </xs:annotation>
     50    <xs:complexContent>
     51      <xs:extension base="GraphicBase">
     52        <xs:sequence>
     53          <xs:element name="Geometry" type="xs:string">
     54            <xs:annotation>
     55              <xs:documentation>The path geometry.  The format is a sequence of segments, each represented by a letter indicating the segment type followed by one or more parameters.  Uppercase letters denote absolute values and lowercase letters denote relative values.  Segment types can be one of "M" (moveto), "L" (lineto), "H" (horizontal lineto), "V" (vertical lineto), "A" (arcto), or "Z" (close segment).</xs:documentation>
     56            </xs:annotation>
     57          </xs:element>
     58          <xs:element name="ScaleX" type="xs:string" minOccurs="0" default="1.0">
     59            <xs:annotation>
     60              <xs:documentation> The amount to scale the path geometry in the horizontal direction. This is only applied to the Geometry element. Defaults to 1 if not specified.</xs:documentation>
     61            </xs:annotation>
     62          </xs:element>
     63          <xs:element name="ScaleY" type="xs:string" minOccurs="0" default="1.0">
     64            <xs:annotation>
     65              <xs:documentation> The amount to scale the path geometry in the Vertical direction. This is only applied to the Geometry element. Defaults to 1 if not specified.</xs:documentation>
     66            </xs:annotation>
     67          </xs:element>
     68          …
     69
     70        </xs:sequence>
     71      </xs:extension>
     72    </xs:complexContent>
     73  </xs:complexType>
     74}}}
     75By Adding the ScaleX and ScaleY property to path, user will be able to set the scale of just the path symbol without any side effects.
     76Once the ScaleX and ScaleY property is set, it’ll be the first transformation applied on the geometry.
     77
     78The version number of symbol definition schema will be changed to 2.3.0. and the layer definition and watermark definition schema will be updated to 2.3.1 since it references symbol definition schema. Also, the !MdfParser and !MdfModel will be updated to handle this new property and version number. Besides the stylization code will take this scale into account when drawing a symbol.
     79
     80
     81== Implications ==
     82
     83Existing schema documentation will be updated.
     84
     85== Test Plan ==
     86
     87The existing unit tests (!MdfModel unit test) will be updated adding test of the 2 new field and the new version handling. The !MdfModel unit test verifies that the versioning / roundtripping behavior is working correctly.
     88
     89== Funding / Resources ==
     90
     91Autodesk