Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I create cairo context from pointer? #40

Open
bigos opened this issue Nov 26, 2024 · 5 comments
Open

How do I create cairo context from pointer? #40

bigos opened this issue Nov 26, 2024 · 5 comments

Comments

@bigos
Copy link

bigos commented Nov 26, 2024

I am experimenting with Gtk4.

https://docs.gtk.org/gtk4/callback.DrawingAreaDrawFunc.html

and try to write a callback.

Can you provide example how to use the cr in Gtk4 and get to using it as the cr in the examples.

My doubtful understanding is that I need to create context from the pointer.

I am a noob and trying various gives me errors that I do not understand.

https://github.com/bigos/gtk_minimal/blob/main/bin/main.ml

@Chris00
Copy link
Owner

Chris00 commented Nov 26, 2024 via email

@bigos
Copy link
Author

bigos commented Nov 27, 2024

No worries. I have an alternative solution for working with Gtk4.

Thank you for reply.

@Chris00
Copy link
Owner

Chris00 commented Nov 27, 2024 via email

@bigos
Copy link
Author

bigos commented Nov 27, 2024

@bigos
Copy link
Author

bigos commented Nov 28, 2024

You have:

CAMLexport value caml_cairo_create(value vsurf)

but in https://github.com/garrigue/lablgtk/blob/afbd6d2ee90b98cb0ea49cba34659e15b00cbfe3/src/cairo_pango_stubs.c#L152

there seems to be a way to create another type of context using a pointer

Is that what I am looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants