From b71eca8183d81b59865bba23e83c5c9b130b526b Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 13 Mar 2012 19:07:24 -0700 Subject: [PATCH] Add new negative parameter to arc. --- libguac/include/protocol.h | 5 ++++- libguac/src/protocol.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libguac/include/protocol.h b/libguac/include/protocol.h index aeb4b109..e73db9a1 100644 --- a/libguac/include/protocol.h +++ b/libguac/include/protocol.h @@ -392,10 +392,13 @@ int guac_protocol_send_sync(guac_socket* socket, guac_timestamp timestamp); * @param radius The radius of the circle containing the arc. * @param startAngle The starting angle, in radians. * @param endAngle The ending angle, in radians. + * @param negative Zero if the arc should be drawn in order of increasing + * angle, non-zero otherwise. * @return Zero on success, non-zero on error. */ int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer, - int x, int y, int radius, double startAngle, double endAngle); + int x, int y, int radius, double startAngle, double endAngle, + int negative); /** * Sends a cfill instruction over the given guac_socket connection. diff --git a/libguac/src/protocol.c b/libguac/src/protocol.c index 6ec0d069..4b7bcbd9 100644 --- a/libguac/src/protocol.c +++ b/libguac/src/protocol.c @@ -484,7 +484,8 @@ int guac_protocol_send_args(guac_socket* socket, const char** args) { int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer, - int x, int y, int radius, double startAngle, double endAngle) { + int x, int y, int radius, double startAngle, double endAngle, + int negative) { return guac_socket_write_string(socket, "3.arc,") @@ -499,6 +500,8 @@ int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer, || __guac_socket_write_length_double(socket, startAngle) || guac_socket_write_string(socket, ",") || __guac_socket_write_length_double(socket, endAngle) + || guac_socket_write_string(socket, ",") + || guac_socket_write_string(socket, negative ? "1" : "0") || guac_socket_write_string(socket, ";"); }