本文整理汇总了C#中Android.Graphics.Path.RCubicTo方法的典型用法代码示例。如果您正苦于以下问题:C# Path.RCubicTo方法的具体用法?C# Path.RCubicTo怎么用?C# Path.RCubicTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Graphics.Path
的用法示例。
在下文中一共展示了Path.RCubicTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawerArrowDrawable
public DrawerArrowDrawable(Resources resources, Boolean rounded1) {
rounded = rounded1;
float density = resources.DisplayMetrics.Density;
float strokeWidthPixel = STROKE_WIDTH_DP * density;
halfStrokeWidthPixel = strokeWidthPixel / 2;
linePaint = new Paint(Android.Graphics.PaintFlags.SubpixelText | Android.Graphics.PaintFlags.AntiAlias);
linePaint.StrokeCap=rounded ? Android.Graphics.Paint.Cap.Round : Android.Graphics.Paint.Cap.Butt;
linePaint.Color=Android.Graphics.Color.Black;
linePaint.SetStyle (Android.Graphics.Paint.Style.Stroke);
linePaint.StrokeWidth=strokeWidthPixel;
int dimen = (int) (DIMEN_DP * density);
bounds = new Rect(0, 0, dimen, dimen);
Path first, second;
JoinedPath joinedA, joinedB;
// Top
first = new Path();
first.MoveTo(5.042f, 20f);
first.RCubicTo(8.125f, -16.317f, 39.753f, -27.851f, 55.49f, -2.765f);
second = new Path();
second.MoveTo(60.531f, 17.235f);
second.RCubicTo(11.301f, 18.015f, -3.699f, 46.083f, -23.725f, 43.456f);
scalePath(first, density);
scalePath(second, density);
joinedA = new JoinedPath(first, second);
first = new Path();
first.MoveTo(64.959f, 20f);
first.RCubicTo(4.457f, 16.75f, 1.512f, 37.982f, -22.557f, 42.699f);
second = new Path();
second.MoveTo(42.402f, 62.699f);
second.CubicTo(18.333f, 67.418f, 8.807f, 45.646f, 8.807f, 32.823f);
scalePath(first, density);
scalePath(second, density);
joinedB = new JoinedPath(first, second);
topLine = new BridgingLine(joinedA, joinedB);
// Middle
first = new Path();
first.MoveTo(5.042f, 35f);
first.CubicTo(5.042f, 20.333f, 18.625f, 6.791f, 35f, 6.791f);
second = new Path();
second.MoveTo(35f, 6.791f);
second.RCubicTo(16.083f, 0f, 26.853f, 16.702f, 26.853f, 28.209f);
scalePath(first, density);
scalePath(second, density);
joinedA = new JoinedPath(first, second);
first = new Path();
first.MoveTo(64.959f, 35f);
first.RCubicTo(0f, 10.926f, -8.709f, 26.416f, -29.958f, 26.416f);
second = new Path();
second.MoveTo(35f, 61.416f);
second.RCubicTo(-7.5f, 0f, -23.946f, -8.211f, -23.946f, -26.416f);
scalePath(first, density);
scalePath(second, density);
joinedB = new JoinedPath(first, second);
middleLine = new BridgingLine(joinedA, joinedB);
// Bottom
first = new Path();
first.MoveTo(5.042f, 50f);
first.CubicTo(2.5f, 43.312f, 0.013f, 26.546f, 9.475f, 17.346f);
second = new Path();
second.MoveTo(9.475f, 17.346f);
second.RCubicTo(9.462f, -9.2f, 24.188f, -10.353f, 27.326f, -8.245f);
scalePath(first, density);
scalePath(second, density);
joinedA = new JoinedPath(first, second);
first = new Path();
first.MoveTo(64.959f, 50f);
first.RCubicTo(-7.021f, 10.08f, -20.584f, 19.699f, -37.361f, 12.74f);
second = new Path();
second.MoveTo(27.598f, 62.699f);
second.RCubicTo(-15.723f, -6.521f, -18.8f, -23.543f, -18.8f, -25.642f);
scalePath(first, density);
scalePath(second, density);
joinedB = new JoinedPath(first, second);
bottomLine = new BridgingLine(joinedA, joinedB);
}