private void cyclicCircularGradientFillRaster(int[] pixels, int off,
                                                  int adjust,
                                                  int x, int y,
                                                  int w, int h) {
        // Constant part of the C factor of the quadratic equation
        final double constC =
                -(radiusSq) + (centerX * centerX) + (centerY * centerY);
        double A; //coefficient of the quadratic equation (Ax^2 + Bx + C = 0)
        double B; //coefficient of the quadratic equation
        double C; //coefficient of the quadratic equation
        double slope; //slope of the focus-perimeter line
        double yintcpt; //y-intercept of the focus-perimeter line
        double solutionX;//intersection with circle X coordinate
        double solutionY;//intersection with circle Y coordinate
        final float constX = (a00 * x) + (a01 * y) + a02;//const part of X coord
        final float constY = (a10 * x) + (a11 * y) + a12; //const part of Y coord
        final float precalc2 = 2 * centerY;//const in inner loop quad. formula
        final float precalc3 = -2 * centerX;//const in inner loop quad. formula
        float X; // User space point X coordinate
        float Y; // User space point Y coordinate
        float g;//value between 0 and 1 specifying position in the gradient
        float det; //determinant of quadratic formula (should always be >0)
        float currentToFocusSq;//sq distance from the current pt. to focus
        float intersectToFocusSq;//sq distance from the intersect pt. to focus
        float deltaXSq; //temp variable for a change in X squared.
        float deltaYSq; //temp variable for a change in Y squared.
        int indexer = off; //index variable for pixels array
        int i, j; //indexing variables for FOR loops
        int pixInc = w + adjust;//incremental index change for pixels array

        for (j = 0; j < h; j++) { //for every row

            X = (a01 * j) + constX; //constants from column to column
            Y = (a11 * j) + constY;

            //for every column (inner loop begins here)
            for (i = 0; i < w; i++) {

                // special case to avoid divide by zero or very near zero
                if (((X - focusX) > -0.000001f) &&
                        ((X - focusX) < 0.000001f)) {
                    solutionX = focusX;

                    solutionY = centerY;

                    solutionY += (Y > focusY) ? trivial : -trivial;
                } else {

                    //slope of the focus-current line
                    slope = (Y - focusY) / (X - focusX);

                    yintcpt = Y - (slope * X); //y-intercept of that same line

                    //use the quadratic formula to calculate the intersection
                    //point
                    A = (slope * slope) + 1;

                    B = precalc3 + (-2 * slope * (centerY - yintcpt));

                    C = constC + (yintcpt * (yintcpt - precalc2));

                    det = (float) Math.sqrt((B * B) - (4 * A * C));

                    solutionX = -B;

                    //choose the positive or negative root depending
                    //on where the X coord lies with respect to the focus.
                    solutionX += (X < focusX) ? -det : det;

                    solutionX = solutionX / (2 * A);//divisor

                    solutionY = (slope * solutionX) + yintcpt;
                }

                //calculate the square of the distance from the current point
                //to the focus and the square of the distance from the
                //intersection point to the focus. Want the squares so we can
                //do 1 square root after division instead of 2 before.

                deltaXSq = (float) solutionX - focusX;
                deltaXSq = deltaXSq * deltaXSq;

                deltaYSq = (float) solutionY - focusY;
                deltaYSq = deltaYSq * deltaYSq;

                intersectToFocusSq = deltaXSq + deltaYSq;

                deltaXSq = X - focusX;
                deltaXSq = deltaXSq * deltaXSq;

                deltaYSq = Y - focusY;
                deltaYSq = deltaYSq * deltaYSq;

                currentToFocusSq = deltaXSq + deltaYSq;

                //want the percentage (0-1) of the current point along the
                //focus-circumference line
                g = (float) Math.sqrt(currentToFocusSq / intersectToFocusSq);

                //Get the color at this point
                pixels[indexer + i] = indexIntoGradientsArrays(g);

                X += a00; //incremental change in X, Y
                Y += a10;
            } //end inner loop
            indexer += pixInc;
        } //end outer loop
    }