~ubuntu-branches/ubuntu/trusty/xscreensaver/trusty

« back to all changes in this revision

Viewing changes to hacks/webcollage-helper-cocoa.m

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-11-30 13:33:13 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091130133313-3b5nz2e7hvbb8h3l
Tags: 5.10-3ubuntu1
* Merge with Debian unstable, remaining changes: (LP: #489062)
  - debian/control: add Build-Depends on ubuntu-artwork
  - debian/rules: use /usr/share/backgrounds
  - debian/control: Move xli | xloadimage recommends to suggests
  - debian/split-hacks.config: Use different set of default hacks to Debian
  - debian/source_xscreensaver.py: Add apport hook
  - debian/patches/53_XScreenSaver.ad.in.patch: Use Ubuntu branding

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* webcollage-helper-cocoa --- scales and pastes one image into another
2
 
 * xscreensaver, Copyright (c) 2002-2008 Jamie Zawinski <jwz@jwz.org>
 
2
 * xscreensaver, Copyright (c) 2002-2009 Jamie Zawinski <jwz@jwz.org>
3
3
 *
4
4
 * Permission to use, copy, modify, distribute, and sell this software and its
5
5
 * documentation for any purpose is hereby granted without fee, provided that
20
20
#include <unistd.h>
21
21
#include <sys/stat.h>
22
22
 
 
23
 
 
24
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
 
25
 typedef int          NSInteger;
 
26
 typedef unsigned int NSUInteger;
 
27
#endif
 
28
 
 
29
 
23
30
char *progname;
24
31
static int verbose_p = 0;
25
32
 
142
149
                   bytesPerRow: 0
143
150
                  bitsPerPixel: 0];
144
151
 
145
 
  int xx, yy;
 
152
  NSInteger xx, yy;
146
153
  double *ramp = (double *) malloc (sizeof(*ramp) * (bevel_size + 1));
147
154
 
148
155
  if (!ramp)
183
190
          r = rx * ry;
184
191
          if (r != 1)
185
192
            {
186
 
              unsigned int p[4];
 
193
              NSUInteger p[4];
187
194
              p[0] = 0xFF * r;
188
195
              p[1] = p[2] = p[3] = 0xFF;
189
196
              [rep setPixel:p atX:xx y:yy];
296
303
                               properties:props];
297
304
 
298
305
  [jpeg_data writeToFile:
299
 
               [NSString stringWithCString:file]
 
306
               [NSString stringWithCString:file
 
307
                                  encoding:NSISOLatin1StringEncoding]
300
308
             atomically:YES];
301
309
 
302
310
  if (verbose_p)