[goocanvas/new-api] Minor fixes to get it to compile.
- From: Damon Chaplin <damon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvas/new-api] Minor fixes to get it to compile.
- Date: Mon, 10 Oct 2011 14:55:50 +0000 (UTC)
commit 91a5ae5a677478773ab7fd10dbb99e28166a0bf6
Author: Damon Chaplin <damon gnome org>
Date: Mon Oct 10 15:56:20 2011 +0100
Minor fixes to get it to compile.
.gitignore | 5 +++++
docs/goocanvas-sections.txt | 2 +-
src/goocanvasimage.c | 10 +++++-----
src/goocanvastext.c | 23 ++++++++++-------------
4 files changed, 21 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b877ed1..40cddd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@
*.loT
*.la
*.gmo
+*.orig
+*.rej
*~
Makefile
@@ -41,6 +43,7 @@ Makefile.in
/ltmain.sh
/missing
/mkinstalldirs
+/py-compile
/po/POTFILES
/po/Makefile.in.in
/src/goocanvasenumtypes.c
@@ -49,6 +52,8 @@ Makefile.in
/src/goocanvasmarshal.h
/src/stamp-goocanvasenumtypes.h
/src/stamp-goocanvasmarshal.h
+/src/GooCanvas-2.0.gir
+/src/GooCanvas-2.0.typelib
/stamp-h1
/docs/goocanvas-decl-list.txt
/docs/goocanvas-decl.txt
diff --git a/docs/goocanvas-sections.txt b/docs/goocanvas-sections.txt
index aea2942..8c58ad9 100644
--- a/docs/goocanvas-sections.txt
+++ b/docs/goocanvas-sections.txt
@@ -284,7 +284,7 @@ GOO_IS_CANVAS_POLYLINE_CLASS
GOO_CANVAS_POLYLINE_GET_CLASS
<SUBSECTION Private>
-NUM_ARROW_POINTS
+GOO_CANVAS_POLYLINE_NUM_ARROW_POINTS
GooCanvasPolylineArrowData
GooCanvasPolylineClass
</SECTION>
diff --git a/src/goocanvasimage.c b/src/goocanvasimage.c
index 6120297..f494507 100644
--- a/src/goocanvasimage.c
+++ b/src/goocanvasimage.c
@@ -73,7 +73,7 @@ goo_canvas_image_convert_pixbuf_sizes (GooCanvasImage *image)
{
const double original_width = image->width;
- GooCanvas *canvas = goo_canvas_item_get_canvas (GOO_CANVAS_ITEM (item));
+ GooCanvas *canvas = goo_canvas_item_get_canvas (GOO_CANVAS_ITEM (image));
if (canvas)
{
goo_canvas_convert_units_from_pixels (canvas,
@@ -333,16 +333,16 @@ goo_canvas_image_paint (GooCanvasItemSimple *simple,
cairo_matrix_scale (&matrix, width / image->width,
height / image->height);
}
- } else if (priv->scale_to_units && (priv->scale_to_units != 1.0f))
+ } else if (image->scale_to_units && (image->scale_to_units != 1.0f))
{
/* Scale the image to fit the size in units.
We have already scaled the width and height numbers. */
- if (cairo_pattern_get_surface (image_data->pattern, &surface)
+ if (cairo_pattern_get_surface (image->pattern, &surface)
== CAIRO_STATUS_SUCCESS
&& cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE)
{
- cairo_matrix_scale (&matrix, priv->scale_to_units,
- priv->scale_to_units);
+ cairo_matrix_scale (&matrix, image->scale_to_units,
+ image->scale_to_units);
}
}
diff --git a/src/goocanvastext.c b/src/goocanvastext.c
index cf285f9..1fb6f0a 100644
--- a/src/goocanvastext.c
+++ b/src/goocanvastext.c
@@ -618,23 +618,21 @@ goo_canvas_text_get_requested_area_for_width (GooCanvasItem *item,
GooCanvasBounds *requested_area)
{
GooCanvasItemSimple *simple = (GooCanvasItemSimple*) item;
- GooCanvasItemSimpleData *simple_data = simple->simple_data;
GooCanvasText *text = (GooCanvasText*) item;
- GooCanvasTextPrivate *priv = goo_canvas_text_get_private (text);
PangoLayout *layout;
cairo_matrix_t matrix;
double x_offset, y_offset;
/* If we have a transformation besides a simple scale & translation, just
return -1 as we can't adjust the height in that case. */
- if (simple_data->clip_path_commands
- || (simple_data->transform && (simple_data->transform->xy != 0.0
- || simple_data->transform->yx != 0.0)))
+ if (simple->clip_path_commands
+ || (simple->transform && (simple->transform->xy != 0.0
+ || simple->transform->yx != 0.0)))
return FALSE;
cairo_save (cr);
- if (simple_data->transform)
- cairo_transform (cr, simple_data->transform);
+ if (simple->transform)
+ cairo_transform (cr, simple->transform);
/* Remove any current translation, to avoid the 16-bit cairo limit. */
cairo_get_matrix (cr, &matrix);
@@ -646,18 +644,17 @@ goo_canvas_text_get_requested_area_for_width (GooCanvasItem *item,
/* Convert the width from the parent's coordinate space. Note that we only
need to support a simple scale operation here. */
text->layout_width = width;
- if (simple_data->transform)
- text->layout_width /= simple_data->transform->xx;
+ if (simple->transform)
+ text->layout_width /= simple->transform->xx;
/* Create layout with given width. */
- layout = goo_canvas_text_create_layout (simple_data, text->text_data,
- text->layout_width, cr,
+ layout = goo_canvas_text_create_layout (text, text->layout_width, cr,
&simple->bounds, NULL, NULL);
g_object_unref (layout);
/* If the height is set, use that. */
- if (priv->height > 0.0)
- simple->bounds.y2 = simple->bounds.y1 + priv->height;
+ if (text->height > 0.0)
+ simple->bounds.y2 = simple->bounds.y1 + text->height;
/* Convert to device space. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]