~ubuntu-branches/ubuntu/oneiric/imagemagick/oneiric-updates

« back to all changes in this revision

Viewing changes to coders/xps.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-06-15 11:05:28 UTC
  • mfrom: (6.2.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110615110528-08jgo07a4846xh8d
Tags: 8:6.6.0.4-3ubuntu1
* Resynchronise with Debian (LP: #797595).  Remaining changes:
  - Make ufraw-batch (universe) a suggestion instead of a recommendation.
  - Make debian/rules install target depend on check; they cannot reliably
    be run in parallel.
  - Don't set MAKEFLAGS in debian/rules; just pass it to the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
  register char
135
135
    *p;
136
136
 
137
 
  register ssize_t
 
137
  register long
138
138
    c;
139
139
 
140
140
  SegmentInfo
143
143
  ssize_t
144
144
    count;
145
145
 
146
 
  size_t
 
146
  unsigned long
147
147
    height,
148
148
    width;
149
149
 
248
248
    /*
249
249
      Set XPS render geometry.
250
250
    */
251
 
    width=(size_t) floor(bounds.x2-bounds.x1+0.5);
252
 
    height=(size_t) floor(bounds.y2-bounds.y1+0.5);
 
251
    width=(unsigned long) (bounds.x2-bounds.x1+0.5);
 
252
    height=(unsigned long) (bounds.y2-bounds.y1+0.5);
253
253
    if (width > page.width)
254
254
      page.width=width;
255
255
    if (height > page.height)
263
263
    (void) ParseAbsoluteGeometry(PSPageGeometry,&page);
264
264
  if (image_info->page != (char *) NULL)
265
265
    (void) ParseAbsoluteGeometry(image_info->page,&page);
266
 
  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
267
 
    page.width,(double) page.height);
 
266
  (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",
 
267
    page.width,page.height);
268
268
  if (image_info->monochrome != MagickFalse)
269
269
    delegate_info=GetDelegateInfo("xps:mono",(char *) NULL,exception);
270
270
  else
279
279
    (void) ParseAbsoluteGeometry(PSPageGeometry,&page);
280
280
  if (image_info->page != (char *) NULL)
281
281
    (void) ParseAbsoluteGeometry(image_info->page,&page);
282
 
  page.width=(size_t) floor(page.width*image->y_resolution/delta.x+0.5);
283
 
  page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
284
 
    0.5);
285
 
  (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
286
 
    page.width,(double) page.height);
 
282
  page.width=(unsigned long) (page.width*image->y_resolution/delta.x+0.5);
 
283
  page.height=(unsigned long) (page.height*image->y_resolution/delta.y+0.5);
 
284
  (void) FormatMagickString(options,MaxTextExtent,"-g%lux%lu ",
 
285
    page.width,page.height);
287
286
  image=DestroyImage(image);
288
287
  read_info=CloneImageInfo(image_info);
289
288
  *read_info->magick='\0';
290
289
  if (read_info->number_scenes != 0)
291
290
    {
292
291
      if (read_info->number_scenes != 1)
293
 
        (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%.20g",
294
 
          (double) (read_info->scene+read_info->number_scenes));
 
292
        (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%lu",
 
293
          read_info->scene+read_info->number_scenes);
295
294
      else
296
295
        (void) FormatMagickString(options,MaxTextExtent,
297
 
          "-dFirstPage=%.20g -dLastPage=%.20g",(double) read_info->scene+1,
298
 
          (double) (read_info->scene+read_info->number_scenes));
 
296
          "-dFirstPage=%lu -dLastPage=%lu",read_info->scene+1,read_info->scene+
 
297
          read_info->number_scenes);
299
298
      read_info->number_scenes=0;
300
299
      if (read_info->scenes != (char *) NULL)
301
300
        *read_info->scenes='\0';
361
360
%
362
361
%  The format of the RegisterXPSImage method is:
363
362
%
364
 
%      size_t RegisterXPSImage(void)
 
363
%      unsigned long RegisterXPSImage(void)
365
364
%
366
365
*/
367
 
ModuleExport size_t RegisterXPSImage(void)
 
366
ModuleExport unsigned long RegisterXPSImage(void)
368
367
{
369
368
  MagickInfo
370
369
    *entry;