summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2016-12-02 14:22:25 +0100
committerMurray Cumming <murrayc@murrayc.com>2016-12-02 14:25:36 +0100
commitc25afe9297eb20428ad30c3b45d2756378e4e3fe (patch)
treeaaf93683faf4f88dce448129df0414767cce5b55
parentb97d598766125a9a4f9d44fe068c9088ce98dcd8 (diff)
Remove deprecated API.
-rw-r--r--cairomm/context.cc45
-rw-r--r--cairomm/context.h75
-rw-r--r--cairomm/enums.h5
-rw-r--r--cairomm/pattern.cc10
-rw-r--r--cairomm/pattern.h12
-rw-r--r--cairomm/scaledfont.cc28
-rw-r--r--cairomm/scaledfont.h14
-rw-r--r--cairomm/surface.cc34
-rw-r--r--cairomm/surface.h12
-rw-r--r--cairomm/win32_surface.h4
10 files changed, 0 insertions, 239 deletions
diff --git a/cairomm/context.cc b/cairomm/context.cc
index 00631e7..c681cf3 100644
--- a/cairomm/context.cc
+++ b/cairomm/context.cc
@@ -159,23 +159,6 @@ void Context::set_line_join(LineJoin line_join)
check_object_status_and_throw_exception(*this);
}
-void Context::set_dash(std::valarray<double>& dashes, double offset)
-{
- std::vector<double> v(dashes.size());
- for(size_t i = 0; i < dashes.size(); ++i)
- v[i] = dashes[i];
-
- set_dash(v, offset);
-}
-
-void Context::set_dash(std::vector<double>& dashes, double offset)
-{
- cairo_set_dash(cobj(),
- (dashes.empty() ? 0 : &dashes[0]),
- dashes.size(), offset);
- check_object_status_and_throw_exception(*this);
-}
-
void Context::set_dash(const std::valarray<double>& dashes, double offset)
{
std::vector<double> v(dashes.size());
@@ -247,52 +230,24 @@ void Context::set_identity_matrix()
check_object_status_and_throw_exception(*this);
}
-//deprecated:
-void Context::user_to_device(double& x, double& y)
-{
- const Context* constThis = this;
- constThis->user_to_device(x, y);
-}
-
void Context::user_to_device(double& x, double& y) const
{
cairo_user_to_device(const_cast<cobject*>(cobj()), &x, &y);
check_object_status_and_throw_exception(*this);
}
-//deprecated:
-void Context::user_to_device_distance(double& dx, double& dy)
-{
- const Context* constThis = this;
- constThis->user_to_device_distance(dx, dy);
-}
-
void Context::user_to_device_distance(double& dx, double& dy) const
{
cairo_user_to_device_distance(const_cast<cobject*>(cobj()), &dx, &dy);
check_object_status_and_throw_exception(*this);
}
-//deprecated:
-void Context::device_to_user(double& x, double& y)
-{
- const Context* constThis = this;
- constThis->device_to_user(x, y);
-}
-
void Context::device_to_user(double& x, double& y) const
{
cairo_device_to_user(const_cast<cobject*>(cobj()), &x, &y);
check_object_status_and_throw_exception(*this);
}
-//deprecated:
-void Context::device_to_user_distance(double& dx, double& dy)
-{
- const Context* constThis = this;
- constThis->device_to_user_distance(dx, dy);
-}
-
void Context::device_to_user_distance(double& dx, double& dy) const
{
cairo_device_to_user_distance(const_cast<cobject*>(cobj()), &dx, &dy);
diff --git a/cairomm/context.h b/cairomm/context.h
index ec03046..dc8d8bd 100644
--- a/cairomm/context.h
+++ b/cairomm/context.h
@@ -260,37 +260,6 @@ public:
*/
void set_line_join(LineJoin line_join);
-#ifndef CAIROMM_DISABLE_DEPRECATED
- /**
- * Alternate version of set_dash(). You'll probably want to use the one that
- * takes a std::vector argument instead.
- *
- * @deprecated Instead use the version that takes a const dashes parameter.
- */
- void set_dash(std::valarray<double>& dashes, double offset);
-
- /** Sets the dash pattern to be used by stroke(). A dash pattern is specified
- * by dashes, an array of positive values. Each value provides the user-space
- * length of altenate "on" and "off" portions of the stroke. The offset
- * specifies an offset into the pattern at which the stroke begins.
- *
- * If dashes is empty dashing is disabled. If the size of dashes is 1, a
- * symmetric pattern is assumed with alternating on and off portions of the
- * size specified by the single value in dashes.
- *
- * It is invalid for any value in dashes to be negative, or for all values to
- * be 0. If this is the case, an exception will be thrown
- *
- * @param dashes an array specifying alternate lengths of on and off portions
- * @param offset an offset into the dash pattern at which the stroke should start
- *
- * @exception
- *
- * @deprecated Instead use the version that takes a const dashes parameter.
- */
- void set_dash(std::vector<double>& dashes, double offset);
-#endif //CAIROMM_DISABLE_DEPRECATED
-
/**
* Alternate version of set_dash(). You'll probably want to use the one that
* takes a std::vector argument instead.
@@ -413,50 +382,6 @@ public:
*/
void set_identity_matrix();
-#ifndef CAIROMM_DISABLE_DEPRECATED
- /** Transform a coordinate from user space to device space by multiplying the
- * given point by the current transformation matrix (CTM).
- *
- * @param x X value of coordinate (in/out parameter)
- * @param y Y value of coordinate (in/out parameter)
- *
- * @deprecated Use the const version.
- */
- void user_to_device(double& x, double& y);
-
- /** Transform a distance vector from user space to device space. This
- * function is similar to user_to_device() except that the translation
- * components of the CTM will be ignored when transforming (dx,dy).
- *
- * @param dx X component of a distance vector (in/out parameter)
- * @param dy Y component of a distance vector (in/out parameter)
- *
- * @deprecated Use the const version.
- */
- void user_to_device_distance(double& dx, double& dy);
-
- /** Transform a coordinate from device space to user space by multiplying the
- * given point by the inverse of the current transformation matrix (CTM).
- *
- * @param x X value of coordinate (in/out parameter)
- * @param y Y value of coordinate (in/out parameter)
- *
- * @deprecated Use the const version.
- */
- void device_to_user(double& x, double& y);
-
- /** Transform a distance vector from device space to user space. This
- * function is similar to device_to_user() except that the translation
- * components of the inverse CTM will be ignored when transforming (dx,dy).
- *
- * @param dx X component of a distance vector (in/out parameter)
- * @param dy Y component of a distance vector (in/out parameter)
- *
- * @deprecated Use the const version.
- */
- void device_to_user_distance(double& dx, double& dy);
-#endif //CAIROMM_DISABLE_DEPRECATED
-
/** Transform a coordinate from user space to device space by multiplying the
* given point by the current transformation matrix (CTM).
*
diff --git a/cairomm/enums.h b/cairomm/enums.h
index 548a7f3..2b43f6b 100644
--- a/cairomm/enums.h
+++ b/cairomm/enums.h
@@ -761,11 +761,6 @@ typedef enum
FONT_TYPE_WIN32 = CAIRO_FONT_TYPE_WIN32,
/**
- * @deprecated Use FONT_TYPE_QUARTZ instead.
- */
- FONT_TYPE_ATSUI = CAIRO_FONT_TYPE_QUARTZ,
-
- /**
* The font is of type Quartz
* @since 1.6
*/
diff --git a/cairomm/pattern.cc b/cairomm/pattern.cc
index 2eaf68b..e6ab2e6 100644
--- a/cairomm/pattern.cc
+++ b/cairomm/pattern.cc
@@ -161,16 +161,6 @@ SurfacePattern::~SurfacePattern()
{
}
-void SurfacePattern::set_extend(Extend extend)
-{
- Pattern::set_extend(extend);
-}
-
-Extend SurfacePattern::get_extend() const
-{
- return Pattern::get_extend();
-}
-
void SurfacePattern::set_filter(Filter filter)
{
cairo_pattern_set_filter(m_cobject, (cairo_filter_t)filter);
diff --git a/cairomm/pattern.h b/cairomm/pattern.h
index 613d165..cea7ed4 100644
--- a/cairomm/pattern.h
+++ b/cairomm/pattern.h
@@ -234,18 +234,6 @@ public:
*/
static RefPtr<SurfacePattern> create(const RefPtr<Surface>& surface);
-#ifndef CAIROMM_DISABLE_DEPRECATED
- /**
- * @deprecated Use Pattern::set_extend() instead.
- */
- void set_extend(Extend extend);
-
- /**
- *@deprecated Use Pattern::set_extend() instead.
- */
- Extend get_extend() const;
-#endif //CAIROMM_DISABLE_DEPRECATED
-
/**
* Sets the filter to be used for resizing when using this pattern.
* See Cairo::Filter for details on each filter.
diff --git a/cairomm/scaledfont.cc b/cairomm/scaledfont.cc
index 16420ea..46d970b 100644
--- a/cairomm/scaledfont.cc
+++ b/cairomm/scaledfont.cc
@@ -56,40 +56,12 @@ RefPtr<ScaledFont> ScaledFont::create(const RefPtr<FontFace>& font_face, const M
return RefPtr<ScaledFont>(new ScaledFont(font_face, font_matrix, ctm, options));
}
-void ScaledFont::extents(FontExtents& extents) const
-{
- get_extents(extents);
-}
-
void ScaledFont::get_extents(FontExtents& extents) const
{
cairo_scaled_font_extents(m_cobject, static_cast<cairo_font_extents_t*>(&extents));
check_object_status_and_throw_exception(*this);
}
-void ScaledFont::text_extents(const std::string& utf8, TextExtents& extents) const
-{
- cairo_scaled_font_text_extents(m_cobject, utf8.c_str(), static_cast<cairo_text_extents_t*>(&extents));
- check_object_status_and_throw_exception(*this);
-}
-
-void ScaledFont::glyph_extents(const std::vector<Glyph>& glyphs, TextExtents& extents)
-{
- // copy the data from the vector to a standard C array. I don't believe
- // this will be a frequently used function so I think the performance hit is
- // more than offset by the increased flexibility of the STL interface.
-
- // Use new to allocate memory as MSCV complains about non-const array size with
- // Glyph glyph_array[glyphs.size()]
- Glyph* glyph_array= new Glyph[glyphs.size()];
- std::copy(glyphs.begin(), glyphs.end(), glyph_array);
-
- cairo_scaled_font_glyph_extents(m_cobject, glyph_array, glyphs.size(),
- static_cast<cairo_text_extents_t*>(&extents));
- check_object_status_and_throw_exception(*this);
- delete[] glyph_array;
-}
-
RefPtr<FontFace> ScaledFont::get_font_face() const
{
auto face = cairo_scaled_font_get_font_face(m_cobject);
diff --git a/cairomm/scaledfont.h b/cairomm/scaledfont.h
index 0e10e5f..13cab49 100644
--- a/cairomm/scaledfont.h
+++ b/cairomm/scaledfont.h
@@ -100,11 +100,6 @@ public:
* */
void get_extents(FontExtents& extents) const;
- /** @deprecated Use get_extents() instead
- * @since 1.2
- * */
- void extents(FontExtents& extents) const;
-
/** Gets the extents for a string of text. The extents describe a user-space
* rectangle that encloses the "inked" portion of the text drawn at the origin
* (0,0) (as it would be drawn by Context::show_text() if the cairo graphics
@@ -126,10 +121,6 @@ public:
* @since 1.8
*/
void get_text_extents(const std::string& utf8, TextExtents& extents) const;
- /** @deprecated Use get_text_extents() instead
- * @since 1.2
- * */
- void text_extents(const std::string& utf8, TextExtents& extents) const;
/** Gets the extents for an array of glyphs. The extents describe a user-space
* rectangle that encloses the "inked" portion of the glyphs, (as they would
@@ -148,11 +139,6 @@ public:
**/
void get_glyph_extents(const std::vector<Glyph>& glyphs, TextExtents& extents);
- /** @deprecated Use get_glyph_extents() instead
- * @since 1.2
- * */
- void glyph_extents(const std::vector<Glyph>& glyphs, TextExtents& extents);
-
/** The FontFace with which this ScaledFont was created.
* @since 1.2
*/
diff --git a/cairomm/surface.cc b/cairomm/surface.cc
index bb85724..aee394e 100644
--- a/cairomm/surface.cc
+++ b/cairomm/surface.cc
@@ -232,12 +232,6 @@ void Surface::write_to_png_stream(const SlotWriteFunc& write_func)
slot_copy /*closure*/);
check_status_and_throw_exception(status);
}
-
-void Surface::write_to_png(cairo_write_func_t write_func, void *closure)
-{
- auto status = cairo_surface_write_to_png_stream(cobj(), write_func, closure);
- check_status_and_throw_exception(status);
-}
#endif
RefPtr<Device> Surface::get_device()
@@ -327,13 +321,6 @@ RefPtr<ImageSurface> ImageSurface::create_from_png_stream(const SlotReadFunc& re
return RefPtr<ImageSurface>(new ImageSurface(cobject, true /* has reference */));
}
-RefPtr<ImageSurface> ImageSurface::create_from_png(cairo_read_func_t read_func, void *closure)
-{
- auto cobject = cairo_image_surface_create_from_png_stream(read_func, closure);
- check_status_and_throw_exception(cairo_surface_status(cobject));
- return RefPtr<ImageSurface>(new ImageSurface(cobject, true /* has reference */));
-}
-
#endif // CAIRO_HAS_PNG_FUNCTIONS
int ImageSurface::get_width() const
@@ -441,13 +428,6 @@ RefPtr<PdfSurface> PdfSurface::create(std::string filename, double width_in_poin
return RefPtr<PdfSurface>(new PdfSurface(cobject, true /* has reference */));
}
-RefPtr<PdfSurface> PdfSurface::create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points)
-{
- auto cobject = cairo_pdf_surface_create_for_stream(write_func, closure, width_in_points, height_in_points);
- check_status_and_throw_exception(cairo_surface_status(cobject));
- return RefPtr<PdfSurface>(new PdfSurface(cobject, true /* has reference */));
-}
-
RefPtr<PdfSurface> PdfSurface::create_for_stream(const SlotWriteFunc& write_func, double
width_in_points, double height_in_points)
{
@@ -528,13 +508,6 @@ RefPtr<PsSurface> PsSurface::create_for_stream(const SlotWriteFunc& write_func,
return RefPtr<PsSurface>(new PsSurface(cobject, true /* has reference */));
}
-RefPtr<PsSurface> PsSurface::create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points)
-{
- auto cobject = cairo_ps_surface_create_for_stream(write_func, closure, width_in_points, height_in_points);
- check_status_and_throw_exception(cairo_surface_status(cobject));
- return RefPtr<PsSurface>(new PsSurface(cobject, true /* has reference */));
-}
-
void PsSurface::set_size(double width_in_points, double height_in_points)
{
cairo_ps_surface_set_size(cobj(), width_in_points, height_in_points);
@@ -637,13 +610,6 @@ RefPtr<SvgSurface> SvgSurface::create_for_stream(const SlotWriteFunc& write_func
return RefPtr<SvgSurface>(new SvgSurface(cobject, true /* has reference */));
}
-RefPtr<SvgSurface> SvgSurface::create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points)
-{
- auto cobject = cairo_svg_surface_create_for_stream(write_func, closure, width_in_points, height_in_points);
- check_status_and_throw_exception(cairo_surface_status(cobject));
- return RefPtr<SvgSurface>(new SvgSurface(cobject, true /* has reference */));
-}
-
void SvgSurface::restrict_to_version(SvgVersion version)
{
cairo_svg_surface_restrict_to_version(cobj(), static_cast<cairo_svg_version_t>(version));
diff --git a/cairomm/surface.h b/cairomm/surface.h
index ce3ba26..c5e3b19 100644
--- a/cairomm/surface.h
+++ b/cairomm/surface.h
@@ -346,9 +346,6 @@ public:
*/
void write_to_png_stream(const SlotWriteFunc& write_func);
- /** @deprecated Use write_to_png_stream instead */
- void write_to_png(cairo_write_func_t write_func, void *closure);
-
#endif // CAIRO_HAS_PNG_FUNCTIONS
/** This function returns the device for a surface
@@ -576,8 +573,6 @@ public:
* contents of the PNG image file.
*/
static RefPtr<ImageSurface> create_from_png_stream(const SlotReadFunc& read_func);
- /** @deprecated Use create_from_png_stream instead */
- static RefPtr<ImageSurface> create_from_png(cairo_read_func_t read_func, void *closure);
#endif // CAIRO_HAS_PNG_FUNCTIONS
@@ -738,8 +733,6 @@ public:
* @since 1.8
*/
static RefPtr<PdfSurface> create_for_stream(const SlotWriteFunc& write_func, double width_in_points, double height_in_points);
- /** @deprecated use PdfSurface::create_for_stream() instead */
- static RefPtr<PdfSurface> create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points);
/**
* Changes the size of a PDF surface for the current (and subsequent) pages.
@@ -841,8 +834,6 @@ public:
* @since 1.8
*/
static RefPtr<PsSurface> create_for_stream(const SlotWriteFunc& write_func, double width_in_points, double height_in_points);
- /** @deprecated use PsSurface::create_for_stream() instead */
- static RefPtr<PsSurface> create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points);
/**
* Changes the size of a PostScript surface for the current (and
@@ -998,9 +989,6 @@ public:
*/
static RefPtr<SvgSurface> create_for_stream(const SlotWriteFunc& write_func, double width_in_points, double height_in_points);
- /** @deprecated Use SvgSurface::create_for_stream() instead */
- static RefPtr<SvgSurface> create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points);
-
/**
* Restricts the generated SVG file to the given version. See get_versions()
* for a list of available version values that can be used here.
diff --git a/cairomm/win32_surface.h b/cairomm/win32_surface.h
index e8dae37..2e35b9a 100644
--- a/cairomm/win32_surface.h
+++ b/cairomm/win32_surface.h
@@ -84,10 +84,6 @@ public:
*/
static RefPtr<Win32Surface> create(HDC hdc);
- /**
- * @deprecated use create_with_dib()
- */
- static RefPtr<Win32Surface> create(Format format, int width, int height);
/** Creates a device-independent-bitmap surface not associated with any
* particular existing surface or device context. The created bitmap will be
* unititialized.