Compared files  

Left
C:\SDK\wxWidgets-2.6.2\contrib\src\animate\animate.cpp
Last modified2005-05-31 22:46:42.001 +0200
Size16.3 Kb (676 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
C:\SDK\wxWidgets-2.6.3\contrib\src\animate\animate.cpp
Last modified2006-01-24 14:43:36.001 +0100
Size16 Kb (666 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged25600
Inserted48
Deleted55
Ignored00
Changed15129



   Comparison Details  

3 skipped lines
4U4U// Author:      Julian Smart and Guillermo Rodriguez Garcia
5U5U// Modified by:
6U6U// Created:     13/8/99
7C// RCS-ID:      $Id: animate.cpp,v 1.11 2005/05/23 23:51:06 RD Exp $ 7C// RCS-ID:      $Id: animate.cpp,v 1.11.2.1 2006/01/23 07:19:35 vell Exp $
8U8U// Copyright:   (c) Julian Smart and Guillermo Rodriguez Garcia
9U9U// Licence:     wxWindows licence
10U10U///////////////////////////////////////////////////////////////////////////////
8 skipped lines
19U19U  #pragma hdrstop
20U20U#endif  //__BORLANDC__
21U21U 
  22A#include "wx/log.h"
22U23U#include "wx/wfstream.h"
23U24U#include "wx/image.h"
24U25U#include "wx/gifdecod.h"
25R#include "wx/log.h"  
26U26U#include "wx/dcmemory.h"
27R#include "wx/animate/animate.h"  
28U27U#include "wx/dc.h"
29U28U#include "wx/dcclient.h"
  29A#include "wx/animate/animate.h"
30U30U 
31U31U/*
32U32U * wxAnimationPlayer
70 skipped lines
103U103Ubool wxAnimationPlayer::Build()
104U104U{
105U105U    ClearCache();
106C    if (m_animation) 106C    if (!m_animation)
  107C        return false;
  108C 
  109C    int i, n;
  110C 
  111C    n = GetFrameCount();
  112C    for (i = 0; i < n; i++)
107U113U    {
108C        int n = GetFrameCount();  
109C        int i;  
110C        for (i = 0; i < n; i++)  
111C        {  
112C            wxImage* image = GetFrame(i); 114C        wxImage* image = GetFrame(i);
113C            if (image) 115C        if (image == NULL)
114C            {  
115C                // If the frame has transparency,  
116C                // set the colour so converting to a bitmap  
117C                // will create a mask  
118C                wxColour transparentColour;  
119C                if (GetTransparentColour(transparentColour))  
120C                    image->SetMaskColour(transparentColour.Red(), transparentColour.Green(), transparentColour.Blue()); 116C            return false;
121U117U 
  118C        // If the frame has transparency,
  119C        // set the colour so converting to a bitmap
  120C        // will create a mask
  121C        wxColour transparentColour;
  122C        if (GetTransparentColour(transparentColour))
  123C            image->SetMaskColour(transparentColour.Red(), transparentColour.Green(), transparentColour.Blue());
  124C 
122C                wxBitmap* bitmap = new wxBitmap(* image); 125C        wxBitmap* bitmap = new wxBitmap(*image);
123C                delete image; 126C        delete image;
124C                if (bitmap) 127C        if (bitmap == NULL)
  128C            return false;
  129C 
125C                    m_frames.Append(bitmap); 130C        m_frames.Append(bitmap);
126C                else  
127C                    return FALSE;  
128C            }  
129C            else  
130C                return FALSE;  
131C        }  
132C        return TRUE;  
133U131U    }
134C    else 132C 
135C        return FALSE; 133C    return true;
136U134U}
137U135U 
138U136U// Stop the animation
10 skipped lines
149U147U    dc.DrawBitmap(m_backingStore, m_position.x, m_position.y);
150U148U}
151U149U 
152R   
153U150Uint wxAnimationPlayer::GetFrameCount() const
154U151U{
155U152U    if (m_animation)
312 skipped lines
468U465U 
469U466U    int i = m_decoder->GetBackgroundColour();
470U467U    if (i == -1)
471C        return FALSE; 468C        return false;
472C    else  
473C    {  
474C        unsigned char* pal = m_decoder->GetPalette();  
475U469U 
  470C    const unsigned char *pal = m_decoder->GetPalette();
476C        if (pal) 471C    bool result = (pal != NULL);
477C        { 472C 
  473C    if (result)
478C            col = wxColour(pal[3*i + 0], pal[3*i + 1], pal[3*i + 2]); 474C        col = wxColour(pal[3*i + 0], pal[3*i + 1], pal[3*i + 2]);
479C            return TRUE; 475C 
480C        }  
481C        else  
482C            return FALSE; 476C    return result;
483C    }  
484U477U}
485U478U 
486U479Ubool wxGIFAnimation::GetTransparentColour(wxColour& col) const
2 skipped lines
489U482U 
490U483U    int i = m_decoder->GetTransparentColour();
491U484U    if (i == -1)
492C        return FALSE; 485C        return false;
493C    else  
494C    {  
495C        unsigned char* pal = m_decoder->GetPalette();  
496U486U 
  487C    const unsigned char *pal = m_decoder->GetPalette();
497C        if (pal) 488C    bool result = (pal != NULL);
498C        { 489C 
  490C    if (result)
499C            col = wxColour(pal[3*i + 0], pal[3*i + 1], pal[3*i + 2]); 491C        col = wxColour(pal[3*i + 0], pal[3*i + 1], pal[3*i + 2]);
500C            return TRUE; 492C 
501C        }  
502C        else  
503C            return FALSE; 493C    return result;
504C    }  
505U494U}
506U495U 
507U496Ubool wxGIFAnimation::IsValid() const
3 skipped lines
511U500U 
512U501Ubool wxGIFAnimation::LoadFile(const wxString& filename)
513U502U{
  503A    if (!wxFileExists(filename))
  504A        return false;
  505A 
  506A    bool result = true;
  507A 
514U508U    if (m_decoder)
  509A    {
515U510U        delete m_decoder;
516C    m_decoder = NULL; 511C        m_decoder = NULL;
  512C    }
517U513U 
518R    if (wxFileExists(filename))  
519U514U    {
520U515U        wxFileInputStream stream(filename);
521R        m_decoder = new wxGIFDecoder(& stream, TRUE);  
522U516U 
523C        if (m_decoder->ReadGIF() != wxGIF_OK) 517C        if (stream.GetLength() > 0)
524C        {  
525C            delete m_decoder;  
526C            m_decoder = NULL; 518C            m_decoder = new wxGIFDecoder(&stream, true);
527C            return FALSE;  
528C        }  
529U519U 
530C        if (!m_decoder->IsAnimation()) 520C        result = ((m_decoder != NULL) && (m_decoder->ReadGIF() == wxGIF_OK));
531C        { 521C        if (result)
532C            delete m_decoder; 522C            result = m_decoder->IsAnimation();
533C            m_decoder = NULL; 523C    }
534U524U 
535C            return FALSE; 525C    if (!result && (m_decoder != NULL))
536C        } 526C    {
537C        else 527C        delete m_decoder;
538C            return TRUE; 528C        m_decoder = NULL;
539U529U    }
540C    else 530C 
541C        return FALSE; 531C    return result;
542U532U}
543U533U 
544U534U/*
23 skipped lines
568U558U 
569U559U    m_animationPlayer.SetCustomBackgroundColour(GetBackgroundColour());
570U560U 
571C    // Want to give the impression of transparency by painting 561C    // give the impression of transparency by painting
572C    // the parent background 562C    // with the parent background
573U563U//    if (parent)
574U564U//        m_animationPlayer.UseParentBackground(TRUE);
575U565U    m_animationPlayer.SetWindow(this);
101 skipped lines

   Text comparison Options  

Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

UExample of unchanged line
CExample of modified line
AExample of added line
RExample of removed line
IExample of ignored line
Modified text
Added text
Removed text

This report has been generated by Ellié Computing Merge on 2006-09-07 16:23:21.001 +0200.
© 2005-2006 Ellié Computing http://www.elliecomputing.com. All rights reserved.