Translating XNA method to Slick2D

There is a method by Microsoft which perform a pixel perfect collision detection on two sprites. The special thing about this function is that it supports rotations!
Here is the method:

        /// <summary>
        /// Determines if there is overlap of the non-transparent pixels between two
        /// sprites.
        /// </summary>
        /// <param name="transformA">World transform of the first sprite.</param>
        /// <param name="widthA">Width of the first sprite's texture.</param>
        /// <param name="heightA">Height of the first sprite's texture.</param>
        /// <param name="dataA">Pixel color data of the first sprite.</param>
        /// <param name="transformB">World transform of the second sprite.</param>
        /// <param name="widthB">Width of the second sprite's texture.</param>
        /// <param name="heightB">Height of the second sprite's texture.</param>
        /// <param name="dataB">Pixel color data of the second sprite.</param>
        /// <returns>True if non-transparent pixels overlap; false otherwise</returns>
        public static bool IntersectPixels(
                            Matrix transformA, int widthA, int heightA, Color[] dataA,
                            Matrix transformB, int widthB, int heightB, Color[] dataB)
        {
            // Calculate a matrix which transforms from A's local space into
            // world space and then into B's local space
            Matrix transformAToB = transformA * Matrix.Invert(transformB);

            // When a point moves in A's local space, it moves in B's local space with a
            // fixed direction and distance proportional to the movement in A.
            // This algorithm steps through A one pixel at a time along A's X and Y axes
            // Calculate the analogous steps in B:
            Vector2 stepX = Vector2.TransformNormal(Vector2.UnitX, transformAToB);
            Vector2 stepY = Vector2.TransformNormal(Vector2.UnitY, transformAToB);

            // Calculate the top left corner of A in B's local space
            // This variable will be reused to keep track of the start of each row
            Vector2 yPosInB = Vector2.Transform(Vector2.Zero, transformAToB);

            // For each row of pixels in A
            for (int yA = 0; yA < heightA; yA++)
            {
                // Start at the beginning of the row
                Vector2 posInB = yPosInB;

                // For each pixel in this row
                for (int xA = 0; xA < widthA; xA++)
                {
                    // Round to the nearest pixel
                    int xB = (int)Math.Round(posInB.X);
                    int yB = (int)Math.Round(posInB.Y);

                    // If the pixel lies within the bounds of B
                    if (0 <= xB && xB < widthB &&
                        0 <= yB && yB < heightB)
                    {
                        // Get the colors of the overlapping pixels
                        Color colorA = dataA[xA + yA * widthA];
                        Color colorB = dataB[xB + yB * widthB];

                        // If both pixels are not completely transparent,
                        if (colorA.A != 0 && colorB.A != 0)
                        {
                            // then an intersection has been found
                            return true;
                        }
                    }

                    // Move to the next pixel in the row
                    posInB += stepX;
                }

                // Move to the next row
                yPosInB += stepY;
            }

            // No intersection found
            return false;
        }

I am familiar with java so I can translate most of the code myself. width, height and color data I have access to so we dont have to worry about them.
It is the Matrix and Transform classes that confuse me. What is their equivalence in Slick2D? Also, in my game, the rotation of the images is stored as an float.

Read up on linear algebra.
http://betterexplained.com/articles/linear-algebra-guide/
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/#An_introduction_to_matrices

Since Slick uses LWJGL, you can actually make use of Vector2f/Matrix4f/etc.

The real problem is that since Slick uses OpenGL for rendering, you won’t have access to the color data without performing a copy from GPU to CPU (which can be slow).

Do I really need to learn linear algebra? That would require a background of math to, which I dont have.
I checked the Slick2D api and I found a few interesting things but I am stuck at the first line in the method body:
Matrix transformAToB = transformA * Matrix.Invert(transformB);
How do I translate this?

[quote=“davedes,post:2,topic:41430”]
Dont worry about that.

Or you could keep a ‘Pixmap’ (<- LibGDX) storing all the data on the CPU from the beginning on. I think that’s totally okay on today’s hardware. Today we have enough RAM space to store two copies of texture data, once on the CPU Memory once on the GPU memory.

The only problem is that I don’t have a clue of how to do that with Slick2D. I’d go with writing a simple Pixmap class storing an int[] array with color information from the loaded BufferedImage, which Slick can obviously read and convert to a ogl texture.