mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-11 01:18:45 +00:00
fixed: manual test was missing
This commit is contained in:
1 parent
79a4733698
commit
85648c7f11
3 files changed
+5
-13
No files matched your search
@@ -24,6 +24,7 @@
|
||||
@import "CPCompatibility.j"
|
||||
@import "CGGeometry.j"
|
||||
@import "CGPath.j"
|
||||
@import "CGContextText.j"
|
||||
|
||||
@typedef CGContext
|
||||
|
||||
|
||||
@@ -84,16 +84,3 @@ function CGContextShowTextAtPoint(/* CGContext */ aContext, /* float */ x, /* fl
|
||||
|
||||
aContext._textPosition = CGPointMake(x + width, y);
|
||||
}
|
||||
|
||||
// FIXME: these are hacks that override the default behavior.
|
||||
|
||||
function CGContextSetFillColor(/* CGContext */ aContext, /* CPColor */ aColor)
|
||||
{
|
||||
aContext.fillStyle = [aColor cssString];
|
||||
aContext._CPColor = aColor;
|
||||
}
|
||||
|
||||
function CGContextGetFillColor(/* CGContext */ aContext)
|
||||
{
|
||||
return aContext._CPColor;
|
||||
}
|
||||
@@ -50,6 +50,10 @@
|
||||
var innerRect = CGRectInset(aRect, CGRectGetWidth(aRect)/2 - 10, CGRectGetHeight(aRect)/2 - 10);
|
||||
CGContextStrokeRectWithWidth(context, innerRect, 4);
|
||||
|
||||
CGContextSetTextPosition(context, innerRect.origin.x + 10, innerRect.origin.x + 10);
|
||||
CGContextSetFillColor(context, [CPColor blueColor]);
|
||||
CGContextShowText(context, 'Hello World Canvas!');
|
||||
|
||||
[self unlockFocus];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user