% MagickCore Geometry Methods %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% January 2003 %
% %
% %
-% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
case '-':
case '.':
case ',':
- case 'e':
case '+':
case '0':
case '1':
case '8':
case '9':
case 215:
+ case 'e':
+ case 'E':
{
p++;
break;
{ "a2", "1191x1684" },
{ "a3", "842x1191" },
{ "a4", "595x842" },
- { "a4smaLL", "595x842" },
+ { "a4small", "595x842" },
{ "a5", "420x595" },
{ "a6", "297x420" },
{ "a7", "210x297" },
{ "ledger", "1224x792" },
{ "legal", "612x1008" },
{ "letter", "612x792" },
- { "lettersmaLL", "612x792" },
+ { "lettersmall", "612x792" },
{ "quarto", "610x780" },
{ "statement", "396x612" },
{ "tabloid", "792x1224" },
% and ^) flags present. It does not report the location of the percentage
% relative to the values.
%
-% Values may also be seperated by commas, colons, or slashes, and offsets.
+% Values may also be separated by commas, colons, or slashes, and offsets.
% Offsets may be prefixed by multiple signs to make offset string
% substitutions easier to handle from shell scripts.
% For example: "-10-10", "-+10-+10", or "+-10+-10" will generate negtive
case '/':
case ':':
case 215:
+ case 'e':
+ case 'E':
{
p++;
break;
if (flags == NoValue)
{
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidGeometry","'%s'",geometry);
+ "InvalidGeometry","`%s'",geometry);
return(flags);
}
if ((flags & PercentValue) != 0)
(void) ParseGeometry(geometry,&geometry_info);
area=geometry_info.rho;
distance=sqrt((double) former_width*former_height);
- scale.x=(double) former_width/(distance/sqrt((double) area));
- scale.y=(double) former_height/(distance/sqrt((double) area));
+ scale.x=former_width/(distance/sqrt(area));
+ scale.y=former_height/(distance/sqrt(area));
if ((scale.x < (double) *width) || (scale.y < (double) *height))
{
- *width=(size_t) (former_width/(distance/sqrt(area))+0.5);
- *height=(size_t) (former_height/(distance/sqrt(area))+0.5);
+ *width=(unsigned long) (former_width/(distance/sqrt(area)));
+ *height=(unsigned long) (former_height/(distance/sqrt(area)));
}
former_width=(*width);
former_height=(*height);
if (flags == NoValue)
{
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidGeometry","'%s'",geometry);
+ "InvalidGeometry","`%s'",geometry);
return(flags);
}
if ((flags & PercentValue) != 0)
®ion_info->width,®ion_info->height);
if (flags == NoValue)
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidGeometry","'%s'",geometry);
+ "InvalidGeometry","`%s'",geometry);
return(flags);
}
\f