From 81bedda58cfc15f1987aa1952290cf9d87b4d074 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 30 Apr 2015 13:04:16 -0400 Subject: [PATCH] New API: hb_buffer_reverse_range() --- src/hb-buffer.cc | 17 +++++++++++++++++ src/hb-buffer.h | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 0543073cf..88892d0d5 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -1282,6 +1282,23 @@ hb_buffer_reverse (hb_buffer_t *buffer) buffer->reverse (); } +/** + * hb_buffer_reverse_range: + * @buffer: a buffer. + * @start: start index. + * @end: end index. + * + * Reverses buffer contents between start to end. + * + * Since: 1.0 + **/ +void +hb_buffer_reverse_range (hb_buffer_t *buffer, + unsigned int start, unsigned int end) +{ + buffer->reverse_range (start, end); +} + /** * hb_buffer_reverse_clusters: * @buffer: a buffer. diff --git a/src/hb-buffer.h b/src/hb-buffer.h index e5b46d867..520141b8a 100644 --- a/src/hb-buffer.h +++ b/src/hb-buffer.h @@ -221,6 +221,10 @@ hb_buffer_allocation_successful (hb_buffer_t *buffer); void hb_buffer_reverse (hb_buffer_t *buffer); +void +hb_buffer_reverse_range (hb_buffer_t *buffer, + unsigned int start, unsigned int end); + void hb_buffer_reverse_clusters (hb_buffer_t *buffer);