ImageMagickExportOptions Class Reference

#include <imgmgkft.h>

Inheritance diagram for ImageMagickExportOptions:

MaskedFilterExportOptions BitmapExportOptions OpParam CCObject SimpleCCObject List of all members.

Public Member Functions

 ImageMagickExportOptions (const FilterType FilterID, const StringBase *pFilterName, ResourceID FilterTypeID)
 Default constructor for a ImageMagickExportOptions object to provide ImageMagick export options.
 ImageMagickExportOptions ()
virtual BOOL GetSupportsImageMap ()
virtual BOOL RetrieveDefaults ()
 See BitmapExportOptions for interface details Notes: Gets GIF specific preferences.
virtual BOOL SetAsDefaults () const
 Provides additional implementation to set ImageMagick specific options as defaults See Also: BitmapExportOptions::SetAsDefaults().
virtual UINT32 GetFilterNameStrID ()
virtual UINT32GetConfigPtr (const TCHAR *FilterName) const
virtual UINT32 GetConfig () const
virtual void SetConfig (UINT32 value) const

Protected Attributes

String_256 FilterName
ResourceID m_FilterTypeID

Static Protected Attributes

static IMFilterStringToUINT32 * s_pHash = NULL

Detailed Description

Definition at line 138 of file imgmgkft.h.


Constructor & Destructor Documentation

ImageMagickExportOptions::ImageMagickExportOptions const FilterType  FilterID,
const StringBase pFilterName,
ResourceID  FilterTypeID
 

Default constructor for a ImageMagickExportOptions object to provide ImageMagick export options.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/10/96

Definition at line 169 of file imgmgkft.cpp.

00169                                                                                                                                     :
00170                         MaskedFilterExportOptions(_R(IDD_EXPORTBMPOPTS), FilterID, pFilterName)
00171 {
00172     FilterName = *pFilterName;
00173     m_FilterTypeID = FilterTypeID;
00174 
00175     // if we don't already have the static hash, generate one
00176     // We never delete this (harmless)
00177     if (!s_pHash)
00178     {
00179         s_pHash = new IMFilterStringToUINT32;
00180     }
00181 
00182     if (!s_pHash) // Not much we can do
00183         return;
00184 
00185     // Declare the preference if it hasn't been seen already
00186     if (!GetConfigPtr((const TCHAR *)(*pFilterName)))
00187     {
00188         // OK, it's not in the hash already, so we need to declare it
00189         (*s_pHash)[camStrdup((const TCHAR *)*pFilterName)]=0;
00190         UINT32 * pPref = GetConfigPtr((const TCHAR *)(*pFilterName));
00191         ERROR3IF(!pPref, "Config did not stick");
00192         if (pPref)
00193         {   
00194             if (Camelot.DeclareSection(_T("Filters"), 10))
00195             {
00196                 String_256 PrefName = *pFilterName;
00197                 String_256 Prefix(_T("ExportImageMagickFlags"));
00198                 Prefix+=PrefName;
00199                 Camelot.DeclarePref( NULL, Prefix, pPref, 0, 3 );
00200             }
00201         }
00202     }
00203 }

ImageMagickExportOptions::ImageMagickExportOptions  )  [inline]
 

Definition at line 144 of file imgmgkft.h.

00144 {};


Member Function Documentation

virtual UINT32 ImageMagickExportOptions::GetConfig  )  const [inline, virtual]
 

Definition at line 161 of file imgmgkft.h.

00162     {
00163         UINT32 * pConfig = GetConfigPtr(FilterName);
00164         return pConfig?(*pConfig):0;
00165     }

virtual UINT32* ImageMagickExportOptions::GetConfigPtr const TCHAR FilterName  )  const [inline, virtual]
 

Definition at line 153 of file imgmgkft.h.

00154     {
00155         if (!s_pHash)
00156             return NULL;
00157         IMFilterStringToUINT32::iterator i=s_pHash->find(FilterName);
00158         return (UINT32 *)((i==s_pHash->end())?NULL:&(i->second));
00159     }

virtual UINT32 ImageMagickExportOptions::GetFilterNameStrID  )  [inline, virtual]
 

Reimplemented from BitmapExportOptions.

Definition at line 151 of file imgmgkft.h.

00151 { return m_FilterTypeID;}

virtual BOOL ImageMagickExportOptions::GetSupportsImageMap  )  [inline, virtual]
 

Reimplemented from BitmapExportOptions.

Definition at line 146 of file imgmgkft.h.

00146 { return TRUE; }

BOOL ImageMagickExportOptions::RetrieveDefaults  )  [virtual]
 

See BitmapExportOptions for interface details Notes: Gets GIF specific preferences.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/10/96

Reimplemented from MaskedFilterExportOptions.

Definition at line 215 of file imgmgkft.cpp.

00216 {
00217     if (!MaskedFilterExportOptions::RetrieveDefaults())
00218         return FALSE;
00219 
00220     SetMakeInterlaced(GetConfig() & 1);
00221     return TRUE;
00222 }

BOOL ImageMagickExportOptions::SetAsDefaults  )  const [virtual]
 

Provides additional implementation to set ImageMagick specific options as defaults See Also: BitmapExportOptions::SetAsDefaults().

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/10/96

Reimplemented from MaskedFilterExportOptions.

Definition at line 234 of file imgmgkft.cpp.

00235 {
00236     if (!MaskedFilterExportOptions::SetAsDefaults())
00237         return FALSE;
00238 
00239     SetConfig( ( WantTransparent() ? 2 : 0 ) | (WantInterlaced() ? 1 : 0) );
00240 
00241     return TRUE;
00242 }

virtual void ImageMagickExportOptions::SetConfig UINT32  value  )  const [inline, virtual]
 

Definition at line 167 of file imgmgkft.h.

00168     {
00169         UINT32 * pConfig = GetConfigPtr(FilterName);
00170         if (pConfig)
00171             *pConfig = value;
00172     }


Member Data Documentation

String_256 ImageMagickExportOptions::FilterName [protected]
 

Definition at line 175 of file imgmgkft.h.

ResourceID ImageMagickExportOptions::m_FilterTypeID [protected]
 

Definition at line 176 of file imgmgkft.h.

IMFilterStringToUINT32 * ImageMagickExportOptions::s_pHash = NULL [static, protected]
 

Definition at line 178 of file imgmgkft.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:11 2007 for Camelot by  doxygen 1.4.4