質問

I'm using Expression Blend 4. I would like to be able to take a Path that I've manipulated via ScaleTransform, RotateTransform, Height, Width, etc., and somehow extract just the resulting geometry data.

For example, here is the Path that I've manipulated:

<Path x:Name="path" Data="M34.555819,-10.855642 L33.87765,10.694269 111.5,10.5 111.5,30.5 35.546387,30.836126 34.332857,52.291507 -24.919613,20.285166 z" Fill="White" Margin="12.624,48.361,717,0" RenderTransformOrigin="0.5,0.5" Height="19.77" Stretch="Fill" VerticalAlignment="Top"  >
        <Path.RenderTransform>
            <TransformGroup>
                <ScaleTransform ScaleY="0.5" ScaleX="0.5"/>
                <SkewTransform/>
                <RotateTransform Angle="-45.19"/>
                <TranslateTransform X="-0.0091096941141897148" Y="-3.18742921035944"/>
            </TransformGroup>
        </Path.RenderTransform>
    </Path>

Now, from this Path, can I create a new consolidated Path where the manipulations and settings are built in to the Path's geometry (data)? Producing something like without all of the transforms, etc.

<Path Data="<new data>" />
役に立ちましたか?

解決

A simple trick I use for that sort of thing, is to draw another small and simple Transparent Path over it, select both, then Object->Combine->Unite and you'll get the resulting new Path Data and that usually does the trick.

Hope this helps.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top