コード例 #1
0
ファイル: StrokeExtensions.cs プロジェクト: Glepooek/maui
        public static void UpdateStrokeLineJoin(this AView platformView, IBorderStroke border)
        {
            MauiDrawable?mauiDrawable = platformView.Background as MauiDrawable;
            bool         hasBorder    = border.Shape != null && border.Stroke != null;

            if (mauiDrawable == null && !hasBorder)
            {
                return;
            }

            mauiDrawable?.SetBorderLineJoin(border.StrokeLineJoin);
        }
コード例 #2
0
ファイル: StrokeExtensions.cs プロジェクト: Glepooek/maui
        public static void UpdateBorderStroke(this AView platformView, IBorderStroke border)
        {
            // Always set the drawable first
            platformView.UpdateMauiDrawable(border);

            var          borderShape  = border.Shape;
            MauiDrawable?mauiDrawable = platformView.Background as MauiDrawable;

            if (mauiDrawable == null && borderShape == null)
            {
                return;
            }

            mauiDrawable?.SetBorderBrush(border.Stroke);
            mauiDrawable?.SetBorderWidth(border.StrokeThickness);
            platformView.UpdateStrokeDashPattern(border);
            platformView.UpdateStrokeDashOffset(border);
            mauiDrawable?.SetBorderMiterLimit(border.StrokeMiterLimit);
            mauiDrawable?.SetBorderLineCap(border.StrokeLineCap);
            mauiDrawable?.SetBorderLineJoin(border.StrokeLineJoin);
        }