Esempio n. 1
0
        private static IPath BuildCornerRailPath(IPathFactory pathFactory)
        {
            IPath path = pathFactory.Create();

            // Inner

            float innerRailA = RailingInset;
            float innerRailB = RailingInset + RailingBaseWidth;

            path.MoveTo(0, innerRailA);
            path.LineTo(0, innerRailB);
            path.ConicTo(innerRailB, innerRailB, innerRailB, 0, 0.75f);
            path.LineTo(innerRailA, 0);
            path.ConicTo(innerRailA, innerRailA, 0, innerRailA, 0.75f);

            // Outer

            float outerRailA = CanvasSize - RailingInset - RailingBaseWidth;
            float outerRailB = CanvasSize - RailingInset;

            path.MoveTo(0, outerRailA);
            path.LineTo(0, outerRailB);
            path.ConicTo(outerRailB, outerRailB, outerRailB, 0, 0.75f);
            path.LineTo(outerRailA, 0);
            path.ConicTo(outerRailA, outerRailA, 0, outerRailA, 0.75f);

            return(path);
        }
Esempio n. 2
0
        public IPath BuildCornerTrackPath()
        {
            IPath trackPath = _pathFactory.Create();

            trackPath.MoveTo(0, _innerTrackOffset);
            trackPath.ConicTo(_innerTrackOffset, _innerTrackOffset, _innerTrackOffset, 0, 0.75f);
            trackPath.MoveTo(0, _outerTrackOffset);
            trackPath.ConicTo(_outerTrackOffset, _outerTrackOffset, _outerTrackOffset, 0, 0.75f);

            return(trackPath);
        }
Esempio n. 3
0
        private static IPath BuildCornerPlankPath(IPathFactory pathFactory)
        {
            IPath path = pathFactory.Create();

            path.MoveTo(0, BridgeInset);
            path.LineTo(0, CanvasSize - BridgeInset);
            path.ConicTo(CanvasSize - BridgeInset, CanvasSize - BridgeInset, CanvasSize - BridgeInset, 0, 0.75f);
            path.LineTo(BridgeInset, 0);
            path.ConicTo(BridgeInset, BridgeInset, 0, BridgeInset, 0.75f);

            return(path);
        }
Esempio n. 4
0
        private static IPath BuildLightPath(IPathFactory pathFactory)
        {
            const int halfLightSpread = LightSpread / 2;

            IPath path = pathFactory.Create();

            path.LineTo(-LightLength, -halfLightSpread);
            path.ConicTo(-LightCurveLength, 0, -LightLength, halfLightSpread, 0.75f);
            path.LineTo(0, 0);

            return(path);
        }