Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * AppController.j
- * testapp
- *
- * Created by You on June 6, 2010.
- * Copyright 2010, Your Company All rights reserved.
- */
- @import <Foundation/CPObject.j>
- @import <AppKit/CPBezierPath.j>
- @implementation AView : CPView
- - (void)drawRect:(CPRect)aRect
- {
- var aPath = [CPBezierPath bezierPath];
- [aPath moveToPoint:CPMakePoint(0.0, 0.0)];
- [aPath lineToPoint:CPMakePoint(10.0, 10.0)];
- [aPath curveToPoint:CPMakePoint(18.0, 21.0)
- controlPoint1:CPMakePoint(6.0, 2.0)
- controlPoint2:CPMakePoint(28.0, 10.0)];
- [aPath stroke];
- }
- @end
- @implementation AppController : CPObject
- {
- }
- - (void)applicationDidFinishLaunching:(CPNotification)aNotification
- {
- var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
- contentView = [theWindow contentView];
- var v = [[AView alloc] initWithFrame:CGRectMake(0,0,100,100)];
- [contentView addSubview:v];
- [theWindow orderFront:self];
- }
- @end
Add Comment
Please, Sign In to add comment