gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/backend render_handler.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash/backend render_handler.h
Date: Tue, 17 Apr 2007 09:00:26 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/17 09:00:26

Modified files:
        backend        : render_handler.h 

Log message:
        just style

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler.h?cvsroot=gnash&r1=1.31&r2=1.32

Patches:
Index: render_handler.h
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- render_handler.h    17 Apr 2007 08:32:42 -0000      1.31
+++ render_handler.h    17 Apr 2007 09:00:26 -0000      1.32
@@ -17,7 +17,7 @@
 // 
 //
 
-/* $Id: render_handler.h,v 1.31 2007/04/17 08:32:42 udog Exp $ */
+/* $Id: render_handler.h,v 1.32 2007/04/17 09:00:26 strk Exp $ */
 
 #ifndef RENDER_HANDLER_H
 #define RENDER_HANDLER_H
@@ -198,6 +198,7 @@
 public:
   //Virtual dtor, removes compiler warning.
   virtual ~render_cache_manager(){}
+
   /// Clears the cache completely (necessary for runtime shapes / drawing API)
   virtual void clear() 
   {
@@ -259,34 +260,36 @@
        /// Returns the format the current renderer wants videoframes in.
        virtual int videoFrameFormat() = 0;
        
-       /** \brief Draws a video frame. 
-         *
-         * The frame has already been decoded and is available in the format
-         * specified by videoFrameFormat().      
-         *               
-         * @param baseframe The RGB or YUV video buffer frame.
-         *
-         * @param mat The matrix with world coordinates used to retrieve the x
-         *   and y coordinate of the video object. The scaling of the matrix 
only
-         *   refers to the Flash instance, *not* to the video inside that 
instance.
-         *   When a video object is placed on the stage and the loaded video is
-         *   smaller, then the matrix is still an "identity matrix". However, 
if
-         *   the video object is scaled via ActionScript, for example, then the
-         *   matrix will change. This means the renderer has to find the 
correct
-         *   scaling for the video inside the bounds.                          
          
-         *
-         * @param bounds The minX/minY fields of this rect are always zero. 
-         *   The width and height determine the size of the Flash video 
instance
-         *   on the stage (in TWIPS) prior to matrix transformations.         
-         */
+       /// Draws a video frame. 
+       //
+       /// The frame has already been decoded and is available in the format
+       /// specified by videoFrameFormat().      
+       ///               
+       /// @param baseframe The RGB or YUV video buffer frame.
+       ///
+       /// @param mat The matrix with world coordinates used to retrieve the x
+       ///   and y coordinate of the video object. The scaling of the matrix 
only
+       ///   refers to the Flash instance, *not* to the video inside that 
instance.
+       ///   When a video object is placed on the stage and the loaded video is
+       ///   smaller, then the matrix is still an "identity matrix". However, 
if
+       ///   the video object is scaled via ActionScript, for example, then the
+       ///   matrix will change. This means the renderer has to find the 
correct
+       ///   scaling for the video inside the bounds.                          
          
+       ///
+       /// @param bounds The minX/minY fields of this rect are always zero. 
+       ///   The width and height determine the size of the Flash video 
instance
+       ///   on the stage (in TWIPS) prior to matrix transformations.         
+       ///
        virtual void drawVideoFrame(image::image_base* frame, const matrix* 
mat, const rect* bounds) = 0;
 
-       /// Sets the update region (called prior to begin_display). The 
renderer 
+       /// Sets the update region (called prior to begin_display).
+       //
+       /// The renderer 
        /// might do clipping and leave the region outside these bounds 
unchanged,
        /// but he is allowed to change them if that makes sense. After 
rendering
        /// a frame the area outside the invalidated region can be undefined 
and 
        /// is not used. 
-       //
+       ///
        /// It is not required for all renderers.
        /// Parameters are world coordinates (TWIPS).
        ///
@@ -303,7 +306,8 @@
   /// Converts world coordinates to pixel coordinates
   virtual geometry::Range2d<int> world_to_pixel(const rect& worldbounds) = 0;
   
-  virtual geometry::Range2d<int> world_to_pixel(const 
geometry::Range2d<float>& worldbounds) {
+       virtual geometry::Range2d<int> world_to_pixel(const 
geometry::Range2d<float>& worldbounds)
+       {
        if ((worldbounds.isNull() || worldbounds.isWorld()))    
                return worldbounds;
 
@@ -386,7 +390,8 @@
        /// character instance.
        ///
        virtual void draw_shape_character(shape_character_def *def, 
-    character *inst) {
+               character *inst)
+       {
     
     // check if the character needs to be rendered at all
     rect cur_bounds;
@@ -394,7 +399,8 @@
     cur_bounds.expand_to_transformed_rect(inst->get_world_matrix(), 
                        def->get_bound());
                        
-               if (!bounds_in_clipping_area(cur_bounds)) {
+               if (!bounds_in_clipping_area(cur_bounds))
+               {
                  return; // no need to draw
                }
                
@@ -432,10 +438,13 @@
     return bounds_in_clipping_area(bounds.getRange());
   }
   
-  virtual bool bounds_in_clipping_area(const InvalidatedRanges& ranges) {
+       virtual bool bounds_in_clipping_area(const InvalidatedRanges& ranges)
+       {
        for (unsigned int rno=0; rno<ranges.size(); rno++) 
+               {
                if (bounds_in_clipping_area(ranges.getRange(rno)))
                        return true;
+               }
                        
        return false;
        }
@@ -469,10 +478,8 @@
   ///
   /// @param pixel_scale
   ///
-  virtual void draw_glyph(shape_character_def *def,
-    const matrix& mat,
-    rgba color,
-    float pixel_scale) = 0;
+       virtual void draw_glyph(shape_character_def *def, const matrix& mat,
+               rgba color, float pixel_scale) = 0;
     
   /// The render handler can choose if it wishes to use textured glyphs 
   /// (pre-computed bitmaps which are used for small text sizes) or if 
@@ -486,7 +493,8 @@
   /// world_x and world_y are world coordinates (twips) and the color of the
   /// nearest pixel is returned.
   virtual void get_pixel(rgba& /*color_return*/, float /*world_x*/, 
-    float /*world_y*/) {
+               float /*world_y*/)
+       {
     
     log_msg("get_pixel() not implemented for this renderer");
     assert(0);    
@@ -503,27 +511,28 @@
     
 protected:
 
-  // Cached fill style list with just one entry used for font rendering
+       /// Cached fill style list with just one entry used for font rendering
   std::vector<fill_style>      m_single_fill_styles;
   
-  // Dummy line styles list without entries (do not add anything!!)
+       /// Dummy line styles list without entries (do not add anything!!)
   std::vector<line_style>      m_dummy_line_styles;
   
-  // Dummy, neutral color transformation (do not change!!)
+       /// Dummy, neutral color transformation (do not change!!)
   cxform m_neutral_cxform;
   
-  // Sets m_single_fill_styles to one solid fill with the given color 
-  void need_single_fill_style(const rgba& color){
+       /// Sets m_single_fill_styles to one solid fill with the given color 
+       void need_single_fill_style(const rgba& color)
+       {
   
-    if (m_single_fill_styles.size() == 0) {  
+               if (m_single_fill_styles.size() == 0)
+               {       
       fill_style dummy;
-    
       m_single_fill_styles.push_back(dummy);
     }
     
     m_single_fill_styles[0].set_color(color);
   
-  } //need_single_fill_style
+       } 
 
 }; // class render_handler
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]