mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 20:05:03 +00:00
Default the text position point to (0,0) if it's undefined.
This commit is contained in:
1 parent
c942259c90
commit
f4f4dd8025
2 files changed
+10
-1
No files matched your search
@@ -37,7 +37,7 @@ function CGContextSetTextMatrix(/* CGContext */ aContext, /* CGAffineTransform *
|
||||
|
||||
function CGContextGetTextPosition(/* CGContext */ aContext)
|
||||
{
|
||||
return aContext._textPosition;
|
||||
return aContext._textPosition || _CGPointMakeZero();
|
||||
}
|
||||
|
||||
function CGContextSetTextPosition(/* CGContext */ aContext, /* float */ x, /* float */ y)
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
@import "CPRange.j"
|
||||
@import "CPString.j"
|
||||
|
||||
|
||||
CPFontAttributeName = "font";
|
||||
CPForegroundColorAttributeName = "color";
|
||||
|
||||
/*!
|
||||
@class CPAttributedString
|
||||
@ingroup foundation
|
||||
@@ -42,6 +46,11 @@
|
||||
implements functionality from both NSAttributedString and
|
||||
NSMutableAttributedString. However, to ease converting of existing
|
||||
Objective-C code a CPMutableAttributedString alias to this class exists.
|
||||
|
||||
Below are a list of commonly used attributes:
|
||||
CPFontAttributeName - Font object
|
||||
CPForegroundColorAttributeName - CPColor object
|
||||
|
||||
*/
|
||||
@implementation CPAttributedString : CPObject
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user