Home | History | Annotate | Download | only in include
      1 /*
      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"
     22 #include "SkScalar.h"
     23 
     24 #define GR_Int32Min         SK_NaN32
     25 #define GR_Int32Max         SK_MaxS32
     26 
     27 #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)
     32 
     33 #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
     38 
     39 #define GrIntToScalar(a)    SkIntToScalar(a)
     40 #define GrScalarHalf(a)     SkScalarHalf(a)
     41 #define GrScalarAve(a,b)    SkScalarAve(a,b)
     42 #define GrMul(a,b)          SkScalarMul(a,b)
     43 #define GrScalarDiv(a,b)    SkScalarDiv(a, b)
     44 #define GrScalarToFloat(a)  SkScalarToFloat(a)
     45 #define GrFloatToScalar(a)  SkScalarToFloat(a)
     46 #define GrIntToScalar(a)    SkIntToScalar(a)
     47 #define GrScalarAbs(a)      SkScalarAbs(a)
     48 #define GrScalarIsInt(a)    SkScalarIsInt(a)
     49 #define GrScalarMax(a,b)    SkScalarMax(a,b)
     50 #define GrScalarFloorToInt(a)   SkScalarFloor(a)
     51 #define GrScalarCeilToInt(a)    SkScalarCeil(a)
     52 #define GrFixedToScalar(a)  SkFixedToScalar(a)
     53 
     54 #endif
     55 
     56