gtkd-developers / GtkD

GtkD is a D binding and OO wrapper of GTK+ originally created by Antonio Monteiro
http://gtkd.org
Other
322 stars 71 forks source link

Add RectangleInt to cairo #281

Closed LunaTheFoxgirl closed 5 years ago

LunaTheFoxgirl commented 5 years ago

Some Gtk bindings (eg. libdazzle) require RectangleInt being present, this PR adds RectangleInt to cairo. Looking at gir-to-d's source it seems that it does NOT try to convert cairo and you are now using manual conversion, am I right?

MikeWey commented 5 years ago

Do you have an example of how the RectangleInt is used in libdazzle.

LunaTheFoxgirl commented 5 years ago

It’s used in the GraphRenderer class, had to reimplement it with the low level Cairo version https://github.com/Member1221/d-dazzle/blob/master/APILookupDazzle.txt#L214

Bindings like Vala expose it as RectangleInt, so I thought it would probably be good to match that?

Though I can see my implementation of RectangleInt is quite subpar and could probably be done within the confines of gir-to-d

MikeWey commented 5 years ago

It looks like a bug in gir-to-d where is thinks RectangleInt is a class while it isn't.

MikeWey commented 5 years ago

Fixed in gir-to-d.

LunaTheFoxgirl commented 5 years ago

Okay, deleting my fork.