Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added resize()

  • Loading branch information...
commit 100f950bd596ff40a66578872f995d2246e92101 1 parent c3ea831
Francesco Salvestrini authored January 26, 2012
6  haze/gfx/math.hxx
@@ -104,6 +104,12 @@ namespace HAZE {
104 104
                                 to_.y(c + v / 2);
105 105
                         }
106 106
 
  107
+                        virtual void resize(const TYPE & w,
  108
+                                            const TYPE & h) {
  109
+                                width(w);
  110
+                                height(h);
  111
+                        }
  112
+
107 113
                 private:
108 114
                         Point<TYPE> from_;
109 115
                         Point<TYPE> to_;
3  haze/gfx/video.cxx
@@ -149,8 +149,7 @@ namespace HAZE {
149 149
                         throw CannotResize("Wrong dimensions");
150 150
                 }
151 151
 
152  
-                width(w);
153  
-                height(h);
  152
+                MATH::Rectangle<size_t>::resize(w, h);
154 153
 
155 154
                 surface_ = SDL_SetVideoMode(width(),
156 155
                                             height(),

0 notes on commit 100f950

Please sign in to comment.
Something went wrong with that request. Please try again.