@@ -340,10 +340,10 @@ private void layoutDrawables() {
340
340
AvatarDrawable drawable = drawables .get (i );
341
341
drawable .reset ();
342
342
343
- drawable .haveGap = i > 0 ;
344
- if (drawable .haveGap ) {
345
- drawable .gapCenterX = pointsTemp [0 ];
346
- drawable .gapCenterY = pointsTemp [1 ];
343
+ drawable .mHasGap = i > 0 ;
344
+ if (drawable .mHasGap ) {
345
+ drawable .mGapCenterX = pointsTemp [0 ];
346
+ drawable .mGapCenterY = pointsTemp [1 ];
347
347
}
348
348
349
349
pointsTemp [0 ] = startX ;
@@ -354,23 +354,23 @@ private void layoutDrawables() {
354
354
matrix .mapPoints (pointsTemp );
355
355
}
356
356
357
- drawable .centerX = pointsTemp [0 ];
358
- drawable .centerY = pointsTemp [1 ];
357
+ drawable .mCenterX = pointsTemp [0 ];
358
+ drawable .mCenterY = pointsTemp [1 ];
359
359
360
360
drawable .mBounds .inset (-r , -r );
361
- drawable .mBounds .offset (drawable .centerX , drawable .centerY );
361
+ drawable .mBounds .offset (drawable .mCenterX , drawable .mCenterY );
362
362
363
- drawable .mMaskPath .addCircle (drawable .centerX , drawable .centerY , r ,
363
+ drawable .mMaskPath .addCircle (drawable .mCenterX , drawable .mCenterY , r ,
364
364
Path .Direction .CW );
365
365
drawable .mMaskPath .setFillType (Path .FillType .INVERSE_WINDING );
366
366
}
367
367
368
368
if (N > 2 ) {
369
369
AvatarDrawable first = drawables .get (0 );
370
370
AvatarDrawable last = drawables .get (N - 1 );
371
- first .haveGap = true ;
372
- first .gapCenterX = last .centerX ;
373
- first .gapCenterY = last .centerY ;
371
+ first .mHasGap = true ;
372
+ first .mGapCenterX = last .mCenterX ;
373
+ first .mGapCenterY = last .mCenterY ;
374
374
}
375
375
376
376
mSteinerCircleRadius = r ;
@@ -425,8 +425,8 @@ protected void onDraw(Canvas canvas) {
425
425
drawable .mDrawable .draw (canvas );
426
426
427
427
canvas .drawPath (drawable .mMaskPath , maskPaint );
428
- if (drawable .haveGap && mGap > 0f ) {
429
- canvas .drawCircle (drawable .gapCenterX , drawable .gapCenterY , gapRadius , maskPaint );
428
+ if (drawable .mHasGap && mGap > 0f ) {
429
+ canvas .drawCircle (drawable .mGapCenterX , drawable .mGapCenterY , gapRadius , maskPaint );
430
430
}
431
431
432
432
canvas .restoreToCount (savedLayer );
@@ -472,20 +472,20 @@ public void invalidateDrawable(@NonNull Drawable drawable) {
472
472
private static class AvatarDrawable {
473
473
int mId = View .NO_ID ;
474
474
Drawable mDrawable ;
475
- float centerX ;
476
- float centerY ;
477
- float gapCenterX ;
478
- float gapCenterY ;
479
- boolean haveGap ;
475
+ float mCenterX ;
476
+ float mCenterY ;
477
+ float mGapCenterX ;
478
+ float mGapCenterY ;
479
+ boolean mHasGap ;
480
480
final RectF mBounds = new RectF ();
481
481
final Path mMaskPath = new Path ();
482
482
483
483
void reset () {
484
- centerX = 0 ;
485
- centerY = 0 ;
486
- gapCenterX = 0 ;
487
- gapCenterY = 0 ;
488
- haveGap = false ;
484
+ mCenterX = 0 ;
485
+ mCenterY = 0 ;
486
+ mGapCenterX = 0 ;
487
+ mGapCenterY = 0 ;
488
+ mHasGap = false ;
489
489
mBounds .setEmpty ();
490
490
mMaskPath .reset ();
491
491
}
0 commit comments