% Windows NT Feature Methods for MagickCore %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% December 1996 %
% %
% %
-% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2015 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 %
#include "MagickCore/token.h"
#include "MagickCore/splay-tree.h"
#include "MagickCore/utility.h"
-#include "MagickCore/nt-base-private.h"
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Check crop geometry.
*/
assert(image != (const Image *) NULL);
- assert(image->signature == MagickSignature);
+ assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(geometry != (const RectangleInfo *) NULL);
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickSignature);
+ assert(exception->signature == MagickCoreSignature);
if (((geometry->x+(ssize_t) geometry->width) < 0) ||
((geometry->y+(ssize_t) geometry->height) < 0) ||
(geometry->x >= (ssize_t) image->columns) ||
bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH);
if ( bitmap.bmBits == NULL )
bitmap.bmBits = bitmap_bits;
- if ((IssRGBColorspace(image->colorspace) == MagickFalse) &&
- (IsGrayColorspace(image->colorspace) == MagickFalse))
- TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ SetImageColorspace(image,sRGBColorspace,exception);
/*
Extract crop image.
*/
% %
% %
% %
-+ N T G e t T y pe L i s t %
+% N T A c q u i r e T y p e C a c h e %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% NTLoadTypeLists() loads a Windows TrueType fonts.
+% NTAcquireTypeCache() loads a Windows TrueType fonts.
%
-% The format of the NTLoadTypeLists method is:
+% The format of the NTAcquireTypeCache method is:
%
-% MagickBooleanType NTLoadTypeLists(SplayTreeInfo *type_list)
+% MagickBooleanType NTAcquireTypeCache(SplayTreeInfo *type_cache)
%
% A description of each parameter follows:
%
-% o type_list: A linked list of fonts.
+% o type_cache: A linked list of fonts.
%
*/
-MagickExport MagickBooleanType NTLoadTypeLists(SplayTreeInfo *type_list,
+MagickExport MagickBooleanType NTAcquireTypeCache(SplayTreeInfo *type_cache,
ExceptionInfo *exception)
{
HKEY
list_entries = 0;
char
- buffer[MaxTextExtent],
- system_root[MaxTextExtent],
- font_root[MaxTextExtent];
+ buffer[MagickPathExtent],
+ system_root[MagickPathExtent],
+ font_root[MagickPathExtent];
DWORD
type,
if (res != ERROR_SUCCESS)
return(MagickFalse);
*font_root='\0';
- (void) CopyMagickString(buffer,system_root,MaxTextExtent);
- (void) ConcatenateMagickString(buffer,"\\fonts\\arial.ttf",MaxTextExtent);
+ (void) CopyMagickString(buffer,system_root,MagickPathExtent);
+ (void) ConcatenateMagickString(buffer,"\\fonts\\arial.ttf",MagickPathExtent);
if (IsPathAccessible(buffer) != MagickFalse)
{
- (void) CopyMagickString(font_root,system_root,MaxTextExtent);
- (void) ConcatenateMagickString(font_root,"\\fonts\\",MaxTextExtent);
+ (void) CopyMagickString(font_root,system_root,MagickPathExtent);
+ (void) ConcatenateMagickString(font_root,"\\fonts\\",MagickPathExtent);
}
else
{
- (void) CopyMagickString(font_root,system_root,MaxTextExtent);
- (void) ConcatenateMagickString(font_root,"\\",MaxTextExtent);
+ (void) CopyMagickString(font_root,system_root,MagickPathExtent);
+ (void) ConcatenateMagickString(font_root,"\\",MagickPathExtent);
}
{
value_name_length;
char
- value_data[MaxTextExtent],
- value_name[MaxTextExtent];
+ value_data[MagickPathExtent],
+ value_name[MagickPathExtent];
res = ERROR_SUCCESS;
{
char
*family_extent,
- token[MaxTextExtent],
+ token[MagickPathExtent],
*pos,
*q;
(void) ResetMagickMemory(type_info,0,sizeof(TypeInfo));
type_info->path=ConstantString("Windows Fonts");
- type_info->signature=MagickSignature;
+ type_info->signature=MagickCoreSignature;
/* Name */
- (void) CopyMagickString(buffer,value_name,MaxTextExtent);
+ (void) CopyMagickString(buffer,value_name,MagickPathExtent);
for(pos = buffer; *pos != 0 ; pos++)
if (*pos == ' ')
*pos = '-';
/* Glyphs */
if (strchr(value_data,'\\') != (char *) NULL)
- (void) CopyMagickString(buffer,value_data,MaxTextExtent);
+ (void) CopyMagickString(buffer,value_data,MagickPathExtent);
else
{
- (void) CopyMagickString(buffer,font_root,MaxTextExtent);
- (void) ConcatenateMagickString(buffer,value_data,MaxTextExtent);
+ (void) CopyMagickString(buffer,font_root,MagickPathExtent);
+ (void) ConcatenateMagickString(buffer,value_data,MagickPathExtent);
}
LocaleLower(buffer);
type_info->family=ConstantString(buffer);
list_entries++;
- status=AddValueToSplayTree(type_list,ConstantString(type_info->name),
- type_info);
+ status=AddValueToSplayTree(type_cache,type_info->name,type_info);
if (status == MagickFalse)
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","'%s'",type_info->name);
+ ResourceLimitError,"MemoryAllocationFailed","`%s'",type_info->name);
}
}
RegCloseKey ( reg_key );
message=GetExceptionMessage(errno);
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","'%s'",message);
+ ResourceLimitError,"MemoryAllocationFailed","`%s'",message);
message=DestroyString(message);
return(NULL);
}
q=bitmap_bits;
if (bitmap.bmBits == NULL)
bitmap.bmBits=bitmap_bits;
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) SetImageColorspace(image,sRGBColorspace,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
message=GetExceptionMessage(errno);
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","'%s'",message);
+ ResourceLimitError,"MemoryAllocationFailed","`%s'",message);
message=DestroyString(message);
}
GlobalUnlock((HGLOBAL) bitmap_bitsH);