Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49493 - in sandbox/guigl: boost/guigl libs/guigl/build/xcodeide/guigl.xcodeproj
From: stipe_at_[hidden]
Date: 2008-10-30 13:50:23


Author: srajko
Date: 2008-10-30 13:50:22 EDT (Thu, 30 Oct 2008)
New Revision: 49493
URL: http://svn.boost.org/trac/boost/changeset/49493

Log:
added draw and geometry
Added:
   sandbox/guigl/boost/guigl/draw.hpp (contents, props changed)
   sandbox/guigl/boost/guigl/geometry.hpp (contents, props changed)
Text files modified:
   sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Added: sandbox/guigl/boost/guigl/draw.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/guigl/draw.hpp 2008-10-30 13:50:22 EDT (Thu, 30 Oct 2008)
@@ -0,0 +1,35 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef BOOST__GUIGL__DRAW_HPP
+#define BOOST__GUIGL__DRAW_HPP
+
+
+#include <boost/guigl/platform/opengl.hpp>
+#include <boost/guigl/types.hpp>
+
+
+namespace boost { namespace guigl {
+
+namespace draw {
+
+inline void vertex(const position_type &position)
+{
+ glVertex2d(position.x, position.y);
+}
+
+inline void color(const color_type &color)
+{
+ glColor3d(color[0], color[1], color[2]);
+}
+
+}
+
+}}
+
+#endif // BOOST__GUIGL__DRAW_HPP

Added: sandbox/guigl/boost/guigl/geometry.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/guigl/geometry.hpp 2008-10-30 13:50:22 EDT (Thu, 30 Oct 2008)
@@ -0,0 +1,30 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef BOOST__GUIGL__GEOMETRY_HPP
+#define BOOST__GUIGL__GEOMETRY_HPP
+
+
+#include <boost/guigl/types.hpp>
+
+
+namespace boost { namespace guigl {
+
+namespace geometry {
+
+template<typename View>
+position_type midpoint(const View &view)
+{
+ return view.position() + view.size() / 2;
+}
+
+}
+
+}}
+
+#endif // BOOST__GUIGL__GEOMETRY_HPP

Modified: sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj (original)
+++ sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj 2008-10-30 13:50:22 EDT (Thu, 30 Oct 2008)
@@ -161,6 +161,8 @@
                 08AD8F620E5CD63400BFB2C8 /* opengl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = opengl.hpp; sourceTree = "<group>"; };
                 08ADC1F90E7B62BD00D8CB9D /* static_compound.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_compound.hpp; sourceTree = "<group>"; };
                 08ADC1FD0E7B64E100D8CB9D /* static_compound.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_compound.hpp; sourceTree = "<group>"; };
+ 08B213E50EB91BD9006F0C30 /* draw.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = draw.hpp; sourceTree = "<group>"; };
+ 08B213E60EB91BF1006F0C30 /* geometry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = geometry.hpp; sourceTree = "<group>"; };
                 08B919780EB682BC00F743E3 /* delayed_constructor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = delayed_constructor.hpp; sourceTree = "<group>"; };
                 08B9197C0EB6885C00F743E3 /* test_delayed_constructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_delayed_constructor.cpp; sourceTree = "<group>"; };
                 08D0F2550E6712E90026C6DF /* active_colored.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = active_colored.hpp; sourceTree = "<group>"; };
@@ -346,6 +348,8 @@
                                 089D83740E5A35D800325868 /* parameters.hpp */,
                                 089790490E5DB3E800C79062 /* access.hpp */,
                                 089791BA0E5DC06400C79062 /* event.hpp */,
+ 08B213E50EB91BD9006F0C30 /* draw.hpp */,
+ 08B213E60EB91BF1006F0C30 /* geometry.hpp */,
                         );
                         name = guigl;
                         path = ../../../../boost/guigl;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk