Print this page
Added gradle and cmake project


  31 
  32 /*
  33  * Class:     sun_java2d_loops_FillParallelogram
  34  * Method:    FillParallelogram
  35  * Signature: (Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;DDDDDD)V
  36  */
  37 JNIEXPORT void JNICALL
  38 Java_sun_java2d_loops_FillParallelogram_FillParallelogram
  39     (JNIEnv *env, jobject self,
  40      jobject sg2d, jobject sData,
  41      jdouble x0, jdouble y0,
  42      jdouble dx1, jdouble dy1,
  43      jdouble dx2, jdouble dy2)
  44 {
  45     SurfaceDataOps *sdOps;
  46     SurfaceDataRasInfo rasInfo;
  47     NativePrimitive *pPrim;
  48     CompositeInfo compInfo;
  49     jint pixel;
  50     jint ix1, iy1, ix2, iy2;
  51 
  52     if ((dy1 == 0 && dx1 == 0) || (dy2 == 0 && dx2 == 0)) {
  53         return;
  54     }
  55 
  56     /*
  57      * Sort parallelogram by y values, ensure that each delta vector
  58      * has a non-negative y delta.
  59      */
  60     SORT_PGRAM(x0, y0, dx1, dy1, dx2, dy2, );
  61 
  62     PGRAM_MIN_MAX(ix1, ix2, x0, dx1, dx2, JNI_FALSE);
  63     iy1 = (jint) floor(y0 + 0.5);
  64     iy2 = (jint) floor(y0 + dy1 + dy2 + 0.5);
  65 
  66     pPrim = GetNativePrim(env, self);
  67     if (pPrim == NULL) {
  68         return;
  69     }
  70     pixel = GrPrim_Sg2dGetPixel(env, sg2d);
  71     if (pPrim->pCompType->getCompInfo != NULL) {




  31 
  32 /*
  33  * Class:     sun_java2d_loops_FillParallelogram
  34  * Method:    FillParallelogram
  35  * Signature: (Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;DDDDDD)V
  36  */
  37 JNIEXPORT void JNICALL
  38 Java_sun_java2d_loops_FillParallelogram_FillParallelogram
  39     (JNIEnv *env, jobject self,
  40      jobject sg2d, jobject sData,
  41      jdouble x0, jdouble y0,
  42      jdouble dx1, jdouble dy1,
  43      jdouble dx2, jdouble dy2)
  44 {
  45     SurfaceDataOps *sdOps;
  46     SurfaceDataRasInfo rasInfo;
  47     NativePrimitive *pPrim;
  48     CompositeInfo compInfo;
  49     jint pixel;
  50     jint ix1, iy1, ix2, iy2;

  51     if ((dy1 == 0 && dx1 == 0) || (dy2 == 0 && dx2 == 0)) {
  52         return;
  53     }
  54 
  55     /*
  56      * Sort parallelogram by y values, ensure that each delta vector
  57      * has a non-negative y delta.
  58      */
  59     SORT_PGRAM(x0, y0, dx1, dy1, dx2, dy2, );
  60 
  61     PGRAM_MIN_MAX(ix1, ix2, x0, dx1, dx2, JNI_FALSE);
  62     iy1 = (jint) floor(y0 + 0.5);
  63     iy2 = (jint) floor(y0 + dy1 + dy2 + 0.5);
  64 
  65     pPrim = GetNativePrim(env, self);
  66     if (pPrim == NULL) {
  67         return;
  68     }
  69     pixel = GrPrim_Sg2dGetPixel(env, sg2d);
  70     if (pPrim->pCompType->getCompInfo != NULL) {