discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSToolbar (was Re: Portability/Compatability between GNUstep <---> C


From: Fred Kiefer
Subject: Re: NSToolbar (was Re: Portability/Compatability between GNUstep <---> Cocoa...)
Date: Wed, 14 Jan 2004 01:31:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Alex Perez wrote:
Great, I'll give it a test when I get home today in about three or four hours.


That will be to late for this side of the ocean, but tomorrow is another day. As I already stated, I have a few more Cocoa problems. Could you also investigate the output of the attached simple application? It wont be the last, I also would like to see the results of a few tests with NSCell and perhaps a few screen shots for demo applications from the book "Cocoa Programming", but I will wait a few days to ask for them. :-)

Cheers
Fred
/* 
   Tester for NSAffineTransform
   Copyright (C) 2004 Free Software Foundation, Inc.

   Written by: Fred Kiefer <FredKiefer@gmx.de>
   Created: January 2004

   This file is part of the GNUstep Base Library.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include <Foundation/NSAutoreleasePool.h>
#include <Foundation/NSException.h>
#include <Foundation/NSString.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSAffineTransform.h>
#include <math.h>

int main (int argc, const char *argv[])
{
  CREATE_AUTORELEASE_POOL(pool);
  NSAffineTransform *t1, *t2;
  NSAffineTransform *t3, *t4;

  t1 = [NSAffineTransform new];
  [t1 translateXBy: 5 yBy: 7];
  t2 = [NSAffineTransform new];
  [t2 scaleXBy: -1 yBy: 2];
  
  NSLog(@"T1 %@", t1);
  NSLog(@"T2 %@", t2);
  t3 = [t1 copy];
  t4 = [t2 copy];
  [t1 prependTransform: t2];
  [t3 appendTransform: t4];

  NSLog(@"prependTransform results in %@", t1);
  NSLog(@"appendTransform results in %@", t3);
  RELEASE(pool);
  return 0;
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]