Fresco/Berlin/modules/Figures FigureImpl.cc,1.27,1.28 FigureKitImpl.cc,1.27,1.28 FigureKitImpl.hh,1.21,1.22 Figures.cc,1.15,1.16 ImageImpl.cc,1.15,1.16 ImageImpl.hh,1.8,1.9 PolyFigure.cc,1.15,1.16 PolyFigure.hh,1.10,1.11 Transformer.cc,1.17,1.18

Tobias Hunger <[email protected]> Mon, 29 Dec 2003 09:05:13 +0100
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Berlin/modules/Figures
In directory purcel:/tmp/cvs-serv30213/modules/Figures

Modified Files:
	FigureImpl.cc FigureKitImpl.cc FigureKitImpl.hh Figures.cc 
	ImageImpl.cc ImageImpl.hh PolyFigure.cc PolyFigure.hh 
	Transformer.cc 
Log Message:
 * Styleguidify Berlin
 * Add namespace Berlin
Both patches are mixed into one since I did not want to commit two such
large and disruptive patches.


Index: FigureImpl.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/FigureImpl.cc,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- FigureImpl.cc	9 Dec 2003 17:53:04 -0000	1.27
+++ FigureImpl.cc	29 Dec 2003 08:03:26 -0000	1.28
@@ -339,10 +339,14 @@
 	CORBA::ULong n = my_path->nodes.length();
 	for (CORBA::ULong i = 1; i < n; i++)
 	{
-	    my_ext->lower.x = Math::min(my_ext->lower.x, my_path->nodes[i].x);
-	    my_ext->upper.x = Math::max(my_ext->upper.x, my_path->nodes[i].x);
-	    my_ext->lower.y = Math::min(my_ext->lower.y, my_path->nodes[i].y);
-	    my_ext->upper.y = Math::max(my_ext->upper.y, my_path->nodes[i].y);
+	    my_ext->lower.x = Math::min(my_ext->lower.x,
+					my_path->nodes[i].x);
+	    my_ext->upper.x = Math::max(my_ext->upper.x,
+					my_path->nodes[i].x);
+	    my_ext->lower.y = Math::min(my_ext->lower.y,
+					my_path->nodes[i].y);
+	    my_ext->upper.y = Math::max(my_ext->upper.y,
+					my_path->nodes[i].y);
         }
 // 	// in case of vertical/horizontal line with nil brush, 
 // 	// painter->is_visible will be return false, so add 1

Index: FigureKitImpl.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/FigureKitImpl.cc,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- FigureKitImpl.cc	9 Dec 2003 17:53:04 -0000	1.27
+++ FigureKitImpl.cc	29 Dec 2003 08:03:26 -0000	1.28
@@ -142,8 +142,8 @@
 }
 
 
-extern "C" KitImpl *load()
+extern "C" Berlin::KitImpl *load()
 {
     static std::string properties[] = {"implementation", "FigureKitImpl"};
-    return create_prototype<FigureKitImpl> ("IDL:fresco.org/Fresco/FigureKit:1.0", properties, 2);
+    return Berlin::create_prototype<FigureKitImpl> ("IDL:fresco.org/Fresco/FigureKit:1.0", properties, 2);
 }

Index: FigureKitImpl.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/FigureKitImpl.hh,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- FigureKitImpl.hh	9 Dec 2003 17:53:04 -0000	1.21
+++ FigureKitImpl.hh	29 Dec 2003 08:03:26 -0000	1.22
@@ -43,8 +43,8 @@
 		      const Fresco::Kit::PropertySeq &,
 		      ServerContextImpl *);
 	virtual ~FigureKitImpl();
-	virtual KitImpl *clone(const Fresco::Kit::PropertySeq &p,
-			       ServerContextImpl *c)
+	virtual Berlin::KitImpl *clone(const Fresco::Kit::PropertySeq &p,
+				       ServerContextImpl *c)
 	{ return new FigureKitImpl(repo_id(), p, c); }
 	
 	Fresco::Graphic_ptr root(Fresco::Graphic_ptr);

Index: Figures.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/Figures.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Figures.cc	9 Dec 2003 20:34:40 -0000	1.15
+++ Figures.cc	29 Dec 2003 08:03:26 -0000	1.16
@@ -146,17 +146,13 @@
 EllipseImpl::EllipseImpl() { }
 EllipseImpl::EllipseImpl(const Vertex &c, Coord r1, Coord r2) :
     my_center(c), my_radius1(r1), my_radius2(r2)
-{
-    resize();
-}
+{ resize(); }
 
 EllipseImpl::EllipseImpl(const EllipseImpl &ellipse) :
     my_center(ellipse.my_center),
     my_radius1(ellipse.my_radius1),
     my_radius2(ellipse.my_radius2)
-{
-    copy(ellipse);
-}
+{ copy(ellipse); }
 
 EllipseImpl::~EllipseImpl() { }
 
@@ -200,7 +196,8 @@
     my_handles(new Fresco::Path(path)), my_closed(flag)
 { my_handles->shape = convex; resize(); }
 PathImpl::PathImpl(const PathImpl &path) :
-    my_handles(new Fresco::Path(path.my_handles)), my_closed(path.my_closed)
+    my_handles(new Fresco::Path(path.my_handles)),
+    my_closed(path.my_closed)
 { copy(path); }
 
 void PathImpl::resize()

Index: ImageImpl.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/ImageImpl.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ImageImpl.cc	27 Oct 2003 17:08:37 -0000	1.15
+++ ImageImpl.cc	29 Dec 2003 08:03:26 -0000	1.16
@@ -32,21 +32,21 @@
 using namespace Fresco;
 
 Berlin::FigureKit::ImageImpl::ImageImpl(Raster_ptr r) :
-  raster(RefCount_var<Fresco::Raster>::increment(r))
+    my_raster(RefCount_var<Fresco::Raster>::increment(r))
 {
-    Fresco::Raster::Info info = raster->header();
-    width = info.width*10.;
-    height = info.height*10.;
+    Fresco::Raster::Info info = my_raster->header();
+    my_width = info.width*10.;
+    my_height = info.height*10.;
 }
 Berlin::FigureKit::ImageImpl::~ImageImpl()
 { Trace trace("ImageImpl::~ImageImpl"); }
 void Berlin::FigureKit::ImageImpl::request(Fresco::Graphic::Requisition &r)
 {
     r.x.defined = true;
-    r.x.natural = r.x.maximum = r.x.minimum = width;
+    r.x.natural = r.x.maximum = r.x.minimum = my_width;
     r.x.align = 0.;
     r.y.defined = true;
-    r.y.natural = r.y.maximum = r.y.minimum = height;
+    r.y.natural = r.y.maximum = r.y.minimum = my_height;
     r.y.align = 0.;
 }
 
@@ -54,21 +54,18 @@
 {
     if (!traversal->intersects_allocation()) return;
     DrawingKit_var drawing = traversal->drawing();
-    drawing->draw_image(raster);
+    drawing->draw_image(my_raster);
 }
 
 void Berlin::FigureKit::ImageImpl::update(const CORBA::Any &)
-{
-    need_redraw();
-}
+{ need_redraw(); }
 
 void Berlin::FigureKit::ImageImpl::activate_composite()
-{
-    raster->attach(Observer_var(_this()));
-}
+{ my_raster->attach(Observer_var(_this())); }
 
 Berlin::FigureKit::Texture::Texture(Raster_ptr r) :
-  raster(RefCount_var<Fresco::Raster>::increment(r)) { }
+  my_raster(RefCount_var<Fresco::Raster>::increment(r))
+{ }
 Berlin::FigureKit::Texture::~Texture() { }
 void Berlin::FigureKit::Texture::traverse(Traversal_ptr traversal)
 { traversal->visit(Graphic_var(_this())); }
@@ -76,7 +73,7 @@
 {
     DrawingKit_var drawing = traversal->drawing();
     drawing->save();
-    drawing->texture(raster);
+    drawing->texture(my_raster);
     drawing->surface_fillstyle(DrawingKit::textured);
     MonoGraphic::traverse(traversal);
     drawing->restore();

Index: ImageImpl.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/ImageImpl.hh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ImageImpl.hh	27 Oct 2003 17:08:37 -0000	1.8
+++ ImageImpl.hh	29 Dec 2003 08:03:26 -0000	1.9
@@ -45,8 +45,8 @@
         ~ImageImpl();
 
         virtual Fresco::Raster_ptr data()
-        { return Fresco::Raster::_duplicate(raster); }
-        virtual void data(Fresco::Raster_ptr r) { raster = r; }
+        { return Fresco::Raster::_duplicate(my_raster); }
+        virtual void data(Fresco::Raster_ptr r) { my_raster = r; }
 
         virtual void request(Fresco::Graphic::Requisition &);
         virtual void draw(Fresco::DrawTraversal_ptr);
@@ -54,8 +54,8 @@
       protected:
         virtual void activate_composite();
       private:
-        RefCount_var<Fresco::Raster> raster;
-        Fresco::Coord width, height;
+        RefCount_var<Fresco::Raster> my_raster;
+        Fresco::Coord my_width, my_height;
     };
 
     class Texture : public MonoGraphic
@@ -67,7 +67,7 @@
         virtual void draw(Fresco::DrawTraversal_ptr);
         virtual void pick(Fresco::PickTraversal_ptr);
       private:
-        RefCount_var<Fresco::Raster> raster;
+        RefCount_var<Fresco::Raster> my_raster;
     };
 
   } // namespace

Index: PolyFigure.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/PolyFigure.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- PolyFigure.cc	9 Dec 2003 17:53:04 -0000	1.15
+++ PolyFigure.cc	29 Dec 2003 08:03:26 -0000	1.16
@@ -56,20 +56,22 @@
         {
             Allocation::Info info;
             for (CORBA::ULong i = 0; i < n; i++)
-		_children[i].peer->extension(info,
-					     Region_var(my_bbox->_this()));
+		my_children[i].peer->
+		    extension(info, Region_var(my_bbox->_this()));
         }
     }
 }
 
-void Berlin::FigureKit::PolyFigure::allocate(Tag, const Allocation::Info &info)
+void Berlin::FigureKit::PolyFigure::allocate(Tag,
+					     const Allocation::Info &info)
 {
     // undefine the allocation...how ? -Stefan
     // info.allocation->;
     info.transformation->premultiply(Transform_var(my_tx->_this()));
 }
 
-void Berlin::FigureKit::PolyFigure::request(Fresco::Graphic::Requisition &r)
+void
+Berlin::FigureKit::PolyFigure::request(Fresco::Graphic::Requisition &r)
 {
     GraphicImpl::init_requisition(r);
     Impl_var<RegionImpl> region(new RegionImpl);
@@ -125,21 +127,21 @@
     CORBA::Long n = num_children();
     for (CORBA::Long i = 0; i != n && traversal->ok(); i++)
     {
-        Graphic_var child = _children[i].peer;
+        Graphic_var child = my_children[i].peer;
         if (CORBA::is_nil(child)) continue;
         try
         {
-            traversal->traverse_child(child, _children[i].localId,
+            traversal->traverse_child(child, my_children[i].localId,
                                       Region_var(my_bbox->_this()),
                                       Transform_var(my_tx->_this()));
         }
         catch (const CORBA::OBJECT_NOT_EXIST &)
         {
-            _children [i].peer = Fresco::Graphic::_nil ();
+            my_children [i].peer = Fresco::Graphic::_nil ();
         }
         catch (const CORBA::COMM_FAILURE &)
         {
-            _children [i].peer = Fresco::Graphic::_nil ();
+            my_children [i].peer = Fresco::Graphic::_nil ();
         }
     }
 }
@@ -166,13 +168,13 @@
     PolyGraphic::need_resize();
 }
 
-Berlin::FigureKit::UPolyFigure::UPolyFigure(const UPolyFigure &up) : PolyFigure(up) { }
+Berlin::FigureKit::UPolyFigure::UPolyFigure(const UPolyFigure &up) :
+    PolyFigure(up)
+{ }
 
 /*
  * FIXME !!!: implement this according to Fresco's comments
  *            in figures.idl: FigureKit::ugroup()
  */
 void Berlin::FigureKit::UPolyFigure::traverse(Traversal_ptr traversal)
-{
-    Trace trace("UPolyFigure::traverse");
-}
+{ Trace trace("UPolyFigure::traverse"); }

Index: PolyFigure.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/PolyFigure.hh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- PolyFigure.hh	9 Dec 2003 17:53:04 -0000	1.10
+++ PolyFigure.hh	29 Dec 2003 08:03:26 -0000	1.11
@@ -43,12 +43,14 @@
         virtual ~PolyFigure();
 
         virtual void request(Fresco::Graphic::Requisition &);
-        virtual void extension(const Fresco::Allocation::Info &, Fresco::Region_ptr);
+        virtual void extension(const Fresco::Allocation::Info &,
+			       Fresco::Region_ptr);
         virtual void traverse(Fresco::Traversal_ptr);
         virtual Fresco::Transform_ptr transformation();
         virtual void need_redraw();
         virtual void need_resize();
-        virtual void allocate(Fresco::Tag, const Fresco::Allocation::Info &);
+        virtual void allocate(Fresco::Tag,
+			      const Fresco::Allocation::Info &);
 
         /*
          * shameless hack !!!: eventually these settings are dealt with

Index: Transformer.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Figures/Transformer.cc,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Transformer.cc	9 Dec 2003 17:53:04 -0000	1.17
+++ Transformer.cc	29 Dec 2003 08:03:26 -0000	1.18
@@ -37,9 +37,10 @@
 
 using namespace Berlin::FigureKit;
 
-Transformer::Transformer() : my_transform(new TransformImpl) {}
-Transformer::~Transformer() {}
-Transform_ptr Transformer::transformation() { return my_transform->_this();}
+Transformer::Transformer() : my_transform(new TransformImpl) { }
+Transformer::~Transformer() { }
+Transform_ptr Transformer::transformation()
+{ return my_transform->_this(); }
 
 void Transformer::request(Fresco::Graphic::Requisition &requisition)
 {
@@ -93,7 +94,8 @@
 	    Fresco::Graphic::Requisition r;
 	    GraphicImpl::init_requisition(r);
 	    Allocator::request(r);
-	    Lease_var<TransformImpl> tx(Provider<TransformImpl>::provide());
+	    Lease_var<TransformImpl>
+		tx(Provider<TransformImpl>::provide());
 	    tx->load_identity();
 	    Vertex delta =
 		GraphicImpl::transform_allocate(*rr, r, Transform_var(my_transform->_this()));