[librsvg] set proper mode-line and fix indent.
- From: Hiroyuki Ikezoe <hiikezoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] set proper mode-line and fix indent.
- Date: Fri, 30 Apr 2010 12:03:21 +0000 (UTC)
commit 7ebac427d0e9042ceb0c8b894106e8c56f04fad4
Author: Hiroyuki Ikezoe <hiikezoe gnome org>
Date: Fri Apr 30 21:03:00 2010 +0900
set proper mode-line and fix indent.
rsvg-structure.c | 14 ++++++------
rsvg-structure.h | 19 +++++++++--------
rsvg-text.c | 59 +++++++++++++++++++++++++++--------------------------
rsvg-text.h | 3 +-
4 files changed, 49 insertions(+), 46 deletions(-)
---
diff --git a/rsvg-structure.c b/rsvg-structure.c
index 287fada..1c1ec06 100644
--- a/rsvg-structure.c
+++ b/rsvg-structure.c
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
/*
rsvg-structure.c: Rsvg's structual elements
@@ -104,7 +105,7 @@ _rsvg_node_dont_set_atts (RsvgNode * node, RsvgHandle * ctx, RsvgPropertyBag * a
void
_rsvg_node_init (RsvgNode * self)
{
- self->parent = NULL;
+ self->parent = NULL;
self->children = g_ptr_array_new ();
self->state = g_new (RsvgState, 1);
rsvg_state_init (self->state);
@@ -125,7 +126,6 @@ _rsvg_node_finalize (RsvgNode * self)
g_ptr_array_free (self->children, TRUE);
if (self->type != NULL)
g_string_free (self->type, TRUE);
-
}
void
@@ -347,10 +347,10 @@ rsvg_node_svg_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * att
svg->w = _rsvg_css_parse_length (value);
if ((value = rsvg_property_bag_lookup (atts, "height")))
svg->h = _rsvg_css_parse_length (value);
- /*
- * x & y attributes have no effect on outermost svg
- * http://www.w3.org/TR/SVG/struct.html#SVGElement
- */
+ /*
+ * x & y attributes have no effect on outermost svg
+ * http://www.w3.org/TR/SVG/struct.html#SVGElement
+ */
if (self->parent && (value = rsvg_property_bag_lookup (atts, "x")))
svg->x = _rsvg_css_parse_length (value);
if (self->parent && (value = rsvg_property_bag_lookup (atts, "y")))
diff --git a/rsvg-structure.h b/rsvg-structure.h
index f10772d..d672977 100644
--- a/rsvg-structure.h
+++ b/rsvg-structure.h
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
/*
rsvg-structure.h: Rsvg's structual elements
@@ -72,15 +73,15 @@ struct _RsvgNodeSvg {
GdkPixbuf *img;
};
-void rsvg_pop_def_group (RsvgHandle * ctx);
-void rsvg_node_group_pack (RsvgNode * self, RsvgNode * child);
+void rsvg_pop_def_group (RsvgHandle * ctx);
+void rsvg_node_group_pack (RsvgNode * self, RsvgNode * child);
-void rsvg_node_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate);
-void _rsvg_node_draw_children (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate);
-void _rsvg_node_finalize (RsvgNode * self);
-void _rsvg_node_free (RsvgNode * self);
-void _rsvg_node_init (RsvgNode * self);
-void _rsvg_node_svg_apply_atts (RsvgNodeSvg * self, RsvgHandle * ctx);
+void rsvg_node_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate);
+void _rsvg_node_draw_children (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate);
+void _rsvg_node_finalize (RsvgNode * self);
+void _rsvg_node_free (RsvgNode * self);
+void _rsvg_node_init (RsvgNode * self);
+void _rsvg_node_svg_apply_atts (RsvgNodeSvg * self, RsvgHandle * ctx);
G_END_DECLS
diff --git a/rsvg-text.c b/rsvg-text.c
index 224f62d..3fc2dd6 100644
--- a/rsvg-text.c
+++ b/rsvg-text.c
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
/*
rsvg-text.c: Text handling routines for RSVG
@@ -104,30 +105,30 @@ _rsvg_text_chomp (RsvgState *state, GString * in, gboolean * lastwasspace)
guint i;
out = g_string_new (in->str);
- if (!state->space_preserve) {
- for (i = 0; i < out->len;) {
- if (out->str[i] == '\n')
- g_string_erase (out, i, 1);
- else
- i++;
- }
-
- for (i = 0; i < out->len; i++)
- if (out->str[i] == '\t')
- out->str[i] = ' ';
-
- for (i = 0; i < out->len;) {
- if (out->str[i] == ' ' && *lastwasspace)
- g_string_erase (out, i, 1);
- else {
- if (out->str[i] == ' ')
- *lastwasspace = TRUE;
- else
- *lastwasspace = FALSE;
- i++;
- }
- }
- }
+ if (!state->space_preserve) {
+ for (i = 0; i < out->len;) {
+ if (out->str[i] == '\n')
+ g_string_erase (out, i, 1);
+ else
+ i++;
+ }
+
+ for (i = 0; i < out->len; i++)
+ if (out->str[i] == '\t')
+ out->str[i] = ' ';
+
+ for (i = 0; i < out->len;) {
+ if (out->str[i] == ' ' && *lastwasspace)
+ g_string_erase (out, i, 1);
+ else {
+ if (out->str[i] == ' ')
+ *lastwasspace = TRUE;
+ else
+ *lastwasspace = FALSE;
+ i++;
+ }
+ }
+ }
return out;
}
@@ -790,7 +791,7 @@ rsvg_text_render_vectors (PangoFont * font,
face = pango_ft2_font_get_face (font);
if (0 != FT_Load_Glyph (face, (FT_UInt) pango_glyph, flags))
- return;
+ return;
if (0 != FT_Get_Glyph (face->glyph, &glyph))
return;
@@ -937,9 +938,9 @@ rsvg_text_render_text (RsvgDrawingCtx * ctx, const char *text, gdouble * x, gdou
state = rsvg_state_current (ctx);
- /* Do not render the text if the font size is zero. See bug #581491. */
- if (state->font_size.length == 0)
- return;
+ /* Do not render the text if the font size is zero. See bug #581491. */
+ if (state->font_size.length == 0)
+ return;
context = ctx->render->create_pango_context (ctx);
layout = rsvg_text_create_layout (ctx, state, text, context);
diff --git a/rsvg-text.h b/rsvg-text.h
index 7cb0890..a8409be 100644
--- a/rsvg-text.h
+++ b/rsvg-text.h
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
/*
rsvg-text.h: Text handling routines for RSVG
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]