diff options
Diffstat (limited to 'fontconfig/src')
-rw-r--r-- | fontconfig/src/fcrange.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fontconfig/src/fcrange.c b/fontconfig/src/fcrange.c index 39eafd82d..37cf06755 100644 --- a/fontconfig/src/fcrange.c +++ b/fontconfig/src/fcrange.c @@ -76,6 +76,29 @@ FcRangeCopy (const FcRange *range) return ret; } +FcBool +FcRangeGetDouble(const FcRange *range, double *begin, double *end) +{ + if (!range) + return FcFalse; + if (range->is_double) + { + if (begin) + *begin = range->u.d.begin; + if (end) + *end = range->u.d.end; + } + else + { + if (begin) + *begin = (double)range->u.i.begin; + if (end) + *end = (double)range->u.i.end; + } + + return FcTrue; +} + FcRange FcRangeCanonicalize (const FcRange *range) { |