skins/AknSkins/sdcsrc/SDCMBMOutput.cpp
changeset 64 ecb300a325e8
parent 50 c6286dcf6040
child 107 9f95a5546443
equal deleted inserted replaced
60:8c5e74913800 64:ecb300a325e8
    42     FILE* file = fopen( aBmconvTxtFilename, "wt" );
    42     FILE* file = fopen( aBmconvTxtFilename, "wt" );
    43     if( !file ) throw CSDCException( ESDCFileOpenError, "Text output file for bmconv can not be opened" );
    43     if( !file ) throw CSDCException( ESDCFileOpenError, "Text output file for bmconv can not be opened" );
    44 
    44 
    45     if( aData->IsScalable() )
    45     if( aData->IsScalable() )
    46         {
    46         {
    47         fprintf( file, "/E\n" );
    47         fprintf( file, "-E\n" );
    48         }
    48         }
    49     else
    49     else
    50         {
    50         {
    51         fprintf( file, "%s.mbm\n", aBaseName );
    51         fprintf( file, "%s.mbm\n", aBaseName );
    52         }
    52         }
    61 
    61 
    62         if( aData->IsScalable() )
    62         if( aData->IsScalable() )
    63             {
    63             {
    64             switch( entry->iColorDepth )
    64             switch( entry->iColorDepth )
    65                 {
    65                 {
    66                 case ESDCColorDepth1: fprintf( file, "/1" ); break;
    66                 case ESDCColorDepth1:   fprintf( file, "-1"   ); break;
    67                 case ESDCColorDepth2: fprintf( file, "/2" ); break;
    67                 case ESDCColorDepth2:   fprintf( file, "-2"   ); break;
    68                 case ESDCColorDepth4: fprintf( file, "/4" ); break;
    68                 case ESDCColorDepth4:   fprintf( file, "-4"   ); break;
    69                 case ESDCColorDepth8: fprintf( file, "/8" ); break;
    69                 case ESDCColorDepth8:   fprintf( file, "-8"   ); break;
    70                 case ESDCColorDepthC4: fprintf( file, "/c4" ); break;
    70                 case ESDCColorDepthC4:  fprintf( file, "-c4"  ); break;
    71                 case ESDCColorDepthC8: fprintf( file, "/c8" ); break;
    71                 case ESDCColorDepthC8:  fprintf( file, "-c8"  ); break;
    72                 case ESDCColorDepthC12: fprintf( file, "/c12" ); break;
    72                 case ESDCColorDepthC12: fprintf( file, "-c12" ); break;
    73                 case ESDCColorDepthC16: fprintf( file, "/c16" ); break;
    73                 case ESDCColorDepthC16: fprintf( file, "-c16" ); break;
    74                 case ESDCColorDepthC24: fprintf( file, "/c24" ); break;
    74                 case ESDCColorDepthC24: fprintf( file, "-c24" ); break;
    75                 case ESDCColorDepthC32: fprintf( file, "/c32" ); break;
    75                 case ESDCColorDepthC32: fprintf( file, "-c32" ); break;
    76                 default:
    76                 default:
    77                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
    77                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
    78                 }
    78                 }
    79             switch( entry->iMaskColorDepth )
    79             switch( entry->iMaskColorDepth )
    80                 {
    80                 {
    87                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
    87                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
    88                 }
    88                 }
    89             fprintf( file, " " );
    89             fprintf( file, " " );
    90             if ( entry->iSvgAnim )
    90             if ( entry->iSvgAnim )
    91                 {
    91                 {
    92                  fprintf( file, "/A " );
    92                 fprintf( file, "-A " );
    93                 }
    93                 }
    94             char pathBuf[512];
    94             char pathBuf[512];
    95             gInput.ConvertToAscii( pathBuf, entry->iSourcePath );
    95             gInput.ConvertToAscii( pathBuf, entry->iSourcePath );
    96             char buf[512];
    96             char buf[512];
    97             gInput.ConvertToAscii( buf, entry->iSourceFilename );
    97             gInput.ConvertToAscii( buf, entry->iSourceFilename );
    99             }
    99             }
   100         else
   100         else
   101             {
   101             {
   102             switch( entry->iColorDepth )
   102             switch( entry->iColorDepth )
   103                 {
   103                 {
   104                 case ESDCColorDepth1: fprintf( file, "/1" ); break;
   104                 case ESDCColorDepth1:   fprintf( file, "-1"   ); break;
   105                 case ESDCColorDepth2: fprintf( file, "/2" ); break;
   105                 case ESDCColorDepth2:   fprintf( file, "-2"   ); break;
   106                 case ESDCColorDepth4: fprintf( file, "/4" ); break;
   106                 case ESDCColorDepth4:   fprintf( file, "-4"   ); break;
   107                 case ESDCColorDepth8: fprintf( file, "/8" ); break;
   107                 case ESDCColorDepth8:   fprintf( file, "-8"   ); break;
   108                 case ESDCColorDepthC4: fprintf( file, "/c4" ); break;
   108                 case ESDCColorDepthC4:  fprintf( file, "-c4"  ); break;
   109                 case ESDCColorDepthC8: fprintf( file, "/c8" ); break;
   109                 case ESDCColorDepthC8:  fprintf( file, "-c8"  ); break;
   110                 case ESDCColorDepthC12: fprintf( file, "/c12" ); break;
   110                 case ESDCColorDepthC12: fprintf( file, "-c12" ); break;
   111                 case ESDCColorDepthC16: fprintf( file, "/c16" ); break;
   111                 case ESDCColorDepthC16: fprintf( file, "-c16" ); break;
   112                 case ESDCColorDepthC24: fprintf( file, "/c24" ); break;
   112                 case ESDCColorDepthC24: fprintf( file, "-c24" ); break;
   113                 case ESDCColorDepthC32: fprintf( file, "/c32" ); break;
   113                 case ESDCColorDepthC32: fprintf( file, "-c32" ); break;
   114                 default:
   114                 default:
   115                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
   115                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
   116                 }
   116                 }
   117             char pathBuf[512];
   117             char pathBuf[512];
   118             gInput.ConvertToAscii( pathBuf, entry->iSourcePath );
   118             gInput.ConvertToAscii( pathBuf, entry->iSourcePath );
   121             fprintf( file, "%s%s\n", pathBuf, buf );
   121             fprintf( file, "%s%s\n", pathBuf, buf );
   122 
   122 
   123             switch( entry->iMaskColorDepth )
   123             switch( entry->iMaskColorDepth )
   124                 {
   124                 {
   125                 case ESDCColorDepthNone: continue;
   125                 case ESDCColorDepthNone: continue;
   126                 case ESDCColorDepth1: fprintf( file, "/1" ); break;
   126                 case ESDCColorDepth1: fprintf( file, "-1" ); break;
   127                 case ESDCColorDepth2: fprintf( file, "/2" ); break;
   127                 case ESDCColorDepth2: fprintf( file, "-2" ); break;
   128                 case ESDCColorDepth4: fprintf( file, "/4" ); break;
   128                 case ESDCColorDepth4: fprintf( file, "-4" ); break;
   129                 case ESDCColorDepth8: fprintf( file, "/8" ); break;
   129                 case ESDCColorDepth8: fprintf( file, "-8" ); break;
   130                 default:
   130                 default:
   131                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
   131                     throw CSDCException( ESDCUnknownError, "Unknown color depth value used internally" );
   132                 }
   132                 }
   133             gInput.ConvertToAscii( pathBuf, entry->iSourcePath );
   133             gInput.ConvertToAscii( pathBuf, entry->iSourcePath );
   134             gInput.ConvertToAscii( buf, entry->iMaskSourceFilename );
   134             gInput.ConvertToAscii( buf, entry->iMaskSourceFilename );