Commit Graph

13 Commits

Author SHA1 Message Date
Andrés G. Aragoneses
41eeecbf9a cairo: fix leak when Context object is finalized
When the finalizer calls Dispose(), disposing is false, it means that
CairoDebug traces should be printed, but the reference count on the
native context should still be decreased. Otherwise a real leak
would appear, as the native context would never be freed when the
managed object is GCed.
2013-11-03 15:21:49 +01:00
Mike Krüger
6e0efb08f2 cairo: Added SetSourceColor method to Cairo.Context.
Cherry-picked from the gtk-sharp-2.12 branch.
2013-08-18 18:38:54 +02:00
Wolfgang Steffens
796cd1e8a1 cairo: Fix text API calls
The native functions require a NULL-terminated string of text encoded in
UTF-8.

This change is merged from Mono.Cairo in mono 3.2.
2013-07-26 17:43:27 -05:00
Bertrand Lorentz
21ce761271 cairo: Fix some whitespace and code formatting issues 2013-07-26 17:43:26 -05:00
Bertrand Lorentz
36e2a12bfc cairo: Use getter methods for returning IDisposables
This makes it a bit clearer that the caller is responsible for
disposing IDisposable objects returned from any method.
2013-07-26 17:43:26 -05:00
Michael Hutchinson
6e7527cb92 cairo: Put some classes in separate files 2013-07-26 17:43:26 -05:00
Michael Hutchinson
38d1a3f13e cairo: Introduce the concept of reference ownership
Also:
  * improving naming consistency
  * obsolete old/broken stuff
  * clean up tabs/space mix

NOTE: this removes the wrapper caches for Pattern and Surface as
there was no reliable way to clear them.

This is a merge from changes in Mono.Cairo in mono 3.2.
2013-07-26 17:43:11 -05:00
Michael Hutchinson
5a78a5d177 cairo: Add mechanism to debug missing Dispose calls
Enabled by setting a new MONO_CAIRO_DEBUG_DISPOSE environment variable.
2013-07-26 10:34:45 -05:00
Cameron White
57c82a89c7 cairo: Fix rectangles returned by StrokeExtents and FillExtents methods
The third and fourth parameters of the Rectangle constructor are width
and height, but cairo_stroke_extents and cairo_fill_extents give right
and bottom coordinates.

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2012-12-27 15:26:42 +01:00
Mike Kestner
0fc5126228 Implement Ownable Generatable type.
* cairo/Context.cs: add ctor (IntPtr, bool owned)
* cairo/cairo-api.xml: expose cairo_t as new ownable symbol type
* generator/HandleBase.cs: implement IOwnable
* generator/IOwnable.cs: new interface for wrapping ownable types
* generator/Makefile.am: add new files to build
* generator/OwnableGen.cs: SimpleBase subclass to expose IOwnable
* generator/Parameters.cs: use IOwnable.FromNative instead of HandleBase
* generator/Parser.cs: parse ownable symbol type
* generator/ReturnValue.cs: use IOwnable.FromNative instead of HandleBase
2011-04-21 18:04:47 -05:00
Mike Kestner
e7ee99526a Add Pattern symbol to cairo-api.xml
* cairo/Context.cs: use Pattern.Handle
* cairo/Pattern.cs: expose Lookup method, Obsolete the Pointer prop and
  add a new Handle prop for API consistency.
* cairo/cairo-api.xml: add Pattern symbol.
2011-02-18 21:57:39 -06:00
Mike Kestner
ee866216b1 Cairo API 1.10 updates.
* cairo/*: merge changes to Mono.Cairo since we split back in Oct 2008.
  Not much changed.  Scrubbed the doc index and updated NativeMethods
  to match.  Commented with DONTCARE the ones we will ignore.  Implemented
  a few of them, including an initial Device binding.  Still some work
  to do, and some discovery to be done to see what happened to Xcb, Glitz,
  and DirectFB surfaces and whether we need to remove those classes.
2011-02-17 23:00:12 -06:00
Mike Kestner
b20d37c79c 2008-10-09 Mike Kestner <mkestner@novell.com>
* cairo/*.cs: flatten source hierarchy to simplify win32 build.
	* sample/Makefile.am: fix a ref issue with local cairo.

svn path=/trunk/gtk-sharp/; revision=115401
2008-10-09 23:53:18 +00:00