Add FcRangeGetDouble()
https://bugs.freedesktop.org/show_bug.cgi?id=82876
This commit is contained in:
parent
286cdc9c10
commit
1082161ea3
|
@ -62,3 +62,13 @@ integer sized value.
|
|||
all memory associated with it.
|
||||
@SINCE@ 2.11.91
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcRangeGetDouble
|
||||
@TYPE1@ const FcRange * @ARG1@ range
|
||||
@TYPE2@ double * @ARG2@ begin
|
||||
@TYPE3@ double * @ARG3@ end
|
||||
@PURPOSE@ Get the range in double
|
||||
@DESC@
|
||||
Returns in <parameter>begin</parameter> and <parameter>end</parameter> as the range.
|
||||
@SINCE@ 2.11.91
|
||||
|
|
|
@ -908,6 +908,9 @@ FcRangeDestroy (FcRange *range);
|
|||
FcPublic FcRange *
|
||||
FcRangeCopy (const FcRange *r);
|
||||
|
||||
FcPublic FcBool
|
||||
FcRangeGetDouble(const FcRange *range, double *begin, double *end);
|
||||
|
||||
/* fcweight.c */
|
||||
|
||||
FcPublic int
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue