diff options
author | Murray Cumming <murrayc@murrayc.com> | 2005-12-17 15:21:24 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2005-12-17 15:21:24 +0000 |
commit | ffb7003199d215e5611c0f14b8f97d4b22205464 (patch) | |
tree | 262c09c18d3bc67aeae1aaf3b52626d79ceaa21f | |
parent | d16d199da9b510d80d0b27a4b117213ab008d07d (diff) |
2005-12-17 Murray Cumming <murrayc@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.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | NEWS | 14 | ||||
-rw-r--r-- | cairomm/context.cc | 14 | ||||
-rw-r--r-- | cairomm/context.h | 19 | ||||
-rw-r--r-- | cairomm/fontface.cc | 2 | ||||
-rw-r--r-- | cairomm/fontface.h | 4 | ||||
-rw-r--r-- | configure.in | 4 |
7 files changed, 52 insertions, 19 deletions
@@ -1,3 +1,17 @@ +2005-12-17 Murray Cumming <murrayc@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. + +0.3.0: + 2005-12-08 Murray Cumming <murrayc@murrayc.com> * cairomm/pattern.cc: @@ -0,0 +1,14 @@ +0.3.0: + +* Context: + - Change mask_surface() to mask() and + set_source_surface() to set_source(). + - Add typedef for Matrix, but a real Matrix + class would be nice. +* Pattern: Created hierarchy of classes. +* Check for errors in constructors. +* Exception: Rename to logic_error, and throw + std::bad_alloc or std::io_base::failure instead + when appropriate. + (Murray Cumming) + diff --git a/cairomm/context.cc b/cairomm/context.cc index bb83da5..3871fe8 100644 --- a/cairomm/context.cc +++ b/cairomm/context.cc @@ -163,7 +163,7 @@ void Context::set_dash(std::valarray<double>& dashes, double offset) 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 @@ void Context::scale(double sx, double sy) 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 @@ void Context::set_matrix(const Matrix& matrix) 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 @@ void Context::device_to_user_distance(double& dx, double& dy) 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); diff --git a/cairomm/context.h b/cairomm/context.h index 54f37c2..4135dea 100644 --- a/cairomm/context.h +++ b/cairomm/context.h @@ -90,20 +90,20 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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; diff --git a/cairomm/fontface.cc b/cairomm/fontface.cc index 0d4ff0a..5580a4d 100644 --- a/cairomm/fontface.cc +++ b/cairomm/fontface.cc @@ -70,6 +70,7 @@ FontFace& FontFace::operator=(const FontFace& src) 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 @@ void FontFace::set_user_data(const cairo_user_data_key_t* key, void *user_data, const Status status = (Status)cairo_font_face_set_user_data(m_cobject, key, user_data, destroy); check_status_and_throw_exception(status); } +*/ } //namespace Cairo diff --git a/cairomm/fontface.h b/cairomm/fontface.h index 23e0cd2..feb152f 100644 --- a/cairomm/fontface.h +++ b/cairomm/fontface.h @@ -53,9 +53,11 @@ public: */ 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; diff --git a/configure.in b/configure.in index 247aa19..0e11719 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ AC_INIT(cairomm/cairomm.h) #release versioning GENERIC_MAJOR_VERSION=0 -GENERIC_MINOR_VERSION=2 +GENERIC_MINOR_VERSION=3 GENERIC_MICRO_VERSION=0 GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION AC_SUBST(GENERIC_MAJOR_VERSION) @@ -11,7 +11,7 @@ AC_SUBST(GENERIC_MICRO_VERSION) AC_SUBST(GENERIC_VERSION) #shared library versioning -GENERIC_LIBRARY_VERSION=0:2:0 +GENERIC_LIBRARY_VERSION=0:3:0 # | | | # +------+ | +---+ # | | | |