当前位置: 首页>>代码示例>>C#>>正文


C# Path.ComputeBounds方法代码示例

本文整理汇总了C#中Android.Graphics.Path.ComputeBounds方法的典型用法代码示例。如果您正苦于以下问题:C# Path.ComputeBounds方法的具体用法?C# Path.ComputeBounds怎么用?C# Path.ComputeBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Android.Graphics.Path的用法示例。


在下文中一共展示了Path.ComputeBounds方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ensureComputedBoundsInclude

		public void ensureComputedBoundsInclude(Path pPath) {
			pPath.ComputeBounds(this.mRect, false);
			this.ensureComputedBoundsInclude(this.mRect.Left, this.mRect.Top);
			this.ensureComputedBoundsInclude(this.mRect.Right, this.mRect.Bottom);
		}
开发者ID:jdluzen,项目名称:xamsvg,代码行数:5,代码来源:SVGPaint.cs

示例2: CreateAnimationDrawer

        public CreateAnimationDrawer(Context c, BrushItem brush, Canvas canvas, Bitmap myBmp, bool tooAdd = false, int cell = 1, string DrawerState = "brush_selection", Path pathToUse = null)
            : base(c)
        {
            myBitmap = myBmp;
            myCanvas = canvas;
            DrawerStateInternal = DrawerState;
            addOnly = tooAdd;
            status = 0;
            myPath = new Path();
            myPaint = new Paint(PaintFlags.Dither);
            myPaint.AntiAlias = true;
            myPaint.Dither = true;
            myPaint.SetStyle(Paint.Style.Stroke);
            myPaint.StrokeJoin = Paint.Join.Round;
            myPaint.StrokeWidth = brush.Thickness;
            myPaint.StrokeCap = Paint.Cap.Round;
            myPaint.SetARGB(colorUtil.a, colorUtil.r, colorUtil.g, colorUtil.b);

            if (brush.BrushType == AnimationTypesBrushType.Spray)
                myPaint.SetShadowLayer(brush.Thickness, 0, 0, ImageHelper.convWZColorToColor(brush.BrushColor));

            if (DrawerState == "brush_selection")
            {
                if (pathToUse != null)
                {
                    myBoundsPaint = new Paint();
                    myBoundsPaint = new Paint(PaintFlags.Dither);
                    myBoundsPaint.AntiAlias = true;
                    myBoundsPaint.Dither = true;
                    myBoundsPaint.SetStyle(Paint.Style.Stroke);
                    myBoundsPaint.StrokeJoin = Paint.Join.Round;
                    myBoundsPaint.StrokeWidth = 10f;
                    myBoundsPaint.StrokeCap = Paint.Cap.Round;
                    myBoundsPaint.SetARGB(255, 0, 0, 0);
                    myBoundsPaint.SetPathEffect(new DashPathEffect(new float[]
                    {
                        10f,
                        20f
                    }, 0));

                    myPath = pathToUse;
                    AnimationUtil.theCanvas.DrawPath(myPath, myPaint);
                    AnimationUtil.theCanvas.DrawPath(myPath, myPaint);

                    myBoundsRect = new RectF();
                    myPath.ComputeBounds(myBoundsRect, true);
                    AnimationUtil.theCanvas.DrawRect(myBoundsRect, myBoundsPaint);
                }
            }
        }
开发者ID:chimpinano,项目名称:WowZapp-Android,代码行数:50,代码来源:CreateAnimationDrawer.cs


注:本文中的Android.Graphics.Path.ComputeBounds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。