mail-archives/mono-osx/2011-January/003738.html

169 строки
6.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-osx] [MonoMac] Misc Patches
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20%5BMonoMac%5D%20Misc%20Patches&In-Reply-To=4D36AA92.8090207%40pt.lu">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="003699.html">
<LINK REL="Next" HREF="003762.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-osx] [MonoMac] Misc Patches</H1>
<B>Regan Sarwas</B>
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20%5BMonoMac%5D%20Misc%20Patches&In-Reply-To=4D36AA92.8090207%40pt.lu"
TITLE="[Mono-osx] [MonoMac] Misc Patches">rsarwas at gmail.com
</A><BR>
<I>Thu Jan 20 01:38:06 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="003699.html">[Mono-osx] [MonoMac] Misc Patches
</A></li>
<LI>Next message: <A HREF="003762.html">[Mono-osx] [MonoMac] Misc Patches
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3738">[ date ]</a>
<a href="thread.html#3738">[ thread ]</a>
<a href="subject.html#3738">[ subject ]</a>
<a href="author.html#3738">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Attached is the revised patch to NSAffineTransform that uses
CGAffineTransform. Much cleaner, and more functional. I removed the static
Transform method because it is redundant with the default constructor. The
docs need more work, but that's a task for another day:)
-Regan
On Wed, Jan 19, 2011 at 12:10 AM, kjpou &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">kjpou at pt.lu</A>&gt; wrote:
&gt;<i> Regan
</I>&gt;<i>
</I>&gt;<i> I came to the same conclusion as you when using the BezierPath. I found no
</I>&gt;<i> difference with the CreateBezierPath()
</I>&gt;<i>
</I>&gt;<i> In all the programs I just use the
</I>&gt;<i>
</I>&gt;<i> new NSBezierPath()
</I>&gt;<i>
</I>&gt;<i> because it is shorter.
</I>&gt;<i>
</I>&gt;<i> Kenneth
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On 1/19/11 7:47 AM, Regan Sarwas wrote:
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Tue, Jan 18, 2011 at 10:22 AM, Miguel de Icaza &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">miguel at novell.com</A>&gt;wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> Hello Regan,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &gt; 1) First off the samples do not build on a clean clone of github.
</I>&gt;&gt;<i> &gt; Samples.patch fixes that.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks!
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &gt; 2) NSAffineTransform: Added a missing struct, and finished the bindings
</I>&gt;&gt;<i> for
</I>&gt;&gt;<i> &gt; this class. In the mac libraries, part of this class is defined in
</I>&gt;&gt;<i> &gt; Foundation, and part in Appkit (as extension methods). Since this class
</I>&gt;&gt;<i> is
</I>&gt;&gt;<i> &gt; only available in OS X, and it all ends up in monomac.dll, I saw no need
</I>&gt;&gt;<i> to
</I>&gt;&gt;<i> &gt; separate the class. let me know if it should be otherwise.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Is there a reason why we cant just use the existing CGAffineTransform
</I>&gt;&gt;<i> class defined in CoreGraphics instead? It already has a bunch of
</I>&gt;&gt;<i> useful methods defined, and we could unify some code.
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Good catch. I didn't use it, because I didn't see it. Disregard that
</I>&gt;<i> patch, and I'll send you something tomorrow.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;&gt;<i> &gt; 3) NSBezierPath: Added manual bindings to complete the class. I
</I>&gt;&gt;<i> struggled
</I>&gt;&gt;<i> &gt; with the packedGlyph array, and decided it was best to expose this as a
</I>&gt;&gt;<i> &gt; &quot;black box&quot; IntPtr. It probably won't be needed from most user code,
</I>&gt;&gt;<i> and if
</I>&gt;&gt;<i> &gt; you want a packed array (as I do in my sample), you are going to get it
</I>&gt;&gt;<i> as
</I>&gt;&gt;<i> &gt; an IntPtr from some other cocoa object. I have verified it works
</I>&gt;&gt;<i> correctly.
</I>&gt;&gt;<i> &gt; I will provide docs for the manual bindings shortly.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Is there a reason to drop the CreateBezierPath() method? Does the
</I>&gt;&gt;<i> plain constructor just work?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Yes - I did some testing to confirm, and AFAIK, [NSBezier BezierPath] is
</I>&gt;<i> a &quot;short cut&quot; for [[NSBezier alloc] init], and provides some symmetry with
</I>&gt;<i> the other Bezier constructors in cocoa. In C# it is just redundant (and
</I>&gt;<i> therefore confusing), which is why I suggest removing it.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;&gt;<i> I applied the Bezier patch.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Miguel
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> Mono-osx mailing <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">listMono-osx at lists.ximian.comhttp</A>://lists.ximian.com/mailman/listinfo/mono-osx
</I>&gt;<i>
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20110119/a02af5f5/attachment.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20110119/a02af5f5/attachment.html</A>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NSAffineTransform1.patch
Type: application/octet-stream
Size: 11386 bytes
Desc: not available
Url : <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20110119/a02af5f5/attachment.obj">http://lists.ximian.com/pipermail/mono-osx/attachments/20110119/a02af5f5/attachment.obj</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="003699.html">[Mono-osx] [MonoMac] Misc Patches
</A></li>
<LI>Next message: <A HREF="003762.html">[Mono-osx] [MonoMac] Misc Patches
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#3738">[ date ]</a>
<a href="thread.html#3738">[ thread ]</a>
<a href="subject.html#3738">[ subject ]</a>
<a href="author.html#3738">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
mailing list</a><br>
</body></html>