diff --git a/trunk/Gosu/Graphics.hpp b/trunk/Gosu/Graphics.hpp
index 0834e01..6c0f8f8 100644
--- a/trunk/Gosu/Graphics.hpp
+++ b/trunk/Gosu/Graphics.hpp
@@ -7,6 +7,7 @@
 #include <Gosu/Fwd.hpp>
 #include <Gosu/Color.hpp>
 #include <Gosu/GraphicsBase.hpp>
+#include <Gosu/Transform.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <memory>
 
@@ -60,6 +61,10 @@ namespace Gosu
         void beginClipping(int x, int y, unsigned width, unsigned height);
         //! Disables clipping.
         void endClipping();
+        //! Enables OpenGL matrix transformation.
+        void beginTransform(Transform transform);
+        //! Disables transformation.
+        void endTransform();
         
         //! Starts recording a macro. Cannot be nested.
         void beginRecording();
diff --git a/trunk/GosuImpl/Graphics/DrawOp.hpp b/trunk/GosuImpl/Graphics/DrawOp.hpp
index 8c9d405..3fc2fcc 100755
--- a/trunk/GosuImpl/Graphics/DrawOp.hpp
+++ b/trunk/GosuImpl/Graphics/DrawOp.hpp
@@ -3,10 +3,12 @@
 
 #include <Gosu/GraphicsBase.hpp>
 #include <Gosu/Color.hpp>
+#include <Gosu/Transform.hpp>
 #include <GosuImpl/Graphics/Common.hpp>
 #include <GosuImpl/Graphics/TexChunk.hpp>
 #include <boost/bind.hpp>
 #include <boost/cstdint.hpp>
+#include <boost/foreach.hpp>
 #include <algorithm>
 #include <set>
 
@@ -26,7 +28,8 @@ namespace Gosu
     {
         int clipX, clipY;
         unsigned clipWidth, clipHeight;
-            
+        std::vector<Transform> transforms;
+        
         struct Vertex
         {
             double x, y;
@@ -51,6 +54,10 @@ namespace Gosu
                 glEnable(GL_SCISSOR_TEST);
                 glScissor(clipX, clipY, clipWidth, clipHeight);
             }
+            
+            // Apply OpenGL matrix transformations.
+            BOOST_FOREACH (Transform transform, transforms)
+                transform.begin();
         
             if (mode == amAdditive)
                 glBlendFunc(GL_SRC_ALPHA, GL_ONE);
@@ -109,6 +116,9 @@ namespace Gosu
             
             glEnd();
             
+            BOOST_REVERSE_FOREACH (Transform transform, transforms)
+                transform.end();
+            
             if (clipWidth != 0xffffffff)
                 glDisable(GL_SCISSOR_TEST);
         }
@@ -146,6 +156,10 @@ namespace Gosu
                 glScissor(clipX, clipY, clipWidth, clipHeight);
             }
             
+            // Apply OpenGL matrix transformations.
+            BOOST_FOREACH (Transform transform, transforms)
+                transform.begin();
+            
             if (mode == amAdditive)
                 glBlendFunc(GL_SRC_ALPHA, GL_ONE);
             else if (mode == amMultiply)
@@ -211,6 +225,9 @@ namespace Gosu
                 spriteCounter = 0;
             }
             
+            BOOST_REVERSE_FOREACH (Transform transform, transforms)
+                transform.end();
+            
             if (clipWidth != 0xffffffff)
                 glDisable(GL_SCISSOR_TEST);
         }
@@ -254,6 +271,7 @@ namespace Gosu
         int clipX, clipY;
         unsigned clipWidth, clipHeight;
         std::multiset<DrawOp> set;
+        std::vector<Transform> transforms;
 
     public:
         DrawOpQueue()
@@ -288,6 +306,7 @@ namespace Gosu
                     glDisable(GL_TEXTURE_2D);
             }
             
+            op.transforms = transforms;
             op.z = z;
             set.insert(op);
         }
@@ -304,6 +323,16 @@ namespace Gosu
         {
             clipWidth = 0xffffffff;
         }
+        
+        void beginTransform(Transform transform)
+        {
+            transforms.push_back(transform);
+        }
+        
+        void endTransform()
+        {
+            transforms.pop_back();
+        }
 
         void performDrawOps() const
         {
diff --git a/trunk/GosuImpl/Graphics/Graphics.cpp b/trunk/GosuImpl/Graphics/Graphics.cpp
index fd31a9f..be29c25 100644
--- a/trunk/GosuImpl/Graphics/Graphics.cpp
+++ b/trunk/GosuImpl/Graphics/Graphics.cpp
@@ -214,6 +214,16 @@ void Gosu::Graphics::endClipping()
     pimpl->queues.back().endClipping();
 }
 
+void Gosu::Graphics::beginTransform(Transform transform)
+{
+    pimpl->queues.back().beginTransform(transform);
+}
+
+void Gosu::Graphics::endTransform()
+{
+    pimpl->queues.back().endTransform();
+}
+
 void Gosu::Graphics::beginRecording()
 {
     pimpl->queues.resize(pimpl->queues.size() + 1);
