Hello,
Lets take a deep breath first. 🙂
SPQuad
SPQuads are sized and positioned exactly like SPImages (SPImage is a subclass of SPQuad).
The only way I know of the size not setting correctly is if the object has not be initialized and is nil.
For example, the following code:
NSLog(@"stage width: %f height: %f", Sparrow.stage.width, Sparrow.stage.height);
SPQuad *nilQuad;
nilQuad.width = Sparrow.stage.width;
NSLog(@"nilQuad: %@ width: %f", nilQuad, nilQuad.width);
SPQuad *initializedQuad = [SPQuad quadWithWidth:0 height:0];
initializedQuad.width = Sparrow.stage.width;
NSLog(@"initializedQuad: %@ width: %f", initializedQuad, initializedQuad.width);
Will log these results:
stage width: 320.000000 height: 480.000000
nilQuad: (null) width: 0.000000
initializedQuad: <SPQuad: 0xa14bdc0> width: 320.000000
SPSprite
SPSprite's sizing is handled much differently. SPSprite's size depends entirely on it's children display objects' position and size. When setting the size/scale of an SPSprite, it will change the size of it's children.
An initialized SPSprite will have a width and height of 0.
Example:
SPSprite *sprite = [SPSprite sprite];
NSLog(@"sprite: %@ width: %f height: %f", sprite, sprite.width, sprite.height);
Result:
sprite: <SPSprite: 0xd99a030> width: 0.000000 height: 0.000000
When objects are added to the sprite, the sprite's width will be the value of a child object with the highest child.x + child.width value, and the sprite's height will be the value of a child object with the highest child.y + child.height value.
If you add a quad to the sprite with position x and y of 0 and width and height of 32. The sprite's width and height will be 32.
Example:
SPSprite *sprite = [SPSprite sprite];
SPQuad *quad = [SPQuad quadWithWidth:32 height:32];
[sprite addChild:quad];
NSLog(@"sprite: %@ x: %f y: %f width: %f height: %f", sprite, sprite.x, sprite.y, sprite.width, sprite.height);
Results:
sprite: <SPSprite: 0xa6af0d0> x: 0.000000 y: 0.000000 width: 32.000000 height: 32.000000
Bug?
Actually, I might have found a bug. If I add a SPQuad with x=8, y=8, width=32, and height=32, the x and y value of the sprite remains 0 but the width and height of the sprite also remain 32. (I would think it should be 40)
Example:
SPSprite *sprite = [SPSprite sprite];
SPQuad *quad = [SPQuad quadWithWidth:32 height:32];
quad.x = 8;
quad.y = 8;
[sprite addChild:quad];
NSLog(@"sprite: %@ x: %f y: %f width: %f height: %f", sprite, sprite.x, sprite.y, sprite.width, sprite.height);
Results:
sprite: <SPSprite: 0xa458110> x: 0.000000 y: 0.000000 width: 32.000000 height: 32.000000
Don't worry about that for now. Just be aware that sprites are handled differently then quads and images.
More info
If you are interested in some manuals and tutorials, visit:
http://wiki.sparrow-framework.org/manual/start
http://wiki.sparrow-framework.org/tutorials/start
If you are still having issues, please post more details and code, as it's unclear what type of object you are using.