[cairo-commit] cairomm/cairomm context.cc, 1.6, 1.7 context.h, 1.5, 1.6 fontface.cc, 1.2, 1.3 fontface.h, 1.2, 1.3

Murray Cumming commit at pdx.freedesktop.org
Sat Dec 17 07:21:26 PST 2005


Committed by: murrayc

Update of /cvs/cairo/cairomm/cairomm
In directory gabe:/tmp/cvs-serv17781/cairomm

Modified Files:
	context.cc context.h fontface.cc fontface.h 
Log Message:
2005-12-17  Murray Cumming  <murrayc at murrayc.com>

        * cairomm/context.cc:
        * cairomm/context.h: Change set_dash(void) to
        unset_dash(). Change rotate_deg() to
        rotate_degrees(). Change identity_matrix() to
        set_identity_matrix(). Change new_path() to
        clear_path().
        * cairomm/fontface.cc:
        * cairomm/fontface.h: Comment-out
        get/set_user_data(), because it seems useless.


Index: context.cc
===================================================================
RCS file: /cvs/cairo/cairomm/cairomm/context.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- context.cc	7 Dec 2005 15:36:44 -0000	1.6
+++ context.cc	17 Dec 2005 15:21:24 -0000	1.7
@@ -163,7 +163,7 @@
   check_object_status_and_throw_exception(*this);
 }
 
-void Context::set_dash()
+void Context::unset_dash()
 {
   cairo_set_dash(m_cobject, 0, 0, 0);
   check_object_status_and_throw_exception(*this);
@@ -187,15 +187,15 @@
   check_object_status_and_throw_exception(*this);
 }
 
-void Context::rotate(double angle)
+void Context::rotate(double angle_radians)
 {
-  cairo_rotate(m_cobject, angle);
+  cairo_rotate(m_cobject, angle_radians);
   check_object_status_and_throw_exception(*this);
 }
 
-void Context::rotate_deg(double angle)
+void Context::rotate_degrees(double angle_degrees)
 {
-  cairo_rotate(m_cobject, angle*M_PI/180.0);
+  cairo_rotate(m_cobject, angle_degrees * M_PI/180.0);
   check_object_status_and_throw_exception(*this);
 }
 
@@ -211,7 +211,7 @@
   check_object_status_and_throw_exception(*this);
 }
 
-void Context::identity_matrix()
+void Context::set_identity_matrix()
 {
   cairo_identity_matrix(m_cobject);
   check_object_status_and_throw_exception(*this);
@@ -241,7 +241,7 @@
   check_object_status_and_throw_exception(*this);
 }
 
-void Context::new_path()
+void Context::clear_path()
 {
   cairo_new_path(m_cobject);
   check_object_status_and_throw_exception(*this);

Index: context.h
===================================================================
RCS file: /cvs/cairo/cairomm/cairomm/context.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- context.h	7 Dec 2005 15:36:44 -0000	1.5
+++ context.h	17 Dec 2005 15:21:24 -0000	1.6
@@ -90,20 +90,20 @@
   void set_line_cap(LineCap line_cap);
   void set_line_join(LineJoin line_join);
   void set_dash(std::valarray<double>& dashes, double offset);
-  void set_dash();
+  void unset_dash();
   void set_miter_limit(double limit);
   void translate(double tx, double ty);
   void scale(double sx, double sy);
-  void rotate(double angle);
-  void rotate_deg(double angle);
+  void rotate(double angle_radians);
+  void rotate_degrees(double angle_degres);
   void transform(const Matrix& matrix);
   void set_matrix(const Matrix& matrix);
-  void identity_matrix();
+  void set_identity_matrix();
   void user_to_device(double& x, double& y);
   void user_to_device_distance(double& dx, double& dy);
   void device_to_user(double& x, double& y);
   void device_to_user_distance(double& dx, double& dy);
-  void new_path();
+  void clear_path();
   void move_to(double x, double y);
   void line_to(double x, double y);
   void curve_to(double x1, double y1, double x2, double y2, double x3, double y3);
@@ -116,8 +116,8 @@
   void close_path();
   void paint();
   void paint_with_alpha(double alpha);
-  void mask(Pattern& pattern); //Should the source be const?
-  void mask(Surface& surface, double surface_x, double surface_y); //TODO: Should the source be const?
+  void mask(Pattern& pattern);
+  void mask(Surface& surface, double surface_x, double surface_y);
   void stroke();
   void stroke_preserve();
   void fill();
@@ -131,7 +131,7 @@
   void reset_clip();
   void clip();
   void clip_preserve();
-  void select_font_face (const std::string& family, FontSlant slant, FontWeight weight);
+  void select_font_face(const std::string& family, FontSlant slant, FontWeight weight);
   void set_font_size(double size);
   void set_font_matrix(const Matrix& matrix);
   void get_font_matrix(Matrix& matrix) const;
@@ -144,7 +144,7 @@
   void get_text_extents(const std::string& utf8, TextExtents& extents) const;
   void get_glyph_extents(const std::vector<Glyph>& glyphs, TextExtents& extents) const;
   void text_path(const std::string& utf8);
-  void glyph_path(const std::vector<Glyph>& glyphs); //TODO: Is this an output parameter?
+  void glyph_path(const std::vector<Glyph>& glyphs);
   Operator get_operator() const;
   Pattern get_source() const;
   double get_tolerance() const;
@@ -161,6 +161,7 @@
   Surface get_target();
   const Surface get_target() const;
   
+  //TODO: Copy or reference-count a Path somethow instead of asking the caller to delete it?
   Path* copy_path() const;
   Path* copy_path_flat() const;
 

Index: fontface.cc
===================================================================
RCS file: /cvs/cairo/cairomm/cairomm/fontface.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fontface.cc	2 Dec 2005 14:05:17 -0000	1.2
+++ fontface.cc	17 Dec 2005 15:21:24 -0000	1.3
@@ -70,6 +70,7 @@
   return *this;
 }
 
+/*
 void* FontFace::get_user_data(const cairo_user_data_key_t *key)
 {
   void* result = cairo_font_face_get_user_data(m_cobject, key);
@@ -82,6 +83,7 @@
   const Status status = (Status)cairo_font_face_set_user_data(m_cobject, key, user_data, destroy);
   check_status_and_throw_exception(status);
 }
+*/
 
 
 } //namespace Cairo

Index: fontface.h
===================================================================
RCS file: /cvs/cairo/cairomm/cairomm/fontface.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fontface.h	2 Dec 2005 14:05:17 -0000	1.2
+++ fontface.h	17 Dec 2005 15:21:24 -0000	1.3
@@ -53,9 +53,11 @@
   */
   FontFace& operator=(const FontFace& src);
 
-  void *get_user_data(const cairo_user_data_key_t *key);
+  /* Don't wrap these until we know what they are good for.
+  void* get_user_data(const cairo_user_data_key_t *key);
 
   void set_user_data(const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); //TODO: Use a sigc::slot?
+  */
 
 
   typedef cairo_font_face_t cobject;



More information about the cairo-commit mailing list