[dia] Remove unused *_simple_draw() implementations
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Remove unused *_simple_draw() implementations
- Date: Sun, 29 Jul 2012 20:48:31 +0000 (UTC)
commit 49a039acfa8c56680255898213dfcfe25a59da7d
Author: Hans Breuer <hans breuer org>
Date: Sun Jul 22 20:45:03 2012 +0200
Remove unused *_simple_draw() implementations
lib/bezier_conn.c | 38 --------------------------------------
lib/bezier_conn.h | 2 --
lib/orth_conn.c | 27 ---------------------------
lib/orth_conn.h | 2 --
lib/poly_conn.c | 20 --------------------
lib/poly_conn.h | 1 -
lib/polyshape.c | 20 --------------------
lib/polyshape.h | 1 -
8 files changed, 0 insertions(+), 111 deletions(-)
---
diff --git a/lib/bezier_conn.c b/lib/bezier_conn.c
index 156cc91..26aad04 100644
--- a/lib/bezier_conn.c
+++ b/lib/bezier_conn.c
@@ -711,44 +711,6 @@ bezierconn_update_boundingbox(BezierConn *bez)
&bez->object.bounding_box);
}
-/** Draw the main line of a bezier conn.
- * Note that this sets the linestyle, linejoin and linecaps to hardcoded
- * values.
- * @param bez The bezier conn to draw.
- * @param renderer The renderer to draw with.
- * @param width The linewidth of the bezier.
- */
-void
-bezierconn_simple_draw(BezierConn *bez, DiaRenderer *renderer, real width)
-{
- BezPoint *points;
-
- g_assert(bez != NULL);
- g_assert(renderer != NULL);
-
- points = &bez->points[0];
-
- DIA_RENDERER_GET_CLASS(renderer)->set_linewidth(renderer, width);
- DIA_RENDERER_GET_CLASS(renderer)->set_linestyle(renderer, LINESTYLE_SOLID);
- DIA_RENDERER_GET_CLASS(renderer)->set_linejoin(renderer, LINEJOIN_ROUND);
- DIA_RENDERER_GET_CLASS(renderer)->set_linecaps(renderer, LINECAPS_BUTT);
-
- if (DIA_RENDERER_GET_CLASS(renderer)->is_capable_to(renderer, RENDER_HOLES)) {
- DIA_RENDERER_GET_CLASS(renderer)->draw_bezier(renderer, points, bez->numpoints, &color_black);
- } else {
- int i, from = 0, len;
-
- do {
- for (i = from+1; i < bez->numpoints; ++i)
- if (points[i].type == BEZ_MOVE_TO)
- break;
- len = i - from;
- DIA_RENDERER_GET_CLASS(renderer)->draw_bezier(renderer, &points[from], len, &color_black);
- from += len;
- } while (from < bez->numpoints);
- }
-}
-
/** Draw the control lines from the points of the bezier conn.
* Note that the control lines are hardcoded to be dotted with dash length 1.
* @param bez The bezier conn to draw control lines for.
diff --git a/lib/bezier_conn.h b/lib/bezier_conn.h
index 30d56d2..07ea9aa 100644
--- a/lib/bezier_conn.h
+++ b/lib/bezier_conn.h
@@ -47,8 +47,6 @@ struct _BezierConn {
void bezierconn_update_data(BezierConn *bez);
void bezierconn_update_boundingbox(BezierConn *bez);
-void bezierconn_simple_draw(BezierConn *bez, DiaRenderer *renderer,
- real width);
void bezierconn_draw_control_lines(BezierConn *bez, DiaRenderer *renderer);
void bezierconn_init(BezierConn *bez, int num_points);
void bezierconn_set_points(BezierConn *poly, int num_points, BezPoint *points);
diff --git a/lib/orth_conn.c b/lib/orth_conn.c
index 53eee96..c41d7b0 100644
--- a/lib/orth_conn.c
+++ b/lib/orth_conn.c
@@ -404,33 +404,6 @@ orthconn_update_boundingbox(OrthConn *orth)
&orth->object.bounding_box);
}
-void
-orthconn_simple_draw(OrthConn *orth, DiaRenderer *renderer, real width)
-{
- Point *points;
-
- assert(orth != NULL);
- assert(renderer != NULL);
-
- if (!orth->points) {
- g_warning("very sick OrthConn object...");
- return;
- }
-
- /* When not autorouting, need to take gap into account here. */
- points = &orth->points[0];
-
- DIA_RENDERER_GET_CLASS(renderer)->set_linewidth(renderer, width);
- DIA_RENDERER_GET_CLASS(renderer)->set_linestyle(renderer, LINESTYLE_SOLID);
- DIA_RENDERER_GET_CLASS(renderer)->set_linejoin(renderer, LINEJOIN_MITER);
- DIA_RENDERER_GET_CLASS(renderer)->set_linecaps(renderer, LINECAPS_BUTT);
-
- DIA_RENDERER_GET_CLASS(renderer)->draw_polyline(renderer, points,
- orth->numpoints,
- &color_black);
-}
-
-
int
orthconn_can_delete_segment(OrthConn *orth, Point *clickedpoint)
{
diff --git a/lib/orth_conn.h b/lib/orth_conn.h
index f808490..6bd42b8 100644
--- a/lib/orth_conn.h
+++ b/lib/orth_conn.h
@@ -60,8 +60,6 @@ struct _OrthConn {
void orthconn_update_data(OrthConn *orth);
void orthconn_update_boundingbox(OrthConn *orth);
-void orthconn_simple_draw(OrthConn *orth, DiaRenderer *renderer,
- real width);
void orthconn_init(OrthConn *orth, Point *startpoint);
void orthconn_destroy(OrthConn *orth);
void orthconn_set_points(OrthConn *orth, int num_points, Point *points);
diff --git a/lib/poly_conn.c b/lib/poly_conn.c
index 301b465..35f0962 100644
--- a/lib/poly_conn.c
+++ b/lib/poly_conn.c
@@ -324,26 +324,6 @@ polyconn_update_boundingbox(PolyConn *poly)
}
void
-polyconn_simple_draw(PolyConn *poly, DiaRenderer *renderer, real width)
-{
- Point *points;
-
- assert(poly != NULL);
- assert(renderer != NULL);
-
- points = &poly->points[0];
-
- DIA_RENDERER_GET_CLASS(renderer)->set_linewidth(renderer, width);
- DIA_RENDERER_GET_CLASS(renderer)->set_linestyle(renderer, LINESTYLE_SOLID);
- DIA_RENDERER_GET_CLASS(renderer)->set_linejoin(renderer, LINEJOIN_ROUND);
- DIA_RENDERER_GET_CLASS(renderer)->set_linecaps(renderer, LINECAPS_BUTT);
-
- DIA_RENDERER_GET_CLASS(renderer)->draw_polyline(renderer, points, poly->numpoints,
- &color_black);
-}
-
-
-void
polyconn_init(PolyConn *poly, int num_points)
{
DiaObject *obj;
diff --git a/lib/poly_conn.h b/lib/poly_conn.h
index 03ba71a..d65fb83 100644
--- a/lib/poly_conn.h
+++ b/lib/poly_conn.h
@@ -40,7 +40,6 @@ struct _PolyConn {
void polyconn_update_data(PolyConn *poly);
void polyconn_update_boundingbox(PolyConn *poly);
-void polyconn_simple_draw(PolyConn *poly, DiaRenderer *renderer, real width);
void polyconn_init(PolyConn *poly, int num_points);
void polyconn_set_points(PolyConn *poly, int num_points, Point *points);
void polyconn_destroy(PolyConn *poly);
diff --git a/lib/polyshape.c b/lib/polyshape.c
index 8f3fb0d..5556f3c 100644
--- a/lib/polyshape.c
+++ b/lib/polyshape.c
@@ -382,26 +382,6 @@ polyshape_update_boundingbox(PolyShape *poly)
}
void
-polyshape_simple_draw(PolyShape *poly, DiaRenderer *renderer, real width)
-{
- Point *points;
-
- assert(poly != NULL);
- assert(renderer != NULL);
-
- points = &poly->points[0];
-
- DIA_RENDERER_GET_CLASS(renderer)->set_linewidth(renderer, width);
- DIA_RENDERER_GET_CLASS(renderer)->set_linestyle(renderer, LINESTYLE_SOLID);
- DIA_RENDERER_GET_CLASS(renderer)->set_linejoin(renderer, LINEJOIN_ROUND);
- DIA_RENDERER_GET_CLASS(renderer)->set_linecaps(renderer, LINECAPS_BUTT);
-
- DIA_RENDERER_GET_CLASS(renderer)->draw_polygon(renderer, points, poly->numpoints,
- &color_black);
-}
-
-
-void
polyshape_init(PolyShape *poly, int num_points)
{
DiaObject *obj;
diff --git a/lib/polyshape.h b/lib/polyshape.h
index d478584..ea2a79b 100644
--- a/lib/polyshape.h
+++ b/lib/polyshape.h
@@ -39,7 +39,6 @@ struct _PolyShape {
void polyshape_update_data(PolyShape *poly);
void polyshape_update_boundingbox(PolyShape *poly);
-void polyshape_simple_draw(PolyShape *poly, DiaRenderer *renderer, real width);
void polyshape_init(PolyShape *poly, int num_points);
void polyshape_set_points(PolyShape *poly, int num_points, Point *points);
void polyshape_destroy(PolyShape *poly);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]