After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672174 - cogl_path_curve_to second parameter ignored
cogl_path_curve_to second parameter ignored
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: CoglPath
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-03-15 18:24 UTC by Dénes Almási
Modified: 2012-03-15 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes the problem. (382 bytes, patch)
2012-03-15 18:24 UTC, Dénes Almási
reviewed Details | Review

Description Dénes Almási 2012-03-15 18:24:05 UTC
Created attachment 209871 [details] [review]
Patch that fixes the problem.

I am running clutter 1.8.4 on Arch linux and using cogl 1.8.2 for pick painting of a custom actor.

The cogl_path_curve_to path drawing function doesn't work properly, it simply ignores its second parameter and uses the fourth as the second too. This makes the function unusable.

Reproducing the bug is easy. Call these in a ClutterActor's paint callback:
cogl_path_new();
cogl_path_move_to(0.0f, 0.0f);
cogl_path_curve_to(0.0f, 200.0f, 200.0f, 0.0f, 100.0f, 100.0f);
cogl_path_stroke();

The expected result would be a rotated S letter.

I am sure this is simply a typo in the implementation. I attached a patch which should fix the problem.

Sorry if the patch is incorrect, this is the very first patch of my life.
Comment 1 Emmanuele Bassi (:ebassi) 2012-03-15 19:02:04 UTC
Review of attachment 209871 [details] [review]:

this is obviously correct. nice catch!
Comment 2 Neil Roberts 2012-03-15 19:05:34 UTC
Nice catch, thank you!

I've pushed the patch to master here:

http://git.gnome.org/browse/cogl/commit/?id=c8f8dbec7e2b36e350b4e12368a060eed39333da

I hope this is the first of many patches for you :)