Hi Matthew,

I think you should keep things simple in the AstroImage class. I.e. you shouldn't include in it the notion of angular size and rotation which is quite undefined for a polygon...
I thik AstroImage should only contain methods like:
//! Rotate the image with respect to it center
//! @param angle the rotation angle in radian
void rotate(double angle);

//! Scale the image with respect to its center
//! @param factor the scaling factor. The image is shrinked if <1
void scale(double factor);

Those methods would only modify the polygon points with respect to their previous position. Each method would compute a transformation matrix and apply it to the vectors of the polygon.

Your plug-in itself will have to know what the absolute rotation and scaling are for one nebula, but these definitions are nebula specific.

Fabien


On 7/11/07, Matthew Gates <matthewg42@gmail.com> wrote:
Fabien,

Please find attached a patch to the AstroImage class to add functions for
querying and modifying an image (i.e. moving it about).

Before I commit, and modify Nebula to use the new AstroImage, can you just
verify that this is more or less what you had in mind?


Matthew

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stellarium-pubdevel mailing list
Stellarium-pubdevel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel