Author: spouliot
Date: 2006-03-23 14:04:59 -0500 (Thu, 23 Mar 2006)
New Revision: 58376
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/lineargradientbrush.c
Log:
lineargradientbrush.c: Don't lose the original context 'ct' when flipping and
free the new context. Remove obsoleted comments.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2006-03-23 18:52:27 UTC (rev 58375)
+++ trunk/libgdiplus/src/ChangeLog 2006-03-23 19:04:59 UTC (rev 58376)
@@ -1,3 +1,8 @@
+2006-03-23 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * lineargradientbrush.c: Don't lose the original context 'ct' when
+ flipping and free the new context. Remove obsoleted comments.
+
2006-03-22 Peter Dennis Bartok <[EMAIL PROTECTED]>
* font.c:
Modified: trunk/libgdiplus/src/lineargradientbrush.c
===================================================================
--- trunk/libgdiplus/src/lineargradientbrush.c 2006-03-23 18:52:27 UTC (rev
58375)
+++ trunk/libgdiplus/src/lineargradientbrush.c 2006-03-23 19:04:59 UTC (rev
58376)
@@ -293,10 +293,8 @@
g_return_val_if_fail (rect != NULL, InvalidParameter);
/* gradient surface to be created. We are using
CAIRO_CONTENT_COLOR_ALPHA, */
- /* because internally this is the format we use everywhere. */
gradient = cairo_surface_create_similar (cairo_get_target (ct),
CAIRO_CONTENT_COLOR_ALPHA,
(int) (2 * rect->Width), (int)
(2 * rect->Height));
-
if (gradient == NULL) {
return OutOfMemory;
}
@@ -362,7 +360,6 @@
g_return_val_if_fail (rect != NULL, InvalidParameter);
/* gradient surface to be created. We are using
CAIRO_CONTENT_COLOR_ALPHA, */
- /* because internally this is the format we use everywhere. */
gradient = cairo_surface_create_similar (cairo_get_target (ct),
CAIRO_CONTENT_COLOR_ALPHA,
(int) (2 * rect->Width), (int)
(2 * rect->Height));
@@ -383,6 +380,7 @@
GdipCreateMatrix (&tempMatrix);
cairo_save (ct);
{
+ cairo_t *temp = ct;
ct = cairo_create (gradient);
if (linear->blend->count > 1)
@@ -409,6 +407,8 @@
cairo_fill (ct);
cairo_pattern_destroy (pat);
+ cairo_destroy (ct);
+ ct = temp;
}
cairo_restore (ct);
@@ -450,7 +450,6 @@
g_return_val_if_fail (rect != NULL, InvalidParameter);
/* gradient surface to be created. We are using
CAIRO_CONTENT_COLOR_ALPHA, */
- /* because internally this is the format we use everywhere. */
gradient = cairo_surface_create_similar (cairo_get_target (ct),
CAIRO_CONTENT_COLOR_ALPHA,
(int) (2 * rect->Width), (int)
(2 * rect->Height));
@@ -471,6 +470,7 @@
GdipCreateMatrix (&tempMatrix);
cairo_save (ct);
{
+ cairo_t *temp = ct;
ct = cairo_create (gradient);
if (linear->blend->count > 1)
@@ -497,6 +497,8 @@
cairo_fill (ct);
cairo_pattern_destroy (pat);
+ cairo_destroy (ct);
+ ct = temp;
}
cairo_restore (ct);
@@ -540,7 +542,6 @@
g_return_val_if_fail (rect != NULL, InvalidParameter);
/* gradient surface to be created. We are using
CAIRO_CONTENT_COLOR_ALPHA, */
- /* because internally this is the format we use everywhere. */
gradient = cairo_surface_create_similar (cairo_get_target (ct),
CAIRO_CONTENT_COLOR_ALPHA,
(int) (2 * rect->Width), (int)
(2 * rect->Height));
@@ -561,6 +562,7 @@
GdipCreateMatrix (&tempMatrix);
cairo_save (ct);
{
+ cairo_t *temp = ct;
ct = cairo_create (gradient);
if (linear->blend->count > 1)
@@ -617,6 +619,8 @@
cairo_fill (ct);
cairo_pattern_destroy (pat);
+ cairo_destroy (ct);
+ ct = temp;
}
cairo_restore (ct);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches