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 14:51:11 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     07/09/12 14:51:11

Modified files:
        .              : ChangeLog 
        backend        : render_handler_ogl.cpp 

Log message:
        Make sure we don't use a line width of 0 by normalizing.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4292&r2=1.4293
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_ogl.cpp?cvsroot=gnash&r1=1.81&r2=1.82

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4292
retrieving revision 1.4293
diff -u -b -r1.4292 -r1.4293
--- ChangeLog   12 Sep 2007 13:48:24 -0000      1.4292
+++ ChangeLog   12 Sep 2007 14:51:10 -0000      1.4293
@@ -1,3 +1,8 @@
+2007-09-12 Bastiaan Jacques <address@hidden>
+
+       * backend/render_handler_ogl.cpp: Make sure we don't try to use
+       a line width of 0: normalize the width.
+
 2007-09-12 Sandro Santilli <address@hidden>
 
        * server/as_environment.cpp (parse_path): revert zou change as it

Index: backend/render_handler_ogl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_ogl.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- backend/render_handler_ogl.cpp      12 Sep 2007 12:53:55 -0000      1.81
+++ backend/render_handler_ogl.cpp      12 Sep 2007 14:51:10 -0000      1.82
@@ -5,7 +5,7 @@
 
 // A render_handler that uses SDL & OpenGL
 
-/* $Id: render_handler_ogl.cpp,v 1.81 2007/09/12 12:53:55 bjacques Exp $ */
+/* $Id: render_handler_ogl.cpp,v 1.82 2007/09/12 14:51:10 bjacques Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -51,7 +51,7 @@
 // 3 = use image::resample(), slow software resampling
 #define RESAMPLE_METHOD 2
 
-#define DEBUG_OPENGL 0
+//#define DEBUG_OPENGL 1
 
 
 // bitmap_info_ogl declaration
@@ -685,9 +685,10 @@
        
     void       line_style_width(float width)
        {
+               float norm_width = std::max(1.0f, width); // TODO: stroke 
scaling
 
 //     GNASH_REPORT_FUNCTION;
-               if ( width == 1.0 ) // "hairline", see render_handler_tri.h
+               if ( norm_width == 1.0 ) // "hairline", see render_handler_tri.h
                {
                        glLineWidth(1); // expected: 1 pixel
                }
@@ -697,8 +698,8 @@
                        // low-width lines well, even with anti-aliasing
                        // enabled
                        // But this is a start (20 TWIPS' width = 1 pixel's)
-                       glLineWidth(TWIPS_TO_PIXELS(width));
-                       glPointSize(TWIPS_TO_PIXELS(width));
+                       glLineWidth(TWIPS_TO_PIXELS(norm_width));
+                       glPointSize(TWIPS_TO_PIXELS(norm_width));
                }
        }
 




reply via email to

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