ungerik / go-cairo

Go binding for the cairo graphics library
Other
146 stars 33 forks source link

Need get_current_point #17

Closed bit101 closed 6 years ago

bit101 commented 6 years ago

Cairo has a get_current_point method that is not implemented here. I need it to implement a QuadraticCurveTo method, which does not exist in Cairo. It's trivial to create, but you need to factor in that initial point you are drawing from. I've done it in cairo-rs and would like to do the same here.

Was there a reason you chose not to implement that method?

ungerik commented 6 years ago

No special reason. Was not available at that time or I overlooked it.

-Erik

2018-04-15 22:19 GMT+02:00 Keith Peters notifications@github.com:

Cairo has a get_current_point method that is not implemented here. I need it to implement a QuadraticCurveTo method, which does not exist in Cairo. It's trivial to create, but you need to factor in that initial point you are drawing from. I've done it in cairo-rs and would like to do the same here.

Was there a reason you chose not to implement that method?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ungerik/go-cairo/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlr849P4rcXgMwpfYCdtc_nlZ9GrtoBks5to6tXgaJpZM4TVoSq .

-- erik@erikunger.com +43 650 58 33055 Skype: ungerik

bit101 commented 6 years ago

I've implemented it my local branch. I can submit a PR if you'd like. Should also add has_current_point along with it.

On Mon, Apr 16, 2018, 5:35 AM Erik Unger notifications@github.com wrote:

No special reason. Was not available at that time or I overlooked it.

-Erik

2018-04-15 22:19 GMT+02:00 Keith Peters notifications@github.com:

Cairo has a get_current_point method that is not implemented here. I need it to implement a QuadraticCurveTo method, which does not exist in Cairo. It's trivial to create, but you need to factor in that initial point you are drawing from. I've done it in cairo-rs and would like to do the same here.

Was there a reason you chose not to implement that method?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ungerik/go-cairo/issues/17, or mute the thread < https://github.com/notifications/unsubscribe-auth/AAlr849P4rcXgMwpfYCdtc_nlZ9GrtoBks5to6tXgaJpZM4TVoSq

.

-- erik@erikunger.com +43 650 58 33055 Skype: ungerik

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ungerik/go-cairo/issues/17#issuecomment-381539740, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXAlNs2KS9hfoMgPlWaXH-jpp4Dcwswks5tpGX8gaJpZM4TVoSq .

ungerik commented 6 years ago

Yes please send the PR

2018-04-16 13:11 GMT+02:00 Keith Peters notifications@github.com:

I've implemented it my local branch. I can submit a PR if you'd like. Should also add has_current_point along with it.

On Mon, Apr 16, 2018, 5:35 AM Erik Unger notifications@github.com wrote:

No special reason. Was not available at that time or I overlooked it.

-Erik

2018-04-15 22:19 GMT+02:00 Keith Peters notifications@github.com:

Cairo has a get_current_point method that is not implemented here. I need it to implement a QuadraticCurveTo method, which does not exist in Cairo. It's trivial to create, but you need to factor in that initial point you are drawing from. I've done it in cairo-rs and would like to do the same here.

Was there a reason you chose not to implement that method?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ungerik/go-cairo/issues/17, or mute the thread < https://github.com/notifications/unsubscribe- auth/AAlr849P4rcXgMwpfYCdtc_nlZ9GrtoBks5to6tXgaJpZM4TVoSq

.

-- erik@erikunger.com +43 650 58 33055 Skype: ungerik

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ungerik/go-cairo/issues/17#issuecomment-381539740, or mute the thread https://github.com/notifications/unsubscribe- auth/AAXAlNs2KS9hfoMgPlWaXH-jpp4Dcwswks5tpGX8gaJpZM4TVoSq .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ungerik/go-cairo/issues/17#issuecomment-381564135, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlr8z9u9QPxxKEjgmyJU-oW0EPPuOGYks5tpHx2gaJpZM4TVoSq .

-- erik@erikunger.com +43 650 58 33055 Skype: ungerik

bit101 commented 6 years ago

Will do. I'll just have to make a proper git fork and do the work there.

And thanks for this library. I'm getting a lot of use out of it. I've worked with cairo in Python and Rust, but decided to take a deep dive into Go recently. So was happy to see some cairo bindings here too.

bit101 commented 6 years ago

Saw the merge. Thanks!