The BezierPath.FillRect method call works just fine. I'm assuming
because it's just a simple wrapper over the NSBezierPath cocoa class.
But there doesn't seem to be very much in the way of extended Cocoa
drawing calls in Cocoa#. Stuff like NSFillRect.
BTW the code was taken directly from the View demo included in the
latest release of Cocoa#.
Any help and suggestions would be much appreciated. Thanks again.
Robert
I think the bigger question is how to do Quartz drawing from Cocoa #.
I don't see anything equivalent to NSGraphicsContext in Cocoa#. Am I
missing something obvious?
Brock
On Sep 21, 12:56 pm, "rob.mch...@gmail.com" <rob.mch...@gmail.com>
wrote:
I took the assumption that the System.Drawing routines were modified
so they could draw to an NSView. But this is probably incorrect.
I like C# as a language but it would seem that I am unable to use
Cocoa# for development if I can't do drawing to quartz.
I did have one other question. Is there an objective-c helper class
that allows one to make calls into the Mono runtime. Something that
would allow me to create a Proxy object in objective c. Something
that would forward my message sends to the mono class instance.
Possibly by doing some kind of message translation routines or lookup?
public BezierPath() : base()
{
}
public void MoveToPoint(Point point)
{
ObjCMessaging.objc_msgSend(NativeObject, "moveToPoint:",
typeof(void), typeof(Point), point);
}
public void LineToPoint(Point point)
{
ObjCMessaging.objc_msgSend(NativeObject, "lineToPoint:",
typeof(void), typeof(Point), point);
}
public void Stroke()
{
ObjCMessaging.objc_msgSend(NativeObject, "stroke",
typeof(void));
}
Now you can do something inside the Draw of one of the samples like:
Color.Black.Set();
BezierPath.FillRect(aRect);
Color.Red.Set();
BezierPath path = new BezierPath();
path.MoveToPoint(new Point(3,3));
path.LineToPoint(new Point(50,50));
path.Stroke();
-- Brock
On Oct 4, 10:36 am, "rob.mch...@gmail.com" <rob.mch...@gmail.com>
wrote:
> > > Robert- Hide quoted text -
>
> - Show quoted text -
This class already has a default constructor and etc.
Breeve, if you have some updates to this file. Let me know and I can
add them. I could probably just take what you have here in this post.
B b = new B(); //does not work.
private class A
{
public A()
{
}
public A(int a)
{
}
}
private class B : A
{
public B(int a)
: base(a)
{
}
}
I am not a Cocoa expert by any means. I am just playing around with
the API and noticed there wasn't a lot of drawing functionality
exposed. I am not familiar with the process for contributing to open
source projects. Do you need a patch file? My changes are what I
posted.
Thanks,
Brock
On Nov 1, 1:04 pm, Tizzo <schav...@gmail.com> wrote:
> I'm looking at the BezierPath class and it appears that you guys might
> not be looking at the latest revision of the library. See the
> following link:
>
> http://anonsvn.mono-project.com/viewcvs/trunk/cocoa-sharp/src/Cocoa/B...
> > > - Show quoted text -- Hide quoted text -