Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Clear context after changing context scale #126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brutella
Copy link
Contributor

Otherwise we get strange artifacts when re-drawing TUILabels on Retina displays.

CGFloat scale = [self.layer respondsToSelector:@selector(contentsScale)] ? self.layer.contentsScale : 1.0f; \
CGContextScaleCTM(context, scale, scale); \
if(_viewFlags.clearsContextBeforeDrawing) \
CGContextClearRect(context, b); \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to change nothing except the indenting. Is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, the commit moves the two lines after the CGContextScaleCTM call. The indentation looks good to my in Xcode. Seems to be an issue of using tabs instead of 4 spaces.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see.

This project uses tabs rather than 4 spaces, please correct that and push to this branch. Cheers.

Fixed line indentation
@CLAassistant
Copy link

CLAassistant commented Nov 16, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

3 participants