Clear context after changing context scale #126

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

brutella commented Aug 10, 2012

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

@dannygreg dannygreg and 1 other commented on an outdated diff Aug 10, 2012

lib/UIKit/TUIView.m
CGFloat scale = [self.layer respondsToSelector:@selector(contentsScale)] ? self.layer.contentsScale : 1.0f; \
CGContextScaleCTM(context, scale, scale); \
+ if(_viewFlags.clearsContextBeforeDrawing) \
+ CGContextClearRect(context, b); \
@dannygreg

dannygreg Aug 10, 2012

Collaborator

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

@brutella

brutella Aug 10, 2012

Contributor

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.

@dannygreg

dannygreg Aug 10, 2012

Collaborator

Ah I see.

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

@brutella brutella Update lib/UIKit/TUIView.m
Fixed line indentation
b6ee73f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment