Checks Corner and Edge treatments to see if we can use {@link Canvas#drawRoundRect(RectF, float,
float, Paint)} "} to draw this model.

@hide
429938
@RestrictTo(LIBRARY_GROUP)
    public boolean isRoundRect() {
        boolean hasDefaultEdges =
                leftEdge.getClass().equals(EdgeTreatment.class)
                        && rightEdge.getClass().equals(EdgeTreatment.class)
                        && topEdge.getClass().equals(EdgeTreatment.class)
                        && bottomEdge.getClass().equals(EdgeTreatment.class);

        float cornerSize = topLeftCorner.getCornerSize();

        boolean cornersHaveSameSize =
                topRightCorner.getCornerSize() == cornerSize
                        && bottomLeftCorner.getCornerSize() == cornerSize
                        && bottomRightCorner.getCornerSize() == cornerSize;

        boolean hasRoundedCorners =
                topRightCorner instanceof RoundedCornerTreatment
                        && topLeftCorner instanceof RoundedCornerTreatment
                        && bottomRightCorner instanceof RoundedCornerTreatment
                        && bottomLeftCorner instanceof RoundedCornerTreatment;

        return hasDefaultEdges && cornersHaveSameSize && hasRoundedCorners;
    }
451219
@Override
    protected void onGraphDraw(Canvas _Canvas) {
        super.onGraphDraw(_Canvas);

        if (!mPieData.isEmpty()) {

            float innerStartAngle = 0;
            float innerSweepAngle = 0;
            int   amountOfPieSlices = mPieData.size();

            for (int pieIndex = 0; pieIndex < amountOfPieSlices; pieIndex++) {
                PieModel model = mPieData.get(pieIndex);

                mGraphPaint.setColor(model.getColor());

                // TODO: put calculation in the animation onUpdate method and provide an animated value
                float startAngle;
                float sweepAngle = (model.getEndAngle() - model.getStartAngle()) * mRevealValue;

                if (mOpenClockwise) {
                    startAngle = model.getStartAngle() * mRevealValue;
                }
                else {
                    startAngle = 360 - model.getEndAngle() * mRevealValue;
                }

                if(pieIndex == 0) {
                    innerStartAngle = startAngle +  (mOpenClockwise ? 0 : (float) Math.ceil(sweepAngle));
                }

                if (mOpenClockwise)
                    innerSweepAngle += sweepAngle;
                else
                    innerSweepAngle -= (float) Math.ceil(sweepAngle);

                _Canvas.drawArc(mGraphBounds,
                        startAngle,
                        sweepAngle,
                        true, mGraphPaint);

                // Draw the highlighted inner edges if an InnerPadding is selected
                if (mUseInnerPadding) {
                    mGraphPaint.setColor(model.getHighlightedColor());

                    _Canvas.drawArc(mInnerBounds,
                            startAngle,
                            sweepAngle,
                            true, mGraphPaint);
                }
            }

            // Draw inner white circle
            if (mUseInnerPadding) {
                mGraphPaint.setColor(mInnerPaddingColor);

                _Canvas.drawArc(mInnerOutlineBounds,
                        innerStartAngle,
                        innerSweepAngle,
                        true,
                        mGraphPaint);
            }
        }
        else {
            // No Data available
            mGraphPaint.setColor(0xFFB6B6B6);
            _Canvas.drawArc(mGraphBounds,
                    0,
                    360,
                    true, mGraphPaint);

            // Draw inner white circle
            if (mUseInnerPadding) {
                mGraphPaint.setColor(0xFFC6C6C6);

                _Canvas.drawArc(mInnerBounds,
                        0,
                        360,
                        true, mGraphPaint);

                mGraphPaint.setColor(mInnerPaddingColor);

                _Canvas.drawArc(mInnerOutlineBounds,
                        0,
                        360,
                        true,
                        mGraphPaint);
            }
        }
    }
684851
protected void onDraw(Effect shape, Canvas canvas, Paint paint) {
        shape.draw(canvas, paint);
    }
190935
function (bounds, position, redraw) {
        if (redraw == null) {
            redraw = true;
        }

        this.setBounds(bounds);
        this.position = position.clone();
        if (redraw) {
            this.draw();
        }
    }
229957
public Canvas draw (Drawable image, float x, float y, float w, float h) {
    image.draw(gc(), x, y, w, h);
    isDirty = true;
    return this;
  }
410611
@Override
    public void draw(@NonNull Canvas canvas) {
        pruneRipples();

        // Clip to the dirty bounds, which will be the drawable bounds if we
        // have a mask or content and the ripple bounds if we're projecting.
        final Rect bounds = getDirtyBounds();
        final int saveCount = canvas.save();
        canvas.clipRect(bounds);

        drawContent(canvas);
        drawBackgroundAndRipples(canvas);

        canvas.restoreToCount(saveCount);
    }
2566
private void drawNextHalf(Canvas canvas) {
		canvas.save();
		canvas.clipRect(isFlippingVertically() ? mBottomRect : mRightRect);
		
		final float degreesFlipped = getDegreesFlipped();
		final Page p = degreesFlipped > 90 ? mCurrentPage : mNextPage;

		// if the view does not exist, skip drawing it
		if (p.valid) {
			setDrawWithLayer(p.v, true);
			drawChild(canvas, p.v, 0);
		}

		drawNextShadow(canvas);
		canvas.restore();
	}
639620
private void doPaintComponent(Graphics g)
    {/*
     * if (isOpaque() || isDesignTime()) { g.setColor(getBackground()); g.fillRect(0,0,getWidth(),getHeight()); }
     */

        if (isDesignTime())
        {
            // do nothing
        }
        else
        {
            int z = getZoom();
            Rectangle viewportBounds = getViewportBounds();
            drawMapTiles(g, z, viewportBounds);
            drawOverlays(z, g, viewportBounds);
        }

        super.paintBorder(g);
    }
374093
@Override
    public void draw(@NonNull Canvas canvas) {
        if (mCurrDrawable != null) {
            mCurrDrawable.draw(canvas);
        }
        if (mLastDrawable != null) {
            mLastDrawable.draw(canvas);
        }
    }
172433
@Override
	public void draw(Canvas canvas) {
		float width = canvas.getWidth();
		float margin = (width / 3) + mState.mMarginSide;
		float posY = canvas.getHeight() - mState.mMarginBottom;
		canvas.drawLine(margin, posY, width - margin, posY, mPaint);
	}
1103498
private void fillInternalShadowRounded(Graphics2D g, Shape s) {
        g.setPaint(getRoundedShadowGradient(s));
        g.fill(s);
    }
843034
protected void paintDirtyRect (Graphics2D gfx, Rectangle rect)
    {
        // paint the behind the scenes stuff
        paintBehind(gfx, rect);

        // paint back sprites and animations
        paintBits(gfx, AnimationManager.BACK, rect);

        // paint the between the scenes stuff
        paintBetween(gfx, rect);

        // paint front sprites and animations
        paintBits(gfx, AnimationManager.FRONT, rect);

        // paint anything in front
        paintInFront(gfx, rect);
    }
1307634
@Override
	public void draw(float x,float y, Color filter) {
		draw(x,y,getWidth(),getHeight(), filter);
	}
798973
@Override
    public void draw(GraphicContext graphicContext) {
        graphicContext.fillColor(this.displayModel.getBackgroundColor());

        // Swap bitmaps before the Canvas.drawBitmap to prevent flickering as much as possible
        swapBitmaps();

        if (this.odBitmap != null) {
            graphicContext.drawBitmap(this.odBitmap, this.matrix);
        }
    }
1190651
public void drawInForeground(Canvas canvas) {
        Axis axis = chart.getChartData().getAxisYLeft();
        if (null != axis) {
            drawAxisLabelsAndName(canvas, axis, LEFT);
        }

        axis = chart.getChartData().getAxisYRight();
        if (null != axis) {
            drawAxisLabelsAndName(canvas, axis, RIGHT);
        }

        axis = chart.getChartData().getAxisXBottom();
        if (null != axis) {
            drawAxisLabelsAndName(canvas, axis, BOTTOM);
        }

        axis = chart.getChartData().getAxisXTop();
        if (null != axis) {
            drawAxisLabelsAndName(canvas, axis, TOP);
        }
    }
121226
protected void drawBorder (Graphics2D gfx, int x, int y)
    {
        // draw the black outer border
        gfx.setColor(Color.black);
        gfx.drawRoundRect(x, y, _size.width - 1, _size.height - 1, _dia, _dia);
    }
1028137
public void draw(Shape shape, ShapeFill fill) {
		predraw();
		TextureImpl.bindNone();

		ShapeRenderer.draw(shape, fill);

		currentColor.bind();
		postdraw();
	}