gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog backend/render_handler.h backen...


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog backend/render_handler.h backen...
Date: Mon, 16 Oct 2006 17:28:21 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   06/10/16 17:28:21

Modified files:
        .              : ChangeLog 
        backend        : render_handler.h render_handler_agg.cpp 

Log message:
        Added get_pixel() function

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1245&r2=1.1246
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler.h?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.23&r2=1.24

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.1245
retrieving revision 1.1246
diff -u -b -r1.1245 -r1.1246
--- ChangeLog   16 Oct 2006 17:13:01 -0000      1.1245
+++ ChangeLog   16 Oct 2006 17:28:21 -0000      1.1246
@@ -21,6 +21,8 @@
 2006-10-16 Udo Giacomozzi <address@hidden>
 
        * gui/gui.h, gui/gui.cpp: Added want_redraw() function
+       * backend/render_handler.h, backend/render_handler_agg.cpp: 
+       Added get_pixel() function
 
 2006-10-16 Hannes Mayr <address@hidden>
 

Index: backend/render_handler.h
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- backend/render_handler.h    13 Oct 2006 11:04:39 -0000      1.13
+++ backend/render_handler.h    16 Oct 2006 17:28:21 -0000      1.14
@@ -35,7 +35,7 @@
 // 
 //
 
-/* $Id: render_handler.h,v 1.13 2006/10/13 11:04:39 strk Exp $ */
+/* $Id: render_handler.h,v 1.14 2006/10/16 17:28:21 udog Exp $ */
 
 #ifndef RENDER_HANDLER_H
 #define RENDER_HANDLER_H
@@ -400,6 +400,19 @@
   virtual bool allow_glyph_textures() = 0;
     
     
+  /// This function returns the color at any position in the stage. It is used
+  /// for automatic testing only, it should not be used for anything else!
+  /// world_x and world_y are world coordinates (twips) and the color of the
+  /// nearest pixel ist returned.
+  virtual void get_pixel(rgba& /*color_return*/, float /*world_x*/, 
+    float /*world_y*/) {
+    
+    log_msg("get_pixel() not implemented for this renderer");
+    assert(0);    
+    
+  }
+    
+    
 protected:
 
   // Cached fill style list with just one entry used for font rendering

Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- backend/render_handler_agg.cpp      15 Oct 2006 22:40:57 -0000      1.23
+++ backend/render_handler_agg.cpp      16 Oct 2006 17:28:21 -0000      1.24
@@ -34,7 +34,7 @@
 // forward this exception.
  
 
-/* $Id: render_handler_agg.cpp,v 1.23 2006/10/15 22:40:57 nihilus Exp $ */
+/* $Id: render_handler_agg.cpp,v 1.24 2006/10/16 17:28:21 udog Exp $ */
 
 // Original version by Udo Giacomozzi and Hannes Mayr, 
 // INDUNET GmbH (www.indunet.it)
@@ -1308,6 +1308,20 @@
   
   }
   
+  void get_pixel(rgba& color_return, float world_x, float world_y) {
+    int x, y;
+    
+    world_to_pixel(&x, &y, world_x, world_y);
+
+    agg::rgba8 color = m_pixf->pixel(x, y);    
+    
+    color_return.m_r = color.r;
+    color_return.m_g = color.g;
+    color_return.m_b = color.b;
+    color_return.m_a = color.a;
+    
+  }
+  
 private:  // private methods  
 
   /// Returns the cache manager instance of the given character definition.




reply via email to

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