private void setUpColorRect() { RectF dRect = mDrawingRect; float left = dRect.Left + BORDER_WIDTH_PX; float top = dRect.Top + BORDER_WIDTH_PX; float bottom = dRect.Bottom - BORDER_WIDTH_PX; float right = dRect.Right - BORDER_WIDTH_PX; mColorRect = new RectF(left, top, right, bottom); mAlphaPattern = new AlphaPatternDrawable((int)(5 * mDensity)); mAlphaPattern.SetBounds( (int)Math.Round(mColorRect.Left), (int)Math.Round(mColorRect.Top), (int)Math.Round(mColorRect.Right), (int)Math.Round(mColorRect.Bottom) ); }
private void setUpAlphaRect() { if (!mShowAlphaPanel) { return; } RectF dRect = mDrawingRect; float left = dRect.Left + BORDER_WIDTH_PX; float top = dRect.Bottom - ALPHA_PANEL_HEIGHT + BORDER_WIDTH_PX; float bottom = dRect.Bottom - BORDER_WIDTH_PX; float right = dRect.Right - BORDER_WIDTH_PX; mAlphaRect = new RectF(left, top, right, bottom); mAlphaPattern = new AlphaPatternDrawable((int)(5 * mDensity)); mAlphaPattern.SetBounds( (int)Math.Round(mAlphaRect.Left), (int)Math.Round(mAlphaRect.Top), (int)Math.Round(mAlphaRect.Right), (int)Math.Round(mAlphaRect.Bottom)); }
private void setUpAlphaRect(){ if(!mShowAlphaPanel) return; RectF dRect = mDrawingRect; float left = dRect.Left + BORDER_WIDTH_PX; float top = dRect.Bottom - ALPHA_PANEL_HEIGHT + BORDER_WIDTH_PX; float bottom = dRect.Bottom - BORDER_WIDTH_PX; float right = dRect.Right - BORDER_WIDTH_PX; mAlphaRect = new RectF(left, top, right, bottom); mAlphaPattern = new AlphaPatternDrawable((int) (5 * mDensity)); mAlphaPattern.SetBounds( (int)Math.Round(mAlphaRect.Left), (int)Math.Round(mAlphaRect.Top), (int)Math.Round(mAlphaRect.Right), (int)Math.Round(mAlphaRect.Bottom)); }
private void setUpColorRect(){ RectF dRect = mDrawingRect; float left = dRect.Left + BORDER_WIDTH_PX; float top = dRect.Top + BORDER_WIDTH_PX; float bottom = dRect.Bottom - BORDER_WIDTH_PX; float right = dRect.Right - BORDER_WIDTH_PX; mColorRect = new RectF(left,top, right, bottom); mAlphaPattern = new AlphaPatternDrawable((int)(5 * mDensity)); mAlphaPattern.SetBounds( (int)Math.Round(mColorRect.Left), (int)Math.Round(mColorRect.Top), (int)Math.Round(mColorRect.Right), (int)Math.Round(mColorRect.Bottom) ); }