diff options
| author | Neil <nyamatongwe@gmail.com> | 2013-12-15 10:46:39 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2013-12-15 10:46:39 +1100 | 
| commit | 982a9be5d39fb042e1deb86af5930cb54729f83f (patch) | |
| tree | e93ecbd0e73da10016493ba3c736f3d16ee1a90a /cocoa/QuartzTextLayout.h | |
| parent | c0f861272b0d90566c68398087db3a93840f47c1 (diff) | |
| download | scintilla-mirror-982a9be5d39fb042e1deb86af5930cb54729f83f.tar.gz | |
Format normalization - whitespace and braces made consistent.
Parameter names added to method declarations.
Diffstat (limited to 'cocoa/QuartzTextLayout.h')
| -rw-r--r-- | cocoa/QuartzTextLayout.h | 26 | 
1 files changed, 13 insertions, 13 deletions
diff --git a/cocoa/QuartzTextLayout.h b/cocoa/QuartzTextLayout.h index c789ed10f..edf357682 100644 --- a/cocoa/QuartzTextLayout.h +++ b/cocoa/QuartzTextLayout.h @@ -39,7 +39,7 @@ public:  		{  			CFRelease(mLine);  			mLine = NULL; -		}	 +		}      }      inline void setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding, const QuartzTextStyle& r ) @@ -47,19 +47,19 @@ public:  		CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );          if (!str)              return; -		 +  	        stringLength = CFStringGetLength(str);  		CFMutableDictionaryRef stringAttribs = r.getCTStyle(); -		 +  		if (mString != NULL)  			CFRelease(mString);  		mString = ::CFAttributedStringCreate(NULL, str, stringAttribs); -		 +  		if (mLine != NULL)  			CFRelease(mLine);  		mLine = ::CTLineCreateWithAttributedString(mString); -		 +  		CFRelease( str );      } @@ -70,28 +70,28 @@ public:      {  		if (mLine == NULL)  			return; -		 +  		::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0)); -		 +  		// Set the text drawing position.  		::CGContextSetTextPosition(gc, x, y); -		 +  		// And finally, draw!  		::CTLineDraw(mLine, gc);      } -	 +  	float MeasureStringWidth() -	{		 +	{  		if (mLine == NULL)  			return 0.0f; -		 +  		return ::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL);  	} -	 +      CTLineRef getCTLine() {          return mLine;      } -	 +      CFIndex getStringLength() {  	    return stringLength;      }  | 
