Comments (5)
Forgot to mention, you'd need to wrap the context-sensitive lines in RTLabel.m (round line 216) in a conditional, like so:
if (context != NULL)
{
// Drawing code.
CGContextSetTextMatrix(context, CGAffineTransformIdentity);
CGAffineTransform flipVertical = CGAffineTransformMake(1,0,0,-1,0,self.frame.size.height);
CGContextConcatCTM(context, flipVertical);
}
from rtlabel.
Actually, it's a lot easier than that. Let me close this issue and give you a pull request.
CGContextRef context = UIGraphicsGetCurrentContext();
if (context != NULL)
{
// Drawing code.
CGContextSetTextMatrix(context, CGAffineTransformIdentity);
CGAffineTransform flipVertical = CGAffineTransformMake(1,0,0,-1,0,self.frame.size.height);
CGContextConcatCTM(context, flipVertical);
}
from rtlabel.
Thanks for all the effort. I don't get what you mean by:
"You can fix this by changing the -(void)render method to pass a context, like -(void)render:(CGContextRef)context and then either call [self render:UIGraphicsGetCurrentContext()]; from within the drawRect or [self render:NULL]; from the other places."
C is still a bit foreign to me.
from rtlabel.
Nevermind this issue, the pull request you merged is simpler and still does
the same. For the fact that C is a bit foreign to you, you've made a rather
good effort!
Cheers,
EP.
On Sat, May 21, 2011 at 2:35 PM, honcheng <
[email protected]>wrote:
Thanks for all the effort. I don't get what you mean by:
"You can fix this by changing the -(void)render method to pass a context,
like -(void)render:(CGContextRef)context and then either call [self
render:UIGraphicsGetCurrentContext()]; from within the drawRect or [self
render:NULL]; from the other places."C is still a bit foreign to me.
Reply to this email directly or view it on GitHub:
#3 (comment)
from rtlabel.
Thanks :p
from rtlabel.
Related Issues (20)
- If font size too big ,the frame is small .then display empty.
- optimumSize HOT 3
- link can not be clicked when set text alignment to right
- newline in anchor tag value leads to a nil link
- memory leak HOT 1
- [RTLabel render] Cash on CFAttributedStringSetAttributes HOT 1
- Crash when there is a space after a " HOT 1
- can add <img></img> HOT 1
- vetically?
- string range limits HOT 1
- reason: '-[__NSCFString replaceOccurrencesOfString:withString:options:range:]: Range {0, 6} out of bounds; string length 2' HOT 2
- Don't underline links HOT 1
- Crashes while using different font style
- RTLabel can't change the textColor dynamic
- 有崩溃问题
- can't display @"<ABC>" style strings
- Crash when setText contains @"<f c=>" style strings.
- Issue with setting LineBreakMode to kCTLineBreakByTruncatingTail
- Intrinsic content size information
- RTLabel extractTextStyleFromText:paragraphReplacement(RTLabel.m:926)。Range {0, 1} out of bounds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtlabel.