PR opened GuOrg/Gu.Wpf.Geometry

TotalLength handles multiple segments

Fixes https://github.com/GuOrg/Gu.Wpf.Geometry/issues/29

+24 -11

0 comment

1 changed file

pr created time in 2 months

push eventrobbym/Gu.Wpf.Geometry

Robby Madruga

commit sha 5c8fb5453734dd9c484bf92f06bde1fcf6a6d609

TotalLength handles multiple segments

view details

push time in 2 months

issue commentGuOrg/Gu.Wpf.Geometry

ArcSegment IsLargeArc

I'll give it a try!

robbym

comment created time in 2 months

issue openedGuOrg/Gu.Wpf.Geometry

ArcSegment IsLargeArc

Thanks for your recent work on ArcSegment! Ran into a little issue.

The following XAML:

            <geometry:GradientPath GradientMode="Parallel" StrokeThickness="10" Tolerance="0.01">
                <geometry:GradientPath.Data>
                    <PathGeometry>
                        <PathFigure StartPoint="0,0">
                            <ArcSegment Point="140,0" Size="100,100" IsLargeArc="False" SweepDirection="Clockwise"/>
                        </PathFigure>
                    </PathGeometry>
                </geometry:GradientPath.Data>
                <geometry:GradientPath.GradientStops>
                    <GradientStop Offset="0" Color="Red" />
                    <GradientStop Offset="0.5" Color="Yellow" />
                    <GradientStop Offset="1" Color="Orange" />
                </geometry:GradientPath.GradientStops>
            </geometry:GradientPath>

Produces: 2019-02-26 13_46_29-pid rate tester - microsoft visual studio

Which seems correct. However, setting IsLargeArc to True produces the following: 2019-02-26 13_47_01-pid rate tester - microsoft visual studio

It seems like the ArcSegment gradient code is not taking into account IsLargeArc?

created time in 2 months

issue commentGuOrg/Gu.Wpf.Geometry

GradientPath for ArcSegment

I think the Sequence contains more than one element was a bug with the editor as it showed up when I added the ArcSegment. When I actually build the project, it now gives me The provided DependencyObject is not a context for this Freezable. Very strange.

I took the example from the README and just added an ArcSegment:

        <geometry:GradientPath GradientMode="Parallel"
                        StrokeThickness="10"
                        UseLayoutRounding="True">
            <geometry:GradientPath.Data>
                <PathGeometry>
                    <PathFigure StartPoint="35,400">
                        <LineSegment Point="100,300" />
                        <BezierSegment Point1="300,10"
                                Point2="500,600"
                                Point3="700,300" />
                        <LineSegment Point="800,100" />
                    </PathFigure>
                    <PathFigure StartPoint="200,200">
                        <LineSegment Point="200,400" />
                        <LineSegment Point="400,400" />
                    </PathFigure>
                    <PathFigure StartPoint="0,0">
                        <ArcSegment Size="240,240" RotationAngle="0" IsLargeArc="True" SweepDirection="Clockwise" Point="240,0"/>
                    </PathFigure>
                </PathGeometry>
            </geometry:GradientPath.Data>
            <geometry:GradientPath.GradientStops>
                <GradientStop Offset="0" Color="#4C0000FF" />
                <GradientStop Offset="0.5" Color="#4CFF0000" />
                <GradientStop Offset="1" Color="#4CFFFF00" />
            </geometry:GradientPath.GradientStops>
        </geometry:GradientPath>
robbym

comment created time in 2 months

issue openedGuOrg/Gu.Wpf.Geometry

GradientPath for ArcSegment

I get "Segment is not PolylineSegment in flattened PathFigure" when attempting to use an ArcSegment in a Path. Is ArcSegment not supported by GradientPath?

created time in 2 months

more