Select to view content in your preferred language

Symbol Brush Clipped

1896
3
11-02-2011 02:43 AM
by Anonymous User
Not applicable
Original User: MattPil29

Hi,

We have an issue where the user has increased a SimpleLine symbol width to say 40 and the brush appears to be clipped off around the edges. 

This can be demonstrated by changing the code here: http://www.arcgis.com/home/item.html?id=1e432da7e74f4402bd43a5863167022d

to include these two symbols:
[HTML]new SymbolInfo
{
  Label = "Simple thin Line",
  Symbol = new LineSymbol
           {
               Color = lineColor,
      Width = 8
           }
},
new SymbolInfo
{
  Label = "Simple thick Line",
  Symbol = new LineSymbol
           {
               Color = lineColor,
      Width = 40
           }
},[/HTML]

In this picture I have drawn two similar lines with the different symbols:



Notice the clipping on the thick one.  However when I zoom in, for just a second, it appears correct and then gets clipped as the zoom completes:



Can anyone suggest how this might be resolved?

BTW I have played with some settings in Blend:



The pictures show:

  1. Thin line

  2. Thick line

  3. Thick line with width and height set to auto

  4. Thick line with Stretch set to fill


It looks like number 2 represents the problem and number 3 is what I'm after.  I am already using a custom control template for this symbol so I tried setting the width/height to auto.  No luck!

Suggestions please!

Thanks Matthew
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
A (weird!) workaround may be to redefine the symbol controltemplate and to surround the path element with a canvas.

Example in XAML:
 
<esri:LineSymbol x:Key="RedLineSymbol" Color="Red" Width="40" >
  <esri:LineSymbol.ControlTemplate>
    <ControlTemplate>
      <Canvas>
        <Path x:Name="Element"
          Stroke="{Binding Symbol.Color}"
          StrokeThickness="{Binding Symbol.Width}"
          StrokeDashCap="Round"
          StrokeStartLineCap="Round"
          StrokeLineJoin="Round"
          StrokeEndLineCap="Round"/>
     </Canvas>
    </ControlTemplate>
  </esri:LineSymbol.ControlTemplate>
</esri:LineSymbol>
0 Kudos
by Anonymous User
Not applicable
Original User: MattPil29

That did the trick, thanks.

Interestingly the clipping now appears during the zoom (which is more acceptable).

Is this something ESRI might address with the next release?

Matt
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Is this something ESRI might address with the next release?

Likely not in the next release, but we'll consider that for a future release.

Thanks.
0 Kudos