I want to create a class that has a draw() function and CL_CollisionOutline support. I thought this would be straight forward:

I created a class called Terra that is derived from CL_Surface and contains a CL_CollisionOutline object. I initialized the CL_CollisionOutline as new CL_CollisionOutline(get_pixeldata()) after I loaded the CL_Surface with data from a CL_ResourceManager.

The problem is that the CL_CollisionOutline(get_pixeldata()) doesn't seem to work as I expected. If I do a "draw()" on the CL_CollisionOutline i just get a vertical line.

If I explictly load the CL_CollisionOutline from a file (.png) it works, but not if I get the data from a PixelBuffer.

Any Ideas? Am I doing something wrong? Is there a standard way to "attach" a CL_CollisionOutline to a CL_Surface?