1 2 /* 3 * Copyright 2010 Google Inc. 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9 10 11 #ifndef GrScalar_DEFINED 12 #define GrScalar_DEFINED 13 14 #include "GrTypes.h" 15 #include "SkScalar.h" 16 17 #define GR_Int32Min SK_NaN32 18 #define GR_Int32Max SK_MaxS32 19 20 #define GR_Fixed1 SK_Fixed1 21 #define GR_FixedHalf SK_FixedHalf 22 #define GrIntToFixed(a) SkIntToFixed(a) 23 #define GrFixedToFloat(a) SkFixedToFloat(a) 24 #define GrFixedFloorToInt(a) SkFixedFloor(a) 25 26 #define GrScalar SkScalar 27 #define GR_Scalar1 SK_Scalar1 28 #define GR_ScalarHalf SK_ScalarHalf 29 #define GR_ScalarMin SK_ScalarMin 30 #define GR_ScalarMax SK_ScalarMax 31 32 #define GrIntToScalar(a) SkIntToScalar(a) 33 #define GrScalarHalf(a) SkScalarHalf(a) 34 #define GrScalarAve(a,b) SkScalarAve(a,b) 35 #define GrMul(a,b) SkScalarMul(a,b) // deprecated, prefer GrScalarMul 36 #define GrScalarMul(a,b) SkScalarMul(a,b) 37 #define GrScalarDiv(a,b) SkScalarDiv(a, b) 38 #define GrScalarToFloat(a) SkScalarToFloat(a) 39 #define GrFloatToScalar(a) SkScalarToFloat(a) 40 #define GrIntToScalar(a) SkIntToScalar(a) 41 #define GrScalarAbs(a) SkScalarAbs(a) 42 #define GrScalarIsInt(a) SkScalarIsInt(a) 43 #define GrScalarMax(a,b) SkScalarMax(a,b) 44 #define GrScalarFloorToInt(a) SkScalarFloor(a) 45 #define GrScalarCeilToInt(a) SkScalarCeil(a) 46 #define GrFixedToScalar(a) SkFixedToScalar(a) 47 48 #endif 49 50