New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Width returns 0 #138
Comments
Ah, I'm sure this is a problem with the change to making the Graphic base class a DisplayObjectContainer rather than a DisplayObject. I will investigate, and I am really sorry. |
First off: THANK YOU for the easy reproduction case. That really helps :) Secondly: I have found the bug and I have submited the fix, but are you sure it returned 400 before? It should return 404, since the thickness of the line is 4. The width should be (from left to right) "half Thickness" + total width + "half thickness", ie 2 + 400 + 2. I have uploaded the fix, but please get back to me about the width. If it used to return 400, that was a bug, I would think. Also, please, keep an eye out for other mistakes that can have happened due to the change mentioned above, I would really appreciate the assistance |
Ups, yes you were right, it returned 404 and not 400. Thanks for fixing it so quickly |
Also, I realized that the bug above was just the tip of the iceberg. I will go back to having the Graphic class extending DisplayObject, and not DisplayObjectContainer. That caused more headaches then I wanted |
After pulling to the latest git. I found a problem with getting a shape's width
loadingBarContainer = new ShapeEx();
loadingBarContainer.graphics.lineStyle(4,0xffffff);
loadingBarContainer.graphics.drawRect(0, 0, 400, 10);
container.addChild(loadingBarContainer);
when I call loadingBarContainer.width, this usually returns 400 but now it always returns 0
The text was updated successfully, but these errors were encountered: