當前位置: 首頁>>代碼示例>>C++>>正文


C++ AcquireString函數代碼示例

本文整理匯總了C++中AcquireString函數的典型用法代碼示例。如果您正苦於以下問題:C++ AcquireString函數的具體用法?C++ AcquireString怎麽用?C++ AcquireString使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AcquireString函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GetMontageInfo

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   G e t M o n t a g e I n f o                                               %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  GetMontageInfo() initializes montage_info to default values.
%
%  The format of the GetMontageInfo method is:
%
%      void GetMontageInfo(const ImageInfo *image_info,
%        MontageInfo *montage_info)
%
%  A description of each parameter follows:
%
%    o image_info: a structure of type ImageInfo.
%
%    o montage_info: Specifies a pointer to a MontageInfo structure.
%
*/
MagickExport void GetMontageInfo(const ImageInfo *image_info,
  MontageInfo *montage_info)
{
  assert(image_info != (const ImageInfo *) NULL);
  assert(image_info->signature == MagickCoreSignature);
  if (image_info->debug != MagickFalse)
    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
      image_info->filename);
  assert(montage_info != (MontageInfo *) NULL);
  (void) ResetMagickMemory(montage_info,0,sizeof(*montage_info));
  (void) CopyMagickString(montage_info->filename,image_info->filename,
    MagickPathExtent);
  montage_info->geometry=AcquireString(DefaultTileGeometry);
  if (image_info->font != (char *) NULL)
    montage_info->font=AcquireString(image_info->font);
  montage_info->gravity=CenterGravity;
  montage_info->pointsize=image_info->pointsize;
  montage_info->fill.alpha=OpaqueAlpha;
  montage_info->stroke.alpha=(Quantum) TransparentAlpha;
  montage_info->matte_color=image_info->matte_color;
  montage_info->background_color=image_info->background_color;
  montage_info->border_color=image_info->border_color;
  montage_info->debug=IsEventLogging();
  montage_info->signature=MagickCoreSignature;
}
開發者ID:vcgato29,項目名稱:ImageMagick,代碼行數:50,代碼來源:montage.c

示例2: getHandle

/*
 * Class:     magick_ImageInfo
 * Method:    setImageOption
 * Signature: (Ljava/lang/String;Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_magick_ImageInfo_setImageOption
    (JNIEnv *env, jobject self, jstring option, jstring value)
{                                                                             
    ImageInfo *info = NULL;
    const char *cstr1 = NULL;
    const char *cstr2 = NULL;
                                                                              
    info = (ImageInfo *) getHandle(env, self, "imageInfoHandle", NULL);             
    if (info == NULL) {                                                       
        throwMagickException(env, "Unable to retrieve handle");               
        return;                                                               
    }                                                                         
                                                                              
    cstr1 = (*env)->GetStringUTFChars(env, option, 0);                          
    if (cstr1 == NULL) {                                                       
        throwMagickException(env, "Unable to retrieve Java string chars");    
        return;                                                               
    }                        

    cstr2 = (*env)->GetStringUTFChars(env, value, 0);                          
    if (cstr2 == NULL) {                                                       
        throwMagickException(env, "Unable to retrieve Java string chars");    
        return;                                                               
    }                        
             
    SetImageOption(info, (char *)AcquireString(cstr1), (char *)AcquireString(cstr2));
    
    (*env)->ReleaseStringUTFChars(env, option, cstr1);
    (*env)->ReleaseStringUTFChars(env, value, cstr2);                          
}
開發者ID:VRDate,項目名稱:jmagick,代碼行數:35,代碼來源:magick_ImageInfo.c

示例3: RegisterFAXImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r F A X I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterFAXImage() adds attributes for the FAX image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterFAXImage method is:
%
%      RegisterFAXImage(void)
%
*/
ModuleExport void RegisterFAXImage(void)
{
    MagickInfo
    *entry;

    static const char
    *Note=
    {
        "See TIFF format.  Note that FAX machines use non-square pixels which\n"
        "are 1.5 times wider than they are tall but computer displays use\n"
        "square pixels. FAX images may appear to be narrow unless they are\n"
        "explicitly resized using a resize specification of \"150x100%\"."
    };

    entry=SetMagickInfo("FAX");
    entry->decoder=(DecoderHandler *) ReadFAXImage;
    entry->encoder=(EncoderHandler *) WriteFAXImage;
    entry->magick=(MagickHandler *) IsFAX;
    entry->description=AcquireString("Group 3 FAX");
    entry->note=AcquireString(Note);
    entry->module=AcquireString("FAX");
    (void) RegisterMagickInfo(entry);
    entry=SetMagickInfo("G3");
    entry->decoder=(DecoderHandler *) ReadFAXImage;
    entry->encoder=(EncoderHandler *) WriteFAXImage;
    entry->magick=(MagickHandler *) IsFAX;
    entry->adjoin=MagickFalse;
    entry->description=AcquireString("Group 3 FAX");
    entry->module=AcquireString("FAX");
    (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard_linux314,代碼行數:54,代碼來源:fax.c

示例4: RegisterSTEGANOImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r S T E G A N O I m a g e                                   %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterSTEGANOImage() adds attributes for the STEGANO image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterSTEGANOImage method is:
%
%      RegisterSTEGANOImage(void)
%
*/
ModuleExport void RegisterSTEGANOImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("STEGANO");
  entry->decoder=(DecoderHandler *) ReadSTEGANOImage;
  entry->description=AcquireString("Steganographic image");
  entry->module=AcquireString("STEGANO");
  (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard,代碼行數:34,代碼來源:stegano.c

示例5: RegisterCIPImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r C I P I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterCIPImage() adds attributes for the CIP IP phone image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterCIPImage method is:
%
%      RegisterCIPImage(void)
%
*/
ModuleExport void RegisterCIPImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("CIP");
  entry->encoder=(EncoderHandler *) WriteCIPImage;
  entry->adjoin=MagickFalse;
  entry->description=AcquireString("Cisco IP phone image format");
  entry->module=AcquireString("CIP");
  (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard,代碼行數:35,代碼來源:cip.c

示例6: RegisterTILEImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r T I L E I m a g e                                         %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterTILEImage() adds attributes for the TILE image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterTILEImage method is:
%
%      RegisterTILEImage(void)
%
*/
ModuleExport void RegisterTILEImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("TILE");
  entry->decoder=(DecoderHandler *) ReadTILEImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Tile image with a texture");
  entry->module=AcquireString("TILE");
  (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard,代碼行數:36,代碼來源:tile.c

示例7: RegisterMVGImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r M V G I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterMVGImage() adds attributes for the MVG image format
%  to the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterMVGImage method is:
%
%      RegisterMVGImage(void)
%
*/
ModuleExport void RegisterMVGImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("MVG");
  entry->decoder=(DecoderHandler *) ReadMVGImage;
  entry->encoder=(EncoderHandler *) WriteMVGImage;
  entry->magick=(MagickHandler *) IsMVG;
  entry->adjoin=MagickFalse;
  entry->seekable_stream=MagickTrue;
  entry->description=AcquireString("Magick Vector Graphics");
  entry->module=AcquireString("MVG");
  (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard,代碼行數:38,代碼來源:mvg.c

示例8: RegisterPLASMAImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r P L A S M A I m a g e                                     %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterPLASMAImage() adds attributes for the Plasma image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterPLASMAImage method is:
%
%      RegisterPLASMAImage(void)
%
*/
ModuleExport void RegisterPLASMAImage(void)
{
    MagickInfo
    *entry;

    entry=SetMagickInfo("PLASMA");
    entry->decoder=(DecoderHandler *) ReadPlasmaImage;
    entry->adjoin=MagickFalse;
    entry->description=AcquireString("Plasma fractal image");
    entry->module=AcquireString("PLASMA");
    (void) RegisterMagickInfo(entry);
    entry=SetMagickInfo("FRACTAL");
    entry->decoder=(DecoderHandler *) ReadPlasmaImage;
    entry->adjoin=MagickFalse;
    entry->description=AcquireString("Plasma fractal image");
    entry->module=AcquireString("PLASMA");
    (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard_linux314,代碼行數:41,代碼來源:plasma.c

示例9: setHandleAttribute

/*
 * Set a attribute in a generic handle to string.
 *
 * Input:
 *   env        Java VM environment
 *   attribVar  points to a C string so as to set the value
 *   jstr       Java string for which to set the attrib
 *
 * Output:
 *   attribVar  points to a new C string with content from jstr
 */
void setHandleAttribute(JNIEnv *env, char **attribVar, jstring jstr)
{
    const char *cstr = NULL;
    if (*attribVar != NULL) {
//	RelinquishMagickMemory((void**)attribVar);
    }
    cstr = (*env)->GetStringUTFChars(env, jstr, 0);
    *attribVar = (char *) AcquireString(cstr);
    (*env)->ReleaseStringUTFChars(env, jstr, cstr);
}
開發者ID:271845221,項目名稱:Android-ImageMagick,代碼行數:21,代碼來源:jmagick.c

示例10: ThrowException

MagickExport void ThrowException(ExceptionInfo *exception,
  const ExceptionType severity,const char *reason,const char *description)
{
  assert(exception != (ExceptionInfo *) NULL);
  assert(exception->signature == MagickSignature);
  exception->severity=(ExceptionType) severity;
  MagickFreeMemory(exception->reason);
  if (reason)
    exception->reason=
      AcquireString(GetLocaleExceptionMessage(severity,reason));
  MagickFreeMemory(exception->description);
  if (description)
    exception->description=
      AcquireString(GetLocaleExceptionMessage(severity,description));
  exception->error_number=errno;
  MagickFreeMemory(exception->module);
  MagickFreeMemory(exception->function);
  exception->line=0UL;
  exception->signature=0UL;
  return;
}
開發者ID:hank2015,項目名稱:testCMS,代碼行數:21,代碼來源:error.c

示例11: RegisterMPEGImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r M P E G I m a g e                                         %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterMPEGImage() adds attributes for the MPEG image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterMPEGImage method is:
%
%      RegisterMPEGImage(void)
%
*/
ModuleExport void RegisterMPEGImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("MPEG");
  entry->decoder=(DecoderHandler *) ReadMPEGImage;
  entry->encoder=(EncoderHandler *) WriteMPEGImage;
  entry->magick=(MagickHandler *) IsMPEG;
  entry->blob_support=MagickFalse;
  entry->description=AcquireString("MPEG Video Stream");
  entry->module=AcquireString("MPEG");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("MPG");
  entry->decoder=(DecoderHandler *) ReadMPEGImage;
  entry->encoder=(EncoderHandler *) WriteMPEGImage;
  entry->magick=(MagickHandler *) IsMPEG;
  entry->blob_support=MagickFalse;
  entry->description=AcquireString("MPEG Video Stream");
  entry->module=AcquireString("MPEG");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("M2V");
  entry->decoder=(DecoderHandler *) ReadMPEGImage;
  entry->encoder=(EncoderHandler *) WriteMPEGImage;
  entry->magick=(MagickHandler *) IsMPEG;
  entry->blob_support=MagickFalse;
  entry->description=AcquireString("MPEG Video Stream");
  entry->module=AcquireString("MPEG");
  (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard,代碼行數:53,代碼來源:mpeg.c

示例12: RegisterRGBImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r R G B I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterRGBImage() adds attributes for the RGB image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterRGBImage method is:
%
%      RegisterRGBImage(void)
%
*/
ModuleExport void RegisterRGBImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("RGB");
  entry->decoder=(DecoderHandler *) ReadRGBImage;
  entry->encoder=(EncoderHandler *) WriteRGBImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Raw red, green, and blue samples");
  entry->module=AcquireString("RGB");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("RGBA");
  entry->decoder=(DecoderHandler *) ReadRGBImage;
  entry->encoder=(EncoderHandler *) WriteRGBImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Raw red, green, blue, and alpha samples");
  entry->module=AcquireString("RGB");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("RGBO");
  entry->decoder=(DecoderHandler *) ReadRGBImage;
  entry->encoder=(EncoderHandler *) WriteRGBImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Raw red, green, blue, and opacity samples");
  entry->module=AcquireString("RGB");
  (void) RegisterMagickInfo(entry);
}
開發者ID:miettal,項目名稱:armadillo420_standard,代碼行數:53,代碼來源:rgb.c

示例13: ThrowLoggedException

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   T h r o w L o g g e d E x c e p t i o n                                   %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  ThrowLoggedException() throws an exception with the specified severity code,
%  reason, optional description, source filename, function name, and line
%  number. If logging is enabled, the exception is also logged.
%
%  The format of the ThrowLoggedException method is:
%
%      void ThrowLoggedException(ExceptionInfo *exception,
%        const ExceptionType severity,const char *reason,
%        const char *description,const char *module,
%        const char *function,const unsigned long line
%
%  A description of each parameter follows:
%
%    o exception: The exception.
%
%    o severity: The severity of the exception.
%
%    o reason: The reason of the exception.
%
%    o description: The exception description.
%
%    o filename: The source module filename.
%
%    o function: The function name.
%
%    o line: The line number of the source module.
%
%
*/
MagickExport void ThrowLoggedException(ExceptionInfo *exception,
  const ExceptionType severity,const char *reason,const char *description,
  const char *module,const char *function,const unsigned long line)
{
  assert(exception != (ExceptionInfo *) NULL);
  assert(exception->signature == MagickSignature);
  exception->severity=(ExceptionType) severity;
  MagickFreeMemory(exception->reason);
  if (reason)
    exception->reason=
      AcquireString(GetLocaleExceptionMessage(severity,reason));
  MagickFreeMemory(exception->description);
  if (description)
    exception->description=
      AcquireString(GetLocaleExceptionMessage(severity,description));
  exception->error_number=errno;
  MagickFreeMemory(exception->module);
  if (module)
    exception->module=AcquireString(module);
  MagickFreeMemory(exception->function);
  if (function)
    exception->function=AcquireString(function);
  exception->line=line;
  if (exception->reason)
    {
      if (exception->description)
        (void) LogMagickEvent(severity,module,function,line,"%.1024s (%.1024s)",
                              exception->reason,exception->description );
      else
        (void) LogMagickEvent(severity,module,function,line,"%.1024s",
                              exception->reason);
    }
  else
    {
      (void) LogMagickEvent(severity,module,function,line,
                            "exception contains no reason!");
    }
  return;
}
開發者ID:hank2015,項目名稱:testCMS,代碼行數:79,代碼來源:error.c

示例14: CopyException

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%  C o p y E x c e p t i o n                                                  %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  CopyException() copies exception data from one ExceptionInfo structure
%  to another.
%
%  The format of the CopyException method is:
%
%      void CopyException(ExceptionInfo *copy, const ExceptionInfo *original)
%
%  A description of each parameter follows:
%
%    o copy: The exception to copy to.
%
%    o original: The exception to copy from.
%
*/
MagickExport void CopyException(ExceptionInfo *copy, const ExceptionInfo *original)
{
  assert(copy != (ExceptionInfo *) NULL);
  assert(copy->signature == MagickSignature);
  assert(original != (ExceptionInfo *) NULL);
  assert(original->signature == MagickSignature);
  copy->severity=original->severity;
  MagickFreeMemory(copy->reason);
  if (original->reason)
    copy->reason=AcquireString(original->reason);
  MagickFreeMemory(copy->description);
  if (original->description)
    copy->description=AcquireString(original->description);
  copy->error_number=original->error_number;
  MagickFreeMemory(copy->module);
  if (original->module)
    copy->module=AcquireString(original->module);
  MagickFreeMemory(copy->function);
  if (original->function)
    copy->function=AcquireString(original->function);
  copy->line=original->line;
  return;
}
開發者ID:hank2015,項目名稱:testCMS,代碼行數:48,代碼來源:error.c

示例15: HHVM_METHOD

static bool HHVM_METHOD(ImagickDraw, setResolution,
    double x, double y) {
  auto wand = getDrawingWandResource(Object{this_});
  std::ostringstream density;
  density << x << "x" << y;

  auto drawInfo = PeekDrawingWand(wand->getWand());
  drawInfo->density = AcquireString(density.str().c_str());
  auto drawWand = DrawAllocateWand(drawInfo, nullptr);
  if (drawWand == nullptr) {
    IMAGICKDRAW_THROW("Failed to allocate new DrawingWand structure");
  }
  setWandResource(s_ImagickDraw, Object{this_}, drawWand);
  return true;
}
開發者ID:facebook,項目名稱:hhvm,代碼行數:15,代碼來源:imagickdraw.cpp


注:本文中的AcquireString函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。