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, ";"); }