blob: 409e80b6e676996c82506838e0db5b718e567cc8 [file] [log] [blame]
reed@google.comac10a2d2010-12-22 21:39:39 +00001/*
2 Copyright 2010 Google Inc.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17
18#ifndef GrScalar_DEFINED
19#define GrScalar_DEFINED
20
21#include "GrTypes.h"
reed@google.com2e550122011-05-06 17:30:45 +000022#include "SkScalar.h"
reed@google.comac10a2d2010-12-22 21:39:39 +000023
reed@google.com2e550122011-05-06 17:30:45 +000024#define GR_Int32Min SK_NaN32
25#define GR_Int32Max SK_MaxS32
reed@google.comac10a2d2010-12-22 21:39:39 +000026
reed@google.com2e550122011-05-06 17:30:45 +000027#define GR_Fixed1 SK_Fixed1
28#define GR_FixedHalf SK_FixedHalf
29#define GrIntToFixed(a) SkIntToFixed(a)
30#define GrFixedToFloat(a) SkFixedToFloat(a)
31#define GrFixedFloorToInt(a) SkFixedFloor(a)
reed@google.comac10a2d2010-12-22 21:39:39 +000032
reed@google.com2e550122011-05-06 17:30:45 +000033#define GrScalar SkScalar
34#define GR_Scalar1 SK_Scalar1
35#define GR_ScalarHalf SK_ScalarHalf
36#define GR_ScalarMin SK_ScalarMin
37#define GR_ScalarMax SK_ScalarMax
reed@google.comac10a2d2010-12-22 21:39:39 +000038
reed@google.com7744c202011-05-06 19:26:26 +000039#define GrIntToScalar(a) SkIntToScalar(a)
reed@google.com2e550122011-05-06 17:30:45 +000040#define GrScalarHalf(a) SkScalarHalf(a)
41#define GrScalarAve(a,b) SkScalarAve(a,b)
bsalomon@google.comee435122011-07-01 14:57:55 +000042#define GrMul(a,b) SkScalarMul(a,b) // deprecated, prefer GrScalarMul
43#define GrScalarMul(a,b) SkScalarMul(a,b)
bungeman@google.com8c5753e2011-05-20 19:11:50 +000044#define GrScalarDiv(a,b) SkScalarDiv(a, b)
reed@google.com2e550122011-05-06 17:30:45 +000045#define GrScalarToFloat(a) SkScalarToFloat(a)
46#define GrFloatToScalar(a) SkScalarToFloat(a)
47#define GrIntToScalar(a) SkIntToScalar(a)
48#define GrScalarAbs(a) SkScalarAbs(a)
49#define GrScalarIsInt(a) SkScalarIsInt(a)
50#define GrScalarMax(a,b) SkScalarMax(a,b)
51#define GrScalarFloorToInt(a) SkScalarFloor(a)
52#define GrScalarCeilToInt(a) SkScalarCeil(a)
53#define GrFixedToScalar(a) SkFixedToScalar(a)
reed@google.comac10a2d2010-12-22 21:39:39 +000054
55#endif
56