Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RcColes

Pages: [1]
1
Unfortunately the problem is still occurring when the call to transform.translate is removed, and replaced with what I think is the correct method for translating sprites.

namespace Testcase
{
    class Program
    {
        static void Main(string[] args)
        {
            Sprite sp1 = new Sprite(new Texture("test.png")); //16*16 image
            sp1.Position = new Vector2f(1,1);

            Transform step1 = sp1.Transform;

            Transform step2 = step1.GetInverse(); //crashes here
        }
    }
}
 

2
I'm not sure if this is a bug or if I'm fundamentally misunderstanding how this function works, but whenever I call InverseTransform on a sprite it crashes with  "'System.AccessViolationException' occurred in mscorlib.dll".


namespace Testcase
{
    class Program
    {
        static void Main(string[] args)
        {
            Sprite sp1 = new Sprite(new Texture("test.png")); //16*16 image

            sp1.Transform.Translate(1, 1); // make sure it has a transform applied

            Transform step1 = sp1.Transform;

            Transform step2 = step1.GetInverse(); //crashes here
        }
    }
}

Note that in the testcase I get the transform then call GetInverse, so that I could isolate the problem the the inversion of the transform.

Pages: [1]
anything