-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Per-object opacity #4031
base: master
Are you sure you want to change the base?
Per-object opacity #4031
Conversation
initial push
Commit history can be used to see who changed what. :-)
I didn't see a good reason to limit this feature to tile objects.
It's never set to anything else than 1.0.
The selection outline should stay clearly visible.
Opacity is irrelevant here since it doesn't change when an object is moved.
We don't need these values to stay the same, so we can put Opacity after Rotation like everywhere else in the code.
@jcbk101 I'm sorry for all the small commits and the notifications they might have triggered. In any case, I've cleaned things up a bit:
Was there any particular reason you had the Properties view check for tile objects? I seems like it was due to a possible previous implementation based on In any case I'd say we give the change a bit of time for testing, but it mostly just still needs an entry added to the Thank you for implementing this! |
There are some places that should be affected by this but currently are not:
Also, the opacity still needs to be added to the map format documentation in the manual (for TMX and JSON). |
I did see this code, but I was not sure I wanted to support it as I originally was supposedly supporting to feature for personal use. As for documentation, should I handle this? What about |
What you are seeing is me getting familiar with the source code. I did not spend much time reverse engineering the project as I was goal oriented. This is why
When first implementing the changes, I was attempting to access |
That's alright! If you'd like you can help with finishing the remaining parts now, or wait for me to get around to it. :-)
Yes, feel free to have a look into adjusting the manual! The relevant pages are at:
|
Thanks for the info. I will make adjustments to my fork since a pull is not ready. Then after work, I will work on documentation. |
Remove build files
Okay, I added simple updates (copy/paste) to this docs and was sure to use
I did not bother with |
Opacity adjusted for tmxrasterizer and minimaprederer
@@ -203,6 +203,8 @@ void MiniMapRenderer::renderToImage(QImage &image, RenderFlags renderFlags) cons | |||
painter.translate(-origin); | |||
} | |||
|
|||
painter.setOpacity(object->opacity()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to store the above layer->effectiveOpacity()
in a variable and set the opacity to layerOpacity * object->opacity()
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. I don't think I would have even considered that. This is one of my fears of being a contributor. I do not know the full requirements for such a project. I am just learning qt to be honest.
Add opacity to tile objects with images.
Shapes are not supported.