コード例 #1
0
SWIGEXPORT jint JNICALL Java_org_scilab_modules_graphic_1objects_DataLoaderJNI_getTextureImageType(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jint jresult = 0 ;
  int arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  result = (int)getTextureImageType(arg1);
  jresult = (jint)result; 
  return jresult;
}
コード例 #2
0
ファイル: MatPlotDecomposer.cpp プロジェクト: rfabbri/scilab
int MatPlotDecomposer::getTextureData(char * id, void ** address, unsigned int * size)
{
    int type = getTextureImageType(id);
    if (type == MATPLOT_INDEX)
    {
        // Indexed colors
        const int h = getTextureHeight(id);
        const int w = getTextureWidth(id);
        const int bsize = w * h * sizeof(int);
        unsigned char * buffer = new unsigned char[bsize];
        fillTextureData(id, buffer, bsize);

        *address = buffer;
        *size = bsize;

        return 1;
    }

    getGraphicObjectProperty(id, __GO_DATA_MODEL_MATPLOT_IMAGE_DATA__, jni_double_vector, address);
    getGraphicObjectProperty(id, __GO_DATA_MODEL_MATPLOT_IMAGE_DATASIZE__, jni_int, (void **)&size);

    return 1;
}