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_ogl.cpp


From: Bastiaan Jacques
Subject: [Gnash-commit] gnash ChangeLog backend/render_handler_ogl.cpp
Date: Wed, 12 Sep 2007 17:13:30 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     07/09/12 17:13:30

Modified files:
        .              : ChangeLog 
        backend        : render_handler_ogl.cpp 

Log message:
        Use the average of X and Y scaling
                to determine the proper line thickness.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4296&r2=1.4297
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_ogl.cpp?cvsroot=gnash&r1=1.82&r2=1.83

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4296
retrieving revision 1.4297
diff -u -b -r1.4296 -r1.4297
--- ChangeLog   12 Sep 2007 16:47:34 -0000      1.4296
+++ ChangeLog   12 Sep 2007 17:13:29 -0000      1.4297
@@ -1,3 +1,8 @@
+2007-09-12 Bastiaan Jacques <address@hidden>
+
+       * backend/render_handler_ogl.cpp: Use the average of X and Y scaling
+       to determine the proper line thickness.
+
 2007-09-12 Sandro Santilli <address@hidden>
 
        * server/sprite_instance.cpp (sprite_create_text_field): check for

Index: backend/render_handler_ogl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_ogl.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- backend/render_handler_ogl.cpp      12 Sep 2007 14:51:10 -0000      1.82
+++ backend/render_handler_ogl.cpp      12 Sep 2007 17:13:29 -0000      1.83
@@ -5,7 +5,7 @@
 
 // A render_handler that uses SDL & OpenGL
 
-/* $Id: render_handler_ogl.cpp,v 1.82 2007/09/12 14:51:10 bjacques Exp $ */
+/* $Id: render_handler_ogl.cpp,v 1.83 2007/09/12 17:13:29 bjacques Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -105,6 +105,9 @@
        
     gnash::matrix      m_current_matrix;
     gnash::cxform      m_current_cxform;
+
+    gnash::point _scale;
+
     void set_antialiased(bool enable) {
        m_enable_antialias = enable;
     }
@@ -567,6 +570,18 @@
 #endif // 0
        }
 
+    /// Sets the x/y scale for the movie
+    void set_scale(float xscale, float yscale)
+    {
+      _scale.set(xscale, yscale);
+    }
+
+    void get_scale(point& scale) 
+    {
+      scale = _scale;
+    }
+
+
     bool getPixel(rgba& color_out, int x, int y)
     {
        if (x < 0 || y < 0) {
@@ -698,8 +713,11 @@
                        // low-width lines well, even with anti-aliasing
                        // enabled
                        // But this is a start (20 TWIPS' width = 1 pixel's)
-                       glLineWidth(TWIPS_TO_PIXELS(norm_width));
-                       glPointSize(TWIPS_TO_PIXELS(norm_width));
+                       float resized_width = 
+                         norm_width * ( (_scale.m_x + _scale.m_y) / 2.0 );
+
+                       glLineWidth(TWIPS_TO_PIXELS(resized_width));
+                       glPointSize(TWIPS_TO_PIXELS(resized_width));
                }
        }
 




reply via email to

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