[cairo] Cario in Visual Basic
Jon Chambers
joncham at gmail.com
Tue Dec 12 19:31:38 PST 2006
On 12/12/06, Daniel Amelang <daniel.amelang at gmail.com> wrote:
>
> On 12/12/06, Jelmer Baas <Baas at speerit.nl> wrote:
> > Hello List,
> >
> >
> > For a CAD-like program made in Visual Basic, I'm looking for an object
> > which allows me to draw lines very quickly. After reading about Cairo, I
> > got interested.
>
> That's great, it's always good to see cairo getting used in more
> applications. Having said that, if you're looking for the fastest way
> to draw lines in VB, cairo may not be what you're looking for. Sure,
> it can draw lines quickly (and likely fast enough for your purposes),
> but the focus here is on a lot more than that. And that "a lot more"
> is probably going to interest you also.
>
> > Would there be any way to use the objects in VB? I can't register the
> > DLLs and can't use the LIBs, so I have no idea where to start ...
> >
> > If you help me get started, I will translate the include files to VB and
> > post them so that Cairo can ship them, too. (Perhaps with a simple
> > example?)
>
> Out of curiousity, where did you get the cairo dll? Here?
>
> http://www.gimp.org/~tml/gimp/win32/downloads.html
>
> Notice that what you get from the above link isn't an ActiveX dll,
> which is what VB needs to interface with cairo nicely. The cairo dll
> just has plain old C functions, so you can either interface with it
> like you would the Win32 API (declare each function/structure you use
> etc), or you can go through the effort of creating a ActiveX DLL that
> wraps cairo's functionality in nice COM objects. To do that last
> approach would require quite a bit of work, but the result would be
> pretty cool, and I think you'd make a number of windows developers
> happy.
>
> Now, if you downloaded the mono cairo dll (useful for VB.NET
> programming) described here:
>
> http://www.mono-project.com/Drawing
>
> that's another story. You'll have to take it up with the mono guys on
> the gtk-sharp list, as only they really know what they did.
Note that the Mono.Cairo.dll could be used by regular VB via COM Interop if
you register the assembly with regasm (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfAssemblyRegistrationToolRegasmexe.asp).
I haven't tried this personally but I see no reason why it wouldn't work.
> If anything needs to be changed in the current code of Cairo, I don't
> > believe it's much work, right?
>
> No, nothing should have to change within cairo.
>
> Dan
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
- Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20061212/c622035a/attachment-0001.html
More information about the cairo
mailing list