Show
Ignore:
Timestamp:
08/15/08 13:25:16 (5 months ago)
Author:
mbensi
Message:

merge with webkit revision 35774

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/BAL/WKAL/Skeletons/Graphics/BitmapImage.t

    r318 r437  
    101101    friend class GraphicsContext; 
    102102public: 
    103     /** 
    104      * BitmapImage constructor 
    105      * @param[in] : platform surface 
    106      * @param[in] : image Observer 
    107      * @code 
    108      * BitmapImage *bi = new BitmapImage(pSurf); 
    109      * @endcode 
    110      */ 
    111     BitmapImage(BalSurface*, ImageObserver* = 0); 
    112  
    113     /** 
    114      * BitmapImage constructor 
    115      * @param[in] : image Observer 
    116      * @code 
    117      *  BitmapImage *bi = new BitmapImage(); 
    118      * @endcode 
    119      */ 
    120     BitmapImage(ImageObserver* = 0); 
    121  
    122     /** 
    123      * ~BitmapImage destructor 
    124      * @code 
    125      * delete bi; 
    126      * @endcode 
     103 
     104    /** 
     105     *  create bitmap image 
     106     */ 
     107    static PassRefPtr<BitmapImage> create(NativeImagePtr nativeImage, ImageObserver* observer = 0); 
     108 
     109 
     110    /** 
     111     *  create bitmap image 
     112     */ 
     113    static PassRefPtr<BitmapImage> create(ImageObserver* observer = 0) 
     114 
     115    /** 
     116     * destructor 
    127117     */ 
    128118    ~BitmapImage(); 
    129      
     119 
    130120    /** 
    131121     * test if it's a bitmap image 
     
    145135     */ 
    146136    virtual IntSize size() const; 
     137 
     138 
     139    /** 
     140     * get currentFrameSize 
     141     */ 
     142    IntSize currentFrameSize() const; 
    147143 
    148144    /** 
     
    194190 
    195191protected: 
    196     /** 
    197      * draw 
    198      * @param[in] : graphics context 
    199      * @param[in] : destination rectangle 
    200      * @param[in] : source rectangle 
    201      * @param[in] : composite operator 
    202      * @code 
    203      * bi->draw(gc, dr, sr, op); 
    204      * @endcode 
    205      */ 
    206     virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator); 
     192 
     193    /** 
     194     *  BitmapImage constructor 
     195     */ 
     196    BitmapImage(NativeImagePtr, ImageObserver* = 0) 
     197    /** 
     198     * BitmapImage constructor 
     199     * @param[in] : image Observer 
     200     * @code 
     201     *  BitmapImage *bi = new BitmapImage(); 
     202     * @endcode 
     203     */ 
     204    BitmapImage(ImageObserver* = 0) 
    207205 
    208206    /** 
     
    213211     * @endcode 
    214212     */ 
    215     size_t currentFrame() const ; 
     213    size_t currentFrame() const  
    216214 
    217215    /** 
    218216     * get frame count 
    219      * @param[out] : frame count 
    220      * @code 
    221      * size_t c = bi->frameCount(); 
    222      * @endcode 
    223217     */ 
    224218    size_t frameCount(); 
     
    232226     * @endcode 
    233227     */ 
    234     NativeImagePtr frameAtIndex(size_t); 
    235  
    236     /** 
    237      * frame duration at index 
    238      * @param[in] : index 
    239      * @param[out] : duration 
    240      * @code 
    241      * float d = bi->frameDurationAtIndex(1); 
    242      * @endcode 
     228    NativeImagePtr frameAtIndex(size_t) 
     229 
     230    /** 
     231     * get frame duration at index 
    243232     */ 
    244233    float frameDurationAtIndex(size_t); 
     
    252241     * @endcode 
    253242     */ 
    254     bool frameHasAlphaAtIndex(size_t);  
    255  
    256     /** 
    257      * Decodes and caches a frame. Never accessed except internally. 
    258      * @param[in] : index 
    259      * @code 
    260      * bi->cacheFrame(1); 
    261      * @endcode 
    262      */ 
    263     void cacheFrame(size_t index); 
     243    bool frameHasAlphaAtIndex(size_t); 
    264244 
    265245    /** 
     
    270250     * @endcode 
    271251     */ 
    272     virtual void destroyDecodedData(bool incremental = false); 
    273  
    274     /** 
    275      * Whether or not size is available yet. 
    276      * @param[out] : status 
    277      * @code 
    278      * bool s = bi->isSizeAvailable(); 
    279      * @endcode 
     252    virtual void destroyDecodedData(bool incremental = false) 
     253  
     254    // Whether or not size is available yet. 
     255    /** 
     256     * test if the bitmap image is available 
    280257     */ 
    281258    bool isSizeAvailable(); 
     
    292269    /** 
    293270     * start animation 
    294      * @code 
    295      * bi->startAnimation(); 
    296      * @endcode 
    297271     */ 
    298272    virtual void startAnimation(); 
     
    306280     */ 
    307281    void advanceAnimation(Timer<BitmapImage>*); 
    308      
    309     /** 
    310      * init platform data  
    311      * @code 
    312      * bi->initPlatformData(); 
    313      * @endcode 
     282   
     283    // Handle platform-specific data 
     284    /** 
     285     * init platform data 
    314286     */ 
    315287    void initPlatformData(); 
     
    318290     * invalidate platform data  
    319291     * @code 
    320       
    321 * bi->invalidatePlatformData(); 
     292     * bi->invalidatePlatformData(); 
    322293     * @endcode 
    323294     */ 
    324295    void invalidatePlatformData(); 
    325      
     296   
     297    // Checks to see if the image is a 1x1 solid color.  We optimize these images and just do a fill rect instead. 
    326298    /** 
    327299     * Checks to see if the image is a 1x1 solid color.  We optimize these images and just do a fill rect instead. 
    328      * @code 
    329      * bi->checkForSolidColor(); 
    330      * @endcode 
    331300     */ 
    332301    void checkForSolidColor(); 
     
    340309     */ 
    341310    virtual bool mayFillWithSolidColor() const ; 
    342  
    343311    /** 
    344312     * get solid color 
    345      * @param[out] : color 
    346      * @code 
    347      * Color c = bi->solidColor(); 
    348      * @endcode 
    349      */ 
    350     virtual Color solidColor() const ; 
     313     */ 
     314    virtual Color solidColor() const; 
    351315     
    352316    ImageSource m_source; 
     
    380344 
    381345#endif 
    382  
    383  
    384  
    385