Code

whitespace
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 24 Jun 2008 21:37:50 +0000 (21:37 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 24 Jun 2008 21:37:50 +0000 (21:37 +0000)
src/display/canvas-arena.cpp
src/display/sp-canvas.cpp

index 86d1abe3adaf6478fad566723ce7bdcc024e0051..e06c2a3b070c25905072942fbe8a3205f27eb4e8 100644 (file)
@@ -201,29 +201,29 @@ sp_canvas_arena_render (SPCanvasItem *item, SPCanvasBuf *buf)
     bh = buf->rect.y1 - buf->rect.y0;
     if ((bw < 1) || (bh < 1)) return;
 
-            NRRectL area;
-            NRPixBlock cb;
+    NRRectL area;
+    NRPixBlock cb;
 
-            area.x0 = buf->rect.x0;
-            area.y0 = buf->rect.y0;
-            area.x1 = buf->rect.x1;
-            area.y1 = buf->rect.y1;
+    area.x0 = buf->rect.x0;
+    area.y0 = buf->rect.y0;
+    area.x1 = buf->rect.x1;
+    area.y1 = buf->rect.y1;
 
-            nr_pixblock_setup_extern (&cb, NR_PIXBLOCK_MODE_R8G8B8A8P, area.x0, area.y0, area.x1, area.y1,
-                                      buf->buf,
-                                      buf->buf_rowstride,
-                                      FALSE, FALSE);
+    nr_pixblock_setup_extern (&cb, NR_PIXBLOCK_MODE_R8G8B8A8P, area.x0, area.y0, area.x1, area.y1,
+                              buf->buf,
+                              buf->buf_rowstride,
+                              FALSE, FALSE);
 
-            cb.visible_area = buf->visible_rect;
-            cairo_t *ct = nr_create_cairo_context (&area, &cb);
-            nr_arena_item_invoke_render (ct, arena->root, &area, &cb, 0);
+    cb.visible_area = buf->visible_rect;
+    cairo_t *ct = nr_create_cairo_context (&area, &cb);
+    nr_arena_item_invoke_render (ct, arena->root, &area, &cb, 0);
 
-                cairo_surface_t *cst = cairo_get_target(ct);
-                cairo_destroy (ct);
-                cairo_surface_finish (cst);
-                cairo_surface_destroy (cst);
+    cairo_surface_t *cst = cairo_get_target(ct);
+    cairo_destroy (ct);
+    cairo_surface_finish (cst);
+    cairo_surface_destroy (cst);
 
-            nr_pixblock_release (&cb);
+    nr_pixblock_release (&cb);
 }
 
 static double
index 4ac8df5a29ada09c0c1ee6a101c71bb0bbbbed09..104172b63a9a3f6df465492ff651b87d63f59f63 100644 (file)
@@ -1641,18 +1641,18 @@ sp_canvas_paint_single_buffer (SPCanvas *canvas, int x0, int y0, int x1, int y1,
 
 #ifdef CANVAS_OUTPUT_VIA_CAIRO
 
-    buf.cst = cairo_image_surface_create_for_data (
-        buf.buf,
-        CAIRO_FORMAT_ARGB32,  // unpacked, i.e. 32 bits! one byte is unused
-        x1 - x0, y1 - y0,
-        buf.buf_rowstride
-        );
-    cairo_t *window_ct = gdk_cairo_create(SP_CANVAS_WINDOW (canvas));
-    cairo_set_source_surface (window_ct, buf.cst, x0 - canvas->x0, y0 - canvas->y0);
-    cairo_paint (window_ct);
-    cairo_destroy (window_ct);
-    cairo_surface_finish (buf.cst);
-    cairo_surface_destroy (buf.cst);
+        buf.cst = cairo_image_surface_create_for_data (
+            buf.buf,
+            CAIRO_FORMAT_ARGB32,  // unpacked, i.e. 32 bits! one byte is unused
+            x1 - x0, y1 - y0,
+            buf.buf_rowstride
+            );
+        cairo_t *window_ct = gdk_cairo_create(SP_CANVAS_WINDOW (canvas));
+        cairo_set_source_surface (window_ct, buf.cst, x0 - canvas->x0, y0 - canvas->y0);
+        cairo_paint (window_ct);
+        cairo_destroy (window_ct);
+        cairo_surface_finish (buf.cst);
+        cairo_surface_destroy (buf.cst);
 
 #else
 
@@ -1661,9 +1661,9 @@ sp_canvas_paint_single_buffer (SPCanvas *canvas, int x0, int y0, int x1, int y1,
 
         NRPixBlock b4;
         nr_pixblock_setup_extern (&b4, NR_PIXBLOCK_MODE_R8G8B8A8P, x0, y0, x1, y1,
-                                      buf.buf,
-                                      buf.buf_rowstride,
-                                      FALSE, FALSE);
+                                  buf.buf,
+                                  buf.buf_rowstride,
+                                  FALSE, FALSE);
 
         // this does the 32->24 squishing, using an assembler routine:
         nr_blit_pixblock_pixblock (&b3, &b4);
@@ -1679,9 +1679,7 @@ sp_canvas_paint_single_buffer (SPCanvas *canvas, int x0, int y0, int x1, int y1,
 
         nr_pixblock_release (&b3);
         nr_pixblock_release (&b4);
-
 #endif
-
     }
 
     cairo_surface_t *cst = cairo_get_target(buf.ct);