Skip to content
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

Replace setPixelColor with scanLine() or bits() #391

Open
pklampros opened this issue Nov 8, 2020 · 0 comments
Open

Replace setPixelColor with scanLine() or bits() #391

pklampros opened this issue Nov 8, 2020 · 0 comments

Comments

@pklampros
Copy link
Collaborator

From the qt docs for setPixelColor:

Warning: This function is expensive due to the call of the internal detach() function called within; if performance is a concern, we recommend the use of scanLine() or bits() to access pixel data directly.

As found when filling pointmap pixels:

data.setPixelColor(x, y, qRgb(colour.redb(),colour.greenb(),colour.blueb()));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant