Exemple #1
0
        GimpParamDef[] GetParamDef(int num_args, IntPtr argsPtr)
        {
            var paramDef = new GimpParamDef[num_args];
            var type     = typeof(GimpParamDef);
            var seq      = new IntPtrSeq(argsPtr, num_args, Marshal.SizeOf(type));

            seq.ForEach((i, ptr) =>
            {
                paramDef[i] = (GimpParamDef)Marshal.PtrToStructure(ptr, type);
            });

            return(paramDef);
        }
Exemple #2
0
   public static extern void gimp_install_procedure(
 string name,
 string blurb,
 string help,
 string author,
 string copyright,
 string date,
 string menu_path,
 string image_types,
 PDBProcType type,
 int    n_params,
 int    n_return_vals,
 GimpParamDef[] _params,
 GimpParamDef[] return_vals);
Exemple #3
0
        GimpParamDef[] GetParamDef(int num_args, IntPtr argsPtr)
        {
            var paramDef = new GimpParamDef[num_args];
              var type = typeof(GimpParamDef);
              var seq = new IntPtrSeq(argsPtr, num_args, Marshal.SizeOf(type));

              seq.ForEach((i, ptr) =>
              {
            paramDef[i] = (GimpParamDef) Marshal.PtrToStructure(ptr, type);
              });

              return paramDef;
        }
 GimpParamDef[] GetParamDef(int num_args, IntPtr argsPtr)
 {
     var paramDef = new GimpParamDef[num_args];
       for (int i = 0; i < num_args; i++)
     {
       paramDef[i] = (GimpParamDef)
     Marshal.PtrToStructure(argsPtr, typeof(GimpParamDef));
       argsPtr = (IntPtr)((int)argsPtr + Marshal.SizeOf(paramDef[i]));
     }
       return paramDef;
 }