private void SetUpColorRect() { var dRect = _drawingRect; var left = dRect.Left + BorderWidthPx; var top = dRect.Top + BorderWidthPx; var bottom = dRect.Bottom - BorderWidthPx; var right = dRect.Right - BorderWidthPx; _colorRect = new RectF(left, top, right, bottom); _alphaPattern = new AlphaPatternDrawable((int)(5 * _density)); _alphaPattern.SetBounds( (int)Math.Round(_colorRect.Left), (int)Math.Round(_colorRect.Top), (int)Math.Round(_colorRect.Right), (int)Math.Round(_colorRect.Bottom) ); }
private void SetUpAlphaRect() { if (!_showAlphaPanel) { return; } var dRect = _drawingRect; var left = dRect.Left + BorderWidthPx; var top = dRect.Bottom - _alphaPanelHeight + BorderWidthPx; var bottom = dRect.Bottom - BorderWidthPx; var right = dRect.Right - BorderWidthPx; _alphaRect = new RectF(left, top, right, bottom); _alphaPattern = new AlphaPatternDrawable((int)(5 * _density)); _alphaPattern.SetBounds( (int)Math.Round(_alphaRect.Left), (int)Math.Round(_alphaRect.Top), (int)Math.Round(_alphaRect.Right), (int)Math.Round(_alphaRect.Bottom) ); }
private void SetUpColorRect(){ var dRect = _drawingRect; var left = dRect.Left + BorderWidthPx; var top = dRect.Top + BorderWidthPx; var bottom = dRect.Bottom - BorderWidthPx; var right = dRect.Right - BorderWidthPx; _colorRect = new RectF(left,top, right, bottom); _alphaPattern = new AlphaPatternDrawable((int)(5 * _density)); _alphaPattern.SetBounds( (int) Math.Round(_colorRect.Left), (int) Math.Round(_colorRect.Top), (int) Math.Round(_colorRect.Right), (int) Math.Round(_colorRect.Bottom) ); }
protected override void Dispose(bool disposing) { if (disposing) { if (null != _satValPaint) { _satValPaint.Dispose(); _satValPaint = null; } if (null != _satValTrackerPaint) { _satValTrackerPaint.Dispose(); _satValTrackerPaint = null; } if (null != _huePaint) { _huePaint.Dispose(); _huePaint = null; } if (null != _hueTrackerPaint) { _hueTrackerPaint.Dispose(); _hueTrackerPaint = null; } if (null != _alphaPaint) { _alphaPaint.Dispose(); _alphaPaint = null; } if (null != _alphaTextPaint) { _alphaTextPaint.Dispose(); _alphaTextPaint = null; } if (null != _hueShader) { _hueShader.Dispose(); _hueShader = null; } if (null != _borderPaint) { _borderPaint.Dispose(); _borderPaint = null; } if (null != _valShader) { _valShader.Dispose(); _valShader = null; } if (null != _satShader) { _satShader.Dispose(); _satShader = null; } if (null != _alphaShader) { _alphaShader.Dispose(); _alphaShader = null; } if (null != _alphaPattern) { _alphaPattern.Dispose(); _alphaPattern = null; } } GC.Collect(); base.Dispose(disposing); }
private void SetUpAlphaRect() { if(!_showAlphaPanel) return; var dRect = _drawingRect; var left = dRect.Left + BorderWidthPx; var top = dRect.Bottom - _alphaPanelHeight + BorderWidthPx; var bottom = dRect.Bottom - BorderWidthPx; var right = dRect.Right - BorderWidthPx; _alphaRect = new RectF(left, top, right, bottom); _alphaPattern = new AlphaPatternDrawable((int) (5 * _density)); _alphaPattern.SetBounds( (int) Math.Round(_alphaRect.Left), (int) Math.Round(_alphaRect.Top), (int) Math.Round(_alphaRect.Right), (int) Math.Round(_alphaRect.Bottom) ); }