-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
RenderTexture ContentSize Error #2045
Comments
Try It is a little strange that RenderTexture content isn't set at creation, but if that were to be implemented, it may impact the positioning of the internal sprite, since it's a child of the RenderTexture. If the content size of the RenderTexture were to be set, then the position and anchor point of the internal sprite would need to be modified in order for it to be correct (and not break existing usage). |
@rh101 Yes, I found that very strange and I step in the code to try to figure out what was the problem but defiantly it is not working. I could find a place where the value was set. Doing this: renderTexture->getSprite()->getContentSize() What do you think? |
This is possible, but as I mentioned earlier, the internal sprite would need to be adjusted to ensure it is still drawn correctly. So, in this method:
For the internal sprite, by default it is anchored at bottom-left (
@halx99 Is it reasonable to set the RenderTexture content size and make the above changes to the internal sprite so it is drawn correctly? If so, which is the preferred anchor point of the sprite, |
@halx99 Do we want to address the issue of It's not a big issue, but it is an easy fix, since we would just need to add |
If no side-affect, we can do it |
Hi @halx99 <https://github.com/halx99> ,
I personally think that we should fix it. It will remove any confusion for the next person. Having a clean a clean working interface it is always the best solution. I know that it is work but it would be the right thing to do. Fixing small things like this one will end up making a big difference for Axmol. That is my opinion.
I do really appreciate you considering fixing this and also appreciate the interaction on the Axmol platform .
Thank you,
Stay safe
… On Aug 30, 2024, at 12:51 AM, halx99 ***@***.***> wrote:
If no side-affect, we can do it
—
Reply to this email directly, view it on GitHub <#2045 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AI54DTHRSG6DOUGEY4O46IDZT724ZAVCNFSM6AAAAABLGAYYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRQGA2DCNJRG4>.
You are receiving this because you authored the thread.
|
@asnagni Can this issue be closed now that the code has been merged? |
@halx99 Can this issue be closed? It's already been resolved. |
sure |
Hello,
When trying to capture a screenshot of a ax::ui::ImageView, when I create a RenderTexture with the same size as the ImageView and then try to check the the RenderTexture size after creation, I get a zero (0) for the width and height.
You can use this image for the test (or anyone of you like):
The is the code used that exhibits the issue:
Thank you for your help,
Stay safe
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: