[Mono-osx] [MonoMac] Misc Patches

Regan Sarwas rsarwas at gmail.com
Thu Jan 20 01:38:06 EST 2011


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 <kjpou at pt.lu> wrote:

>  Regan
>
> I came to the same conclusion as you when using the BezierPath.  I found no
> difference with the CreateBezierPath()
>
> In all the programs I just use the
>
> new NSBezierPath()
>
> because it is shorter.
>
> Kenneth
>
>
> On 1/19/11 7:47 AM, Regan Sarwas wrote:
>
>
>
> On Tue, Jan 18, 2011 at 10:22 AM, Miguel de Icaza <miguel at novell.com>wrote:
>
>> Hello Regan,
>>
>> > 1) First off the samples do not build on a clean clone of github.
>> >  Samples.patch fixes that.
>>
>>  Thanks!
>>
>> > 2) NSAffineTransform:  Added a missing struct, and finished the bindings
>> for
>> > this class. In the mac libraries, part of this class is defined in
>> > Foundation, and part in Appkit (as extension methods).  Since this class
>> is
>> > only available in OS X, and it all ends up in monomac.dll, I saw no need
>> to
>> > separate the class. let me know if it should be otherwise.
>>
>>  Is there a reason why we cant just use the existing CGAffineTransform
>> class defined in CoreGraphics instead?   It already has a bunch of
>> useful methods defined, and we could unify some code.
>>
>
>  Good catch.  I didn't use it, because I didn't see it.  Disregard that
> patch, and I'll send you something tomorrow.
>
>
>
>>  > 3)  NSBezierPath: Added manual bindings to complete the class.  I
>> struggled
>> > with the packedGlyph array, and decided it was best to expose this as a
>> > "black box" IntPtr.  It probably won't be needed from most user code,
>> and if
>> > you want a packed array (as I do in my sample), you are going to get it
>> as
>> > an IntPtr from some other cocoa object. I have verified it works
>> correctly.
>> >  I will provide docs for the manual bindings shortly.
>>
>>  Is there a reason to drop the CreateBezierPath() method?  Does the
>> plain constructor just work?
>>
>>  Yes - I did some testing to confirm, and AFAIK, [NSBezier BezierPath] is
> a "short cut" for [[NSBezier alloc] init], and provides some symmetry with
> the other Bezier constructors in cocoa.  In C# it is just redundant (and
> therefore confusing), which is why I suggest removing it.
>
>
>> I applied the Bezier patch.
>>
>> Miguel
>>
>
>
> _______________________________________________
> Mono-osx mailing listMono-osx at lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-osx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110119/a02af5f5/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NSAffineTransform1.patch
Type: application/octet-stream
Size: 11386 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110119/a02af5f5/attachment.obj 


More information about the Mono-osx mailing list