Sketchy about ResizeBox? You and I both are... :-) The common application of the ResizeBox is to scale highway shield symbols according to the size of the text (highway number) that is inside them. So the number 7 fits in a circle, but if the highway number is 450, then the circle has to be scaled horizontally to become an oval, so that the number fits inside it. Based on this, your guess is probably right that the smaller path will be scaled up, using a scaling factor determined by the size of the path that was added to the resize box (using ResizeControl=AddToResizeBox), compared to the initial size of the resize box. Note that only geometries with ResizeControl set to AdjustToResizeBox will be scaled. So, in the case of the highway shield, you would set the highway number text to AddToResizeBox, and you would set the shield polygon to AdjustToResizeBox, in order to get the shield polygon to scale in order to fit the highway number text inside it.
I would further bet that the overall scale of the SymbolInstance is applied on top of all this. Traian ________________________________________ From: [email protected] [[email protected]] On Behalf Of Jamo [[email protected]] Sent: Tuesday, March 17, 2009 8:47 PM To: [email protected] Subject: RE: [mapguide-users] ResizeBox Thanks Traian I have adjusted the layers xml and the symbol is now the size I desire :) I have read through the Resize box schema I'm a little sketchy on how the resize box functions. If I have two paths one smaller than the other with the larger one having AddToResizeBox and the smaller one having AdjustToResizeBox would the smaller path then be scaled to fit the extents of the larger one? And how do the size paramaters fit in to this? once the second path has been scaled to fit the extents of the first would the whole symbol then be scaled to fit the resizebox? Perhaps a diagram would better explain it's function ? or perhaps I just can't get my head around it :( Traian Stanev wrote: > > > Hi, > > I checked with one of the developers of the resize box, and here is his > answer: > > == > The ResizeBox functionality is not designed to do what he wants ("scale > the symbol and make it fit to the ResizeBox"). > > Here's the description from the schema's ResizeBox element: > > The optional box used to resize and reposition select graphic elements. > The graphical extent of all elements with ResizeControl set to > AddToResizeBox will be added to this box, potentially causing it to grow > in size. Any change in size causes all elements with ResizeControl set to > AdjustToResizeBox to be proportionally resized and repositioned. > == > > If you want to scale the whole symbol, you can use the scaling elements > available in the SymbolInstance which references the SymbolDefinition in > your LayerDefinition. > > > Traian > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Jamo > Sent: Sunday, March 15, 2009 10:07 PM > To: [email protected] > Subject: [mapguide-users] ResizeBox > > > I cannot seem to get the syntax right for the resizebox control... > I would basically like to scale the symbol and make it fit to the > ResizeBox > ... > > > <?xml version="1.0" encoding="UTF-8"?> > <SimpleSymbolDefinition > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="SymbolDefinition-1.1.0.xsd" > version="1.1.0"> > <Name>House</Name> > <Graphics> > <Path> > <ResizeControl>'AdjustToResizeBox'</ResizeControl> > <Geometry> > M 0.407,-1.604 L -0.268,-1.766 L -0.307,0.122 L -0.638, 0.086 L > 0.711,1.686 > L 2,0.371 L 1.711,0.34 L 1.67,-1.301 L 1.177,-1.419 L 1.177,0.282 L > 0.407,0.199 Z > M -0.477,0.738 L -0.808,0.808 L -0.808,1.411 L -0.477,1.411 Z > M -0.42,0.726 L -0.42,1.41 L -0.16,1.41 L -0.16,0.961 Z > </Geometry> > <FillColor>%FillColor2%</FillColor> > <LineColor>%LineColor%</LineColor> > <LineWeight>0.0</LineWeight> > </Path> > > <Path> > <ResizeControl>'AdjustToResizeBox'</ResizeControl> > <Geometry> > M -0.268,-1.766 L -1.636,-1.081 L -1.739,0.421 L -0.638,0.086 L > -0.307,0.122 Z > M -0.638,0.086 L -2,0.5 L -0.662,1.766 L 0.711,1.686 Z > M 1.177,-1.419 L 0.407,-1.064 L 0.407,0.199 L 1.177,0.282 Z > </Geometry> > <FillColor>%FillColor1%</FillColor> > <LineColor>%LineColor%</LineColor> > <LineWeight>0.0</LineWeight> > </Path> > > </Graphics> > <ResizeBox> > <SizeX>6</SizeX> > <SizeY>5</SizeY> > <PositionX>0</PositionX> > <PositionY>0</PositionY> > <GrowControl>'GrowInXY'</GrowControl> > </ResizeBox> > > <PointUsage> > <Angle>%Rot%</Angle> > </PointUsage> > <ParameterDefinition> > <Parameter> > <Identifier>Rot</Identifier> > <DefaultValue/> > <DisplayName>Rotation</DisplayName> > <Description>Point Symbol Rotation</Description> > <DataType>String</DataType> > </Parameter> > <Parameter> > <Identifier>FillColor1</Identifier> > <DefaultValue/> > <DisplayName>Fill Color 1</DisplayName> > <Description>The Fill Color</Description> > <DataType>String</DataType> > </Parameter> > <Parameter> > <Identifier>FillColor2</Identifier> > <DefaultValue/> > <DisplayName>Fill Color 2</DisplayName> > <Description>The Fill Color</Description> > <DataType>String</DataType> > </Parameter> > <Parameter> > <Identifier>LineColor</Identifier> > <DefaultValue/> > <DisplayName>Line Color</DisplayName> > <Description>The Line Color</Description> > <DataType>String</DataType> > </Parameter> > <Parameter> > <Identifier>Label</Identifier> > <DefaultValue/> > <DisplayName>Label</DisplayName> > <Description>The Label Text</Description> > <DataType>String</DataType> > </Parameter> > </ParameterDefinition> > </SimpleSymbolDefinition> > > -- > View this message in context: > http://n2.nabble.com/ResizeBox-tp2483804p2483804.html > Sent from the MapGuide Users mailing list archive at Nabble.com. > > _______________________________________________ > mapguide-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapguide-users > _______________________________________________ > mapguide-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapguide-users > > -- View this message in context: http://n2.nabble.com/ResizeBox-tp2483804p2494755.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
