249
249
Set XPS render geometry.
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);
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+
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)
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);
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';
362
361
% The format of the RegisterXPSImage method is:
364
% size_t RegisterXPSImage(void)
363
% unsigned long RegisterXPSImage(void)
367
ModuleExport size_t RegisterXPSImage(void)
366
ModuleExport unsigned long RegisterXPSImage(void)