code: private void init(Context context, AttributeSet attrs, int defStyle)
  	{
  		// Initialize paint objects
  		paint = new Paint();
  		paint.setAntiAlias(true);
  		paintBorder = new Paint();
  		paintBorder.setAntiAlias(true);
  		paintSelectorBorder = new Paint();
  		paintSelectorBorder.setAntiAlias(true);
  		
  		// load the styled attributes and set their properties
  		TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.CircularImageView, defStyle, 0);
  		
  		// Check if border and/or border is enabled
  		hasBorder = attributes.getBoolean(R.styleable.CircularImageView_border, false);
  		hasSelector = attributes.getBoolean(R.styleable.CircularImageView_selector, false);
  		
  		// Set border properties if enabled
  		if(hasBorder) {
  			int defaultBorderSize = (int) (2 * context.getResources().getDisplayMetrics().density + 0.5f);
  			setBorderWidth(attributes.getDimensionPixelOffset(R.styleable.CircularImageView_border_width, defaultBorderSize));
  			setBorderColor(attributes.getColor(R.styleable.CircularImageView_border_color, Color.WHITE));
  		}
  		
  		// Set selector properties if enabled
  		if(hasSelector) {
  			int defaultSelectorSize = (int) (2 * context.getResources().getDisplayMetrics().density + 0.5f);
  			setSelectorColor(attributes.getColor(R.styleable.CircularImageView_selector_color, Color.TRANSPARENT));
  			setSelectorStrokeWidth(attributes.getDimensionPixelOffset(R.styleable.CircularImageView_selector_stroke_width, defaultSelectorSize));
  			setSelectorStrokeColor(attributes.getColor(R.styleable.CircularImageView_selector_stroke_color, Color.BLUE));
  		}
  		
  		// Add shadow if enabled
  		if(attributes.getBoolean(R.styleable.CircularImageView_shadow, false))
  			addShadow();
  		
  		// We no longer need our attributes TypedArray, give it back to cache
  		attributes.recycle();
  	}
docs: Initializes paint objects and sets desired attributes.
  
  @param context
  @param attrs
  @param defStyle