fixed: manual test was missing

This commit is contained in:
daboe01 committed 2016-08-17 20:10:02 +02:00
1 parent 79a4733698
commit 85648c7f11
3 files changed
+5 -13

No files matched your search

+1
View File
@@ -24,6 +24,7 @@
@import "CPCompatibility.j"
@import "CGGeometry.j"
@import "CGPath.j"
@import "CGContextText.j"
@typedef CGContext
-13
View File
@@ -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];
}