mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-28 06:27:02 +00:00
This PR adds the support of scaling in CPView. There are two new public methods in CPView : -(void)scaleUnitSquareToSize: and -(void)setScaleSize: -(void)scaleUnitSquareToSize: works exactly as in COCOA, it means if you set a first scale to 0.5 and then 0.5 again, the scaleSize of the view will be 0.25 -(void)setScaleSize: works with the value given. If you set 0.5 after you just seted 0.5 the scaleSize will be 0.5. This method is definitly better in using, specially when using the scaleSize binding with a slider. Test app in Tests/Manual/ScalingTest
19 lines
298 B
Plaintext
19 lines
298 B
Plaintext
/*
|
|
* AppController.j
|
|
* ScalingTest
|
|
*
|
|
* Created by You on July 23, 2013.
|
|
* Copyright 2013, Your Company All rights reserved.
|
|
*/
|
|
|
|
@import <Foundation/Foundation.j>
|
|
@import <AppKit/AppKit.j>
|
|
|
|
@import "AppController.j"
|
|
|
|
|
|
function main(args, namedArgs)
|
|
{
|
|
CPApplicationMain(args, namedArgs);
|
|
}
|