Zyy-draw-arrow , gimp 2.99 plugin

I wrote a gimp 2.99 plug-in, which is applicable to the version of gimp 2.99.12 and later, because the previous api is incompatible.

zyy-draw-arrow.zip.pdf (6.3 KB)

luping-2022-12-08_15.38.41.mp4.pdf (2.9 MB)

Because compressed files and videos cannot be uploaded, the two files uploaded by changing the extension are plug-ins and operation videos.

After downloading, delete the. pdf extension.
If you are interested, please help test it.
It is applicable to gimp in Chinese or English.
However, there is a problem with this plug-in. It cannot be used normally in the flatpak version of gimp. The prompt is as follows. I don’t know how to solve this problem. If you can reply, thank you very much.

After testing, as long as import cairo is added to the plug-in, normal plug-ins cannot be used.
Windows can also be used normally. Only the flatpak version has this problem.

I try to use the following method to import cairo,
but it is very different from the cairo imported with import cairo.
For example, cairo.Context.XXX() does not have any.
Are there any related tutorials and documents?
The official documents of cairo do not match.

gi.require_version(‘cairo’, ‘1.0’)
from gi.repository import cairo

You should use “import cairo”. Cairo does not work through introspection like the rest of the GObject-based libraries.

Oh, that’s too bad.
What is the role of cairo imported through gi?

The introspection data for Cairo is mainly there to allow generating the introspection data for GTK itself, and it is only needed for signals and properties involving a Cairo type. It’s essentially useless as a way to use Cairo from other languages, because Cairo is not GObject-based, so it cannot be meaningfully introspected.

Thank you very much for your reply.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.