Index: trunk/geant4/visualization/History
===================================================================
--- trunk/geant4/visualization/History	(revision 682)
+++ trunk/geant4/visualization/History	(revision 688)
@@ -1,3 +1,3 @@
-$Id: History,v 1.418 2007/11/19 19:56:26 perl Exp $
+$Id: History,v 1.419 2008/01/04 22:17:08 allison Exp $
 -------------------------------------------------------------------
 
@@ -24,4 +24,13 @@
 History file for visualization category
 ---------------------------------------
+
+4th January 2008  John Allison  (vis-V09-01-00 with greps-V09-01-00)
+- Draw2D capability, already available for G4Text, extended to:
+  G4Circle, G4Polyhedron, G4Polyline, G4Polymarker, G4Square.
+  o modeling-V09-01-00: Adapted to new BeginPrimitives2D signature.
+  o visman-V09-01-00: Implemented extended 2D interface.
+  o opengl-V09-01-00: Implemented extended 2D interface.
+  o vis-HepRep-V09-01-00: Adapted to new BeginPrimitives2D signature.
+  o vistest-V09-01-00: MyEventAction: Added 2D polyhedron.
 
 19th November 2007 Joseph Perl  (vis-V09-00-03)
Index: trunk/geant4/visualization/OpenGL/GNUmakefile
===================================================================
--- trunk/geant4/visualization/OpenGL/GNUmakefile	(revision 682)
+++ trunk/geant4/visualization/OpenGL/GNUmakefile	(revision 688)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.6 2004/06/03 11:40:13 gcosmo Exp $
+# $Id: GNUmakefile,v 1.7 2008/01/15 11:05:08 lgarnier Exp $
 
 name := G4OpenGL
Index: trunk/geant4/visualization/OpenGL/History
===================================================================
--- trunk/geant4/visualization/OpenGL/History	(revision 682)
+++ trunk/geant4/visualization/OpenGL/History	(revision 688)
@@ -1,3 +1,3 @@
-$Id: History,v 1.104 2007/11/30 14:47:30 lgarnier Exp $
+$Id: History,v 1.106 2008/01/15 11:05:08 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,23 @@
 History file for visualization/OpenGL
 -------------------------------------
+
+15th Janvier 2007, Laurent Garnier
+ - Fixed some layout problems on export dialog box
+ - Some improvements on exports formats
+ - Fix a bug in the help command : The clic callback on a item was not 
+   working on windows
+ - Fix a crash at exit when launched on a MAC.
+ - EPS export format is now ready for Qt3
+ - Add Vectoriel EPS export format
+ - Fix an aspect ratio deformation when resize the widget
+ - Fix a crash at launch with leopard 
+ - When selecting the "move" mouse action, this action was set even when 
+   mouse button was released. Fixed : Now we should clic to have the move action
+ - GNUmakefile : Added a macro for moc file
+ - Moc files : Suppression of all theses files. They are now autogenerated 
+   thanks to config/common.gmk
+
+4th January 2008  John Allison  (opengl-V09-01-00)
+- Implemented extended 2D interface.
 
 30th November 2007  Laurent Garnier
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateSceneHandler.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateSceneHandler.hh	(revision 682)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateSceneHandler.hh	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.13 2007/04/04 16:50:26 allison Exp $
+// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.14 2008/01/04 22:07:01 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -54,5 +54,5 @@
   void BeginPrimitives (const G4Transform3D& objectTransformation);
   void EndPrimitives ();
-  void BeginPrimitives2D ();
+  void BeginPrimitives2D (const G4Transform3D& objectTransformation);
   void EndPrimitives2D ();
   void BeginModeling ();
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh	(revision 682)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtExportDialog.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
+// $Id: G4OpenGLQtExportDialog.hh,v 1.4 2008/01/15 11:05:08 lgarnier Exp $
 // GEANT4 tag $Name: 
 //
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 682)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtViewer.hh,v 1.5 2007/11/30 14:47:30 lgarnier Exp $
+// $Id: G4OpenGLQtViewer.hh,v 1.6 2008/01/15 11:05:08 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -135,6 +135,4 @@
   void actionDrawingSurfaceRemoval();
   void actionDrawingLineSurfaceRemoval();
-//   void actionControlPanels();
-//   void actionExitG4();
   void actionCreateEPS();
 
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLSceneHandler.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLSceneHandler.hh	(revision 682)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLSceneHandler.hh	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLSceneHandler.hh,v 1.23 2007/04/04 16:50:26 allison Exp $
+// $Id: G4OpenGLSceneHandler.hh,v 1.24 2008/01/04 22:07:01 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -58,5 +58,5 @@
   virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
   virtual void EndPrimitives ();
-  virtual void BeginPrimitives2D ();
+  virtual void BeginPrimitives2D (const G4Transform3D& objectTransformation);
   virtual void EndPrimitives2D ();
   void AddPrimitive (const G4Polyline&);
@@ -95,7 +95,10 @@
   const G4Polyhedron* CreateCutawayPolyhedron ();
 
+  void ClearAndDestroyAtts();  // Destroys att holders and clears pick map.
+
   GLuint fPickName;
   std::map<GLuint, G4AttHolder*> fPickMap;  // For picking.
-  void ClearAndDestroyAtts();  // Destroys att holders and clears pick map.
+
+  G4bool fProcessing2D;
 
 private:
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh	(revision 682)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLStoredQtViewer.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
+// $Id: G4OpenGLStoredQtViewer.hh,v 1.4 2008/01/15 11:05:08 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -77,5 +77,5 @@
   QPoint beginZoom;
   QPoint endZoom;
-  QImage glBufferImage;
+  //  QImage glBufferImage;
 };
 
Index: trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredSceneHandler.hh
===================================================================
--- trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredSceneHandler.hh	(revision 682)
+++ trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredSceneHandler.hh	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLStoredSceneHandler.hh,v 1.24 2007/04/04 16:50:26 allison Exp $
+// $Id: G4OpenGLStoredSceneHandler.hh,v 1.25 2008/01/04 22:07:01 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -58,5 +58,5 @@
   void BeginPrimitives (const G4Transform3D& objectTransformation);
   void EndPrimitives ();
-  void BeginPrimitives2D ();
+  void BeginPrimitives2D (const G4Transform3D& objectTransformation);
   void EndPrimitives2D ();
   void BeginModeling ();
@@ -111,7 +111,4 @@
   // A proper implementation would use geometry hierarchy.
   std::map <const G4VSolid*, G4int, std::less <const G4VSolid*> > fSolidMap;
-
-private:
-  G4bool fProcessing2D;
 };
 
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLImmediateQtViewer.cc,v 1.3 2007/11/15 18:24:28 lgarnier Exp $
+// $Id: G4OpenGLImmediateQtViewer.cc,v 1.4 2008/01/15 11:05:08 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateSceneHandler.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateSceneHandler.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateSceneHandler.cc	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.27 2007/04/04 16:50:26 allison Exp $
+// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.28 2008/01/04 22:07:01 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -130,8 +130,11 @@
 
 void G4OpenGLImmediateSceneHandler::BeginPrimitives
-(const G4Transform3D& objectTransformation) {
+(const G4Transform3D& objectTransformation)
+{
   G4OpenGLSceneHandler::BeginPrimitives (objectTransformation);
+
+  G4OpenGLTransform3D oglt (objectTransformation);
+
   glPushMatrix();
-  G4OpenGLTransform3D oglt (objectTransformation);
 
   /*************************** Check matrix.
@@ -158,7 +161,8 @@
 }
 
-void G4OpenGLImmediateSceneHandler::BeginPrimitives2D()
-{
-  G4OpenGLSceneHandler::BeginPrimitives2D();
+void G4OpenGLImmediateSceneHandler::BeginPrimitives2D
+(const G4Transform3D& objectTransformation)
+{
+  G4OpenGLSceneHandler::BeginPrimitives2D(objectTransformation);
 
   // Push current 3D world matrices and load identity to define screen
@@ -171,4 +175,6 @@
   glPushMatrix();
   glLoadIdentity();
+  G4OpenGLTransform3D oglt (objectTransformation);
+  glMultMatrixd (oglt.GetGLMatrix ());
 }
 
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc	(revision 688)
@@ -25,10 +25,10 @@
 //
 //
-// $Id: G4OpenGLQtExportDialog.cc,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
+// $Id: G4OpenGLQtExportDialog.cc,v 1.5 2008/01/15 11:05:08 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
 // 
 
-#define GEANT4_QT_DEBUG
+//#define GEANT4_QT_DEBUG
 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
 
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLQtViewer.cc,v 1.8 2007/11/30 14:47:30 lgarnier Exp $
+// $Id: G4OpenGLQtViewer.cc,v 1.9 2008/01/15 11:05:08 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -36,5 +36,5 @@
 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
 
-#define GEANT4_QT_DEBUG
+//#define GEANT4_QT_DEBUG
 
 #include "G4OpenGLQtViewer.hh"
@@ -590,23 +590,9 @@
 
 #if QT_VERSION < 0x030200
-//   QAction *controlPanels = new QAction("&Control panels","&Control panels",CTRL+Key_C,mActions);
-//   QAction *exitG4 =  new QAction("&Exit to G4Vis >","&Exit to G4Vis >",CTRL+Key_E,mActions);
   QAction *createEPS =  new QAction("&Save as ...","&Save as ...",CTRL+Key_S,mActions);
 #else
-//   QAction *controlPanels = new QAction("&Control panels",CTRL+Key_C,mActions);
-//   QAction *exitG4 =  new QAction("&Exit to G4Vis >",CTRL+Key_E,mActions);
   QAction *createEPS =  new QAction("&Save as ...",CTRL+Key_S,mActions);
 #endif
-//   controlPanels->addTo(mActions);
-//   exitG4->addTo(mActions);
   createEPS->addTo(mActions);
-//   QObject ::connect(controlPanels, 
-//                     SIGNAL(activated()),
-//                     this, 
-//                     SLOT(actionControlPanels()));
-//   QObject ::connect(exitG4, 
-//                     SIGNAL(activated()),
-//                     this, 
-//                     SLOT(actionExitG4()));
   QObject ::connect(createEPS, 
                     SIGNAL(activated()),
@@ -617,15 +603,5 @@
   // === Action Menu ===
   QMenu *mActions = fContextMenu->addMenu("&Actions");
-//   QAction *controlPanels = mActions->addAction("Control panels");
-//   QAction *exitG4 = mActions->addAction("Exit to G4Vis >");
   QAction *createEPS = mActions->addAction("Save as ...");
-//   QObject ::connect(controlPanels, 
-//                     SIGNAL(triggered()),
-//                     this, 
-//                     SLOT(actionControlPanels()));
-//   QObject ::connect(exitG4, 
-//                     SIGNAL(triggered()),
-//                     this, 
-//                     SLOT(actionExitG4()));
   QObject ::connect(createEPS, 
                     SIGNAL(triggered()),
@@ -1188,17 +1164,4 @@
 #endif
 }
-
-
-// void G4OpenGLQtViewer::actionControlPanels() {
-// #ifdef GEANT4_QT_DEBUG
-//   printf("G4OpenGLQtViewer::actionControlPanels \n");
-// #endif
-// }
-
-// void G4OpenGLQtViewer::actionExitG4() {
-// #ifdef GEANT4_QT_DEBUG
-//   printf("G4OpenGLQtViewer::actionExitG4() \n");
-// #endif
-// }
 
 void G4OpenGLQtViewer::actionCreateEPS() {
@@ -1356,5 +1319,4 @@
 }
 
-
 /**
    @param pos_x mouse x position
@@ -1366,5 +1328,5 @@
 void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::ButtonState mButtons)
 #else
-  void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::MouseButtons mButtons)
+void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::MouseButtons mButtons)
 #endif
 {
@@ -1611,5 +1573,4 @@
   int size = width*height;
   
-
   if (depth == 1)
     size = (width+7)/8*height;
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLSceneHandler.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLSceneHandler.cc	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLSceneHandler.cc,v 1.51 2007/05/25 15:41:38 allison Exp $
+// $Id: G4OpenGLSceneHandler.cc,v 1.52 2008/01/04 22:07:01 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -72,4 +72,5 @@
   G4VSceneHandler (system, id, name),
   fPickName(0),
+  fProcessing2D (false),
   fProcessingPolymarker(false)
 {}
@@ -124,11 +125,14 @@
 }
 
-void G4OpenGLSceneHandler::BeginPrimitives2D ()
-{
-  G4VSceneHandler::BeginPrimitives2D ();
+void G4OpenGLSceneHandler::BeginPrimitives2D
+(const G4Transform3D& objectTransformation)
+{
+  G4VSceneHandler::BeginPrimitives2D (objectTransformation);
+  fProcessing2D = true;
 }
 
 void G4OpenGLSceneHandler::EndPrimitives2D ()
 {
+  fProcessing2D = false;
   G4VSceneHandler::EndPrimitives2D ();
 }
@@ -515,5 +519,5 @@
       glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, materialColour);
     }
-    glEnable (GL_LIGHTING);
+    if (!fProcessing2D) glEnable (GL_LIGHTING);
     break;
   case (G4ViewParameters::wireframe):
@@ -605,5 +609,5 @@
       glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP);
       if (drawing_style == G4ViewParameters::hlhsr) {
-	glEnable (GL_LIGHTING);
+	if (!fProcessing2D) glEnable (GL_LIGHTING);
       }
       glEnable (GL_DEPTH_TEST);
@@ -759,5 +763,5 @@
   case (G4ViewParameters::hsr):
     {
-      glEnable (GL_LIGHTING);
+      if (!fProcessing2D) glEnable (GL_LIGHTING);
       glEnable (GL_DEPTH_TEST);
       glEnable (GL_AUTO_NORMAL);
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLStoredQtViewer.cc,v 1.6 2007/11/15 18:24:28 lgarnier Exp $
+// $Id: G4OpenGLStoredQtViewer.cc,v 1.8 2008/01/15 11:05:08 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc	(revision 688)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLStoredSceneHandler.cc,v 1.34 2007/04/04 16:50:27 allison Exp $
+// $Id: G4OpenGLStoredSceneHandler.cc,v 1.35 2008/01/04 22:07:01 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -60,6 +60,5 @@
 fMemoryForDisplayLists (true),
 fAddPrimitivePreambleNestingDepth (0),
-fTopPODL (0),
-fProcessing2D (false)
+fTopPODL (0)
 {}
 
@@ -138,4 +137,7 @@
     glPushMatrix();
     glLoadIdentity();
+    G4OpenGLTransform3D oglt (*fpObjectTransformation);
+    glMultMatrixd (oglt.GetGLMatrix ());
+    glColor3d (c.GetRed (), c.GetGreen (), c.GetBlue ());
   }
 }
@@ -239,13 +241,12 @@
 }
 
-void G4OpenGLStoredSceneHandler::BeginPrimitives2D()
-{
-  G4OpenGLSceneHandler::BeginPrimitives2D();
-  fProcessing2D = true;
+void G4OpenGLStoredSceneHandler::BeginPrimitives2D
+(const G4Transform3D& objectTransformation)
+{
+  G4OpenGLSceneHandler::BeginPrimitives2D(objectTransformation);
 }
 
 void G4OpenGLStoredSceneHandler::EndPrimitives2D ()
 {
-  fProcessing2D = false;
   G4OpenGLSceneHandler::EndPrimitives2D ();
 }
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredViewer.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredViewer.cc	(revision 688)
@@ -142,7 +142,7 @@
     }
 
-    if (fG4OpenGLStoredSceneHandler.fTopPODL) {
+    if (fG4OpenGLStoredSceneHandler.fTopPODL) 
       glCallList (fG4OpenGLStoredSceneHandler.fTopPODL);
-    }
+
     for (size_t i = 0; i < fG4OpenGLStoredSceneHandler.fTOList.size(); ++i) {
       G4OpenGLStoredSceneHandler::TO& to =
Index: trunk/geant4/visualization/OpenGL/src/G4OpenGLViewer.cc
===================================================================
--- trunk/geant4/visualization/OpenGL/src/G4OpenGLViewer.cc	(revision 682)
+++ trunk/geant4/visualization/OpenGL/src/G4OpenGLViewer.cc	(revision 688)
@@ -26,5 +26,5 @@
 //
 // $Id: G4OpenGLViewer.cc,v 1.34 2007/05/24 18:27:13 allison Exp $
-// GEANT4 tag $Name:  $
+// GEANT4 tag $Name: HEAD $
 //
 // 
@@ -313,5 +313,4 @@
 void G4OpenGLViewer::Pick(GLdouble x, GLdouble y)
 {
-  printf("G4OpenGLViewer::Pick\n");
   //G4cout << "X: " << x << ", Y: " << y << G4endl;
   const G4int BUFSIZE = 512;
Index: trunk/geant4/visualization/management/History
===================================================================
--- trunk/geant4/visualization/management/History	(revision 682)
+++ trunk/geant4/visualization/management/History	(revision 688)
@@ -1,3 +1,3 @@
-$Id: History,v 1.104 2007/11/30 14:47:30 lgarnier Exp $
+$Id: History,v 1.105 2008/01/04 22:03:46 allison Exp $
 
 -------------------------------------------------------------------
@@ -26,4 +26,7 @@
 History file for visualization management sub-category
 ------------------------------------------------------
+
+4th January 2008  John Allison  (visman-V09-01-00)
+- Implemented extended 2D interface.
 
 30th November 2007  Laurent Garnier
Index: trunk/geant4/visualization/management/include/G4VSceneHandler.hh
===================================================================
--- trunk/geant4/visualization/management/include/G4VSceneHandler.hh	(revision 682)
+++ trunk/geant4/visualization/management/include/G4VSceneHandler.hh	(revision 688)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VSceneHandler.hh,v 1.39 2007/01/11 16:38:14 allison Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4VSceneHandler.hh,v 1.40 2008/01/04 22:03:45 allison Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -164,5 +164,6 @@
   // }
 
-  virtual void BeginPrimitives2D ();
+  virtual void BeginPrimitives2D
+  (const G4Transform3D& objectTransformation);
   // The x,y coordinates of the primitives passed to AddPrimitive are
   // intrepreted as screen coordinates, -1 < x,y < 1.  The
Index: trunk/geant4/visualization/management/include/G4VisManager.hh
===================================================================
--- trunk/geant4/visualization/management/include/G4VisManager.hh	(revision 682)
+++ trunk/geant4/visualization/management/include/G4VisManager.hh	(revision 688)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VisManager.hh,v 1.67 2007/07/10 17:49:27 allison Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4VisManager.hh,v 1.68 2008/01/04 22:03:46 allison Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -250,5 +250,24 @@
     const G4Transform3D& objectTransformation = G4Transform3D());
 
-  void Draw2D (const G4Text&);
+  virtual void Draw2D (const G4Circle&,
+    const G4Transform3D& objectTransformation = G4Transform3D());
+
+  virtual void Draw2D (const G4NURBS&,
+    const G4Transform3D& objectTransformation = G4Transform3D());
+
+  virtual void Draw2D (const G4Polyhedron&,
+    const G4Transform3D& objectTransformation = G4Transform3D());
+
+  virtual void Draw2D (const G4Polyline&,
+    const G4Transform3D& objectTransformation = G4Transform3D());
+
+  virtual void Draw2D (const G4Polymarker&,
+    const G4Transform3D& objectTransformation = G4Transform3D());
+
+  virtual void Draw2D (const G4Square&,
+    const G4Transform3D& objectTransformation = G4Transform3D());
+
+  virtual void Draw2D (const G4Text&,
+    const G4Transform3D& objectTransformation = G4Transform3D());
 
   ////////////////////////////////////////////////////////////////////
Index: trunk/geant4/visualization/management/src/G4VSceneHandler.cc
===================================================================
--- trunk/geant4/visualization/management/src/G4VSceneHandler.cc	(revision 682)
+++ trunk/geant4/visualization/management/src/G4VSceneHandler.cc	(revision 688)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4VSceneHandler.cc,v 1.82 2007/05/16 15:47:44 allison Exp $
-// GEANT4 tag $Name: geant4-09-00-ref-01 $
+// $Id: G4VSceneHandler.cc,v 1.83 2008/01/04 22:03:46 allison Exp $
+// GEANT4 tag $Name:  $
 //
 // 
@@ -159,12 +159,11 @@
 }
 
-void G4VSceneHandler::BeginPrimitives2D () {
+void G4VSceneHandler::BeginPrimitives2D
+(const G4Transform3D& objectTransformation) {
   fNestingDepth++;
   if (fNestingDepth > 1)
     G4Exception("G4VSceneHandler::BeginPrimitives2D: Nesting detected."
 		"\n  It is illegal to nest Begin/EndPrimitives.");
-  // Not actually required for 2D operations but some drivers do an
-  // initial transformation...
-  fpObjectTransformation = &fIdentityTransformation;
+  fpObjectTransformation = &objectTransformation;
 }
 
Index: trunk/geant4/visualization/management/src/G4VisManager.cc
===================================================================
--- trunk/geant4/visualization/management/src/G4VisManager.cc	(revision 682)
+++ trunk/geant4/visualization/management/src/G4VisManager.cc	(revision 688)
@@ -24,5 +24,5 @@
 // ********************************************************************
 //
-// $Id: G4VisManager.cc,v 1.114 2007/11/10 14:59:46 allison Exp $
+// $Id: G4VisManager.cc,v 1.115 2008/01/04 22:03:46 allison Exp $
 // GEANT4 tag $Name:  $
 //
@@ -505,9 +505,76 @@
 }
 
-void G4VisManager::Draw2D (const G4Text& text)
+void G4VisManager::Draw2D (const G4Circle& circle,
+			   const G4Transform3D& objectTransform)
 {
   if (IsValidView()) {
     ClearTransientStoreIfMarked();
-    fpSceneHandler -> BeginPrimitives2D();
+    fpSceneHandler -> BeginPrimitives2D(objectTransform);
+    fpSceneHandler -> AddPrimitive(circle);
+    fpSceneHandler -> EndPrimitives2D();
+  }
+}
+
+void G4VisManager::Draw2D (const G4NURBS& nurbs,
+			   const G4Transform3D& objectTransform)
+{
+  if (IsValidView()) {
+    ClearTransientStoreIfMarked();
+    fpSceneHandler -> BeginPrimitives2D(objectTransform);
+    fpSceneHandler -> AddPrimitive(nurbs);
+    fpSceneHandler -> EndPrimitives2D();
+  }
+}
+
+void G4VisManager::Draw2D (const G4Polyhedron& polyhedron,
+			   const G4Transform3D& objectTransform)
+{
+  if (IsValidView()) {
+    ClearTransientStoreIfMarked();
+    fpSceneHandler -> BeginPrimitives2D(objectTransform);
+    fpSceneHandler -> AddPrimitive(polyhedron);
+    fpSceneHandler -> EndPrimitives2D();
+  }
+}
+
+void G4VisManager::Draw2D (const G4Polyline& line,
+			   const G4Transform3D& objectTransform)
+{
+  if (IsValidView()) {
+    ClearTransientStoreIfMarked();
+    fpSceneHandler -> BeginPrimitives2D(objectTransform);
+    fpSceneHandler -> AddPrimitive(line);
+    fpSceneHandler -> EndPrimitives2D();
+  }
+}
+
+void G4VisManager::Draw2D (const G4Polymarker& polymarker,
+			   const G4Transform3D& objectTransform)
+{
+  if (IsValidView()) {
+    ClearTransientStoreIfMarked();
+    fpSceneHandler -> BeginPrimitives2D(objectTransform);
+    fpSceneHandler -> AddPrimitive(polymarker);
+    fpSceneHandler -> EndPrimitives2D();
+  }
+}
+
+void G4VisManager::Draw2D (const G4Square& square,
+			   const G4Transform3D& objectTransform)
+{
+  if (IsValidView()) {
+    ClearTransientStoreIfMarked();
+    fpSceneHandler -> BeginPrimitives2D(objectTransform);
+    fpSceneHandler -> AddPrimitive(square);
+    fpSceneHandler -> EndPrimitives2D();
+  }
+}
+
+void G4VisManager::Draw2D (const G4Text& text,
+			   const G4Transform3D& objectTransform)
+{
+  if (IsValidView()) {
+    ClearTransientStoreIfMarked();
+    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     fpSceneHandler -> AddPrimitive(text);
     fpSceneHandler -> EndPrimitives2D();
