// Path: sak-nop/src/main/java/com/wanjian/sak/converter/ISizeConverter.java
// public abstract class ISizeConverter {
//     public static ISizeConverter CONVERTER;
// 
//     public abstract String desc();
// 
//     public abstract Size convert(Context context, float length);
// 
//     public abstract int recovery(Context context, float length);
// 
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/layer/ISize.java
// public interface ISize {
//   void onSizeConvertChange(ISizeConverter converter);
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/utils/ScreenUtils.java
// public class ScreenUtils {
// 
//   public static int dp2px(Context context, int dip) {
//     float density = context.getResources().getDisplayMetrics().density;
//     return (int) (dip * density + 0.5);
//   }
// 
//   public static int px2dp(Context context, float pxValue) {
//     final float scale = context.getResources().getDisplayMetrics().density;
//     return (int) (pxValue / scale + 0.5f);
//   }
// 
// }


import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import com.wanjian.sak.converter.ISizeConverter;
import com.wanjian.sak.layer.ISize;
import com.wanjian.sak.utils.ScreenUtils;
import java.text.DecimalFormat;
package com.wanjian.sak.layer.impl;





/**
 * Created by wanjian on 2016/10/23.
 */

public class MarginLayer extends ViewLayer implements ISize {

  private Paint mTextPaint;
  private Paint mBgPaint;
  private Paint mMarginPaint;
  private int mTxtColor = 0xFF000000;
  private int mBgColor = 0x88FFFFFF;
  private int mMarginColor = 0x33FF0008;
  private Rect mRect = new Rect();
  private DecimalFormat mFormat = new DecimalFormat("#.###");

  @Override
  protected void onAttach(View rootView) {
    super.onAttach(rootView);
    mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
// Path: sak-nop/src/main/java/com/wanjian/sak/converter/ISizeConverter.java
// public abstract class ISizeConverter {
//     public static ISizeConverter CONVERTER;
// 
//     public abstract String desc();
// 
//     public abstract Size convert(Context context, float length);
// 
//     public abstract int recovery(Context context, float length);
// 
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/layer/ISize.java
// public interface ISize {
//   void onSizeConvertChange(ISizeConverter converter);
// }
// 
// Path: saklib/src/main/java/com/wanjian/sak/utils/ScreenUtils.java
// public class ScreenUtils {
// 
//   public static int dp2px(Context context, int dip) {
//     float density = context.getResources().getDisplayMetrics().density;
//     return (int) (dip * density + 0.5);
//   }
// 
//   public static int px2dp(Context context, float pxValue) {
//     final float scale = context.getResources().getDisplayMetrics().density;
//     return (int) (pxValue / scale + 0.5f);
//   }
// 
// }


// Path: saklib/src/main/java/com/wanjian/sak/layer/impl/MarginLayer.java
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import com.wanjian.sak.converter.ISizeConverter;
import com.wanjian.sak.layer.ISize;
import com.wanjian.sak.utils.ScreenUtils;
import java.text.DecimalFormat;

package com.wanjian.sak.layer.impl;





/**
 * Created by wanjian on 2016/10/23.
 */

public class MarginLayer extends ViewLayer implements ISize {

  private Paint mTextPaint;
  private Paint mBgPaint;
  private Paint mMarginPaint;
  private int mTxtColor = 0xFF000000;
  private int mBgColor = 0x88FFFFFF;
  private int mMarginColor = 0x33FF0008;
  private Rect mRect = new Rect();
  private DecimalFormat mFormat = new DecimalFormat("#.###");

  @Override
  protected void onAttach(View rootView) {
    super.onAttach(rootView);
    mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    mTextPaint.setTextSize(ScreenUtils.dp2px(getContext(), 10));