/[gr2lib]/trunk/gr2lib/core/typedefs/granny_pixel_layouts.cs
ViewVC logotype

Diff of /trunk/gr2lib/core/typedefs/granny_pixel_layouts.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 148 by william, Tue Jul 20 08:11:31 2010 UTC revision 173 by william, Thu Jul 22 15:54:29 2010 UTC
# Line 78  namespace gr2lib.core.typedefs Line 78  namespace gr2lib.core.typedefs
78                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGB555PixelFormat");                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGB555PixelFormat");
79                      if (addr != IntPtr.Zero)                      if (addr != IntPtr.Zero)
80                      {                      {
81                            gr2lib.core.coretypes.native.Layout _native_ptr;
82                          gr2lib.core.coretypes.native.Layout _native;                          gr2lib.core.coretypes.native.Layout _native;
83                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
84                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
85                          _tmp_layout.BytesPerPixel = Marshal.ReadInt32((IntPtr)_native.BytesPerPixel);                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
86                          for (int i = 0; i < _native.ShiftForComponent.Length; i++) { _tmp_layout.ShiftForComponent[i] = Marshal.ReadInt32((IntPtr)_native.ShiftForComponent[i]); }                          _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
87                          for (int i = 0; i < _native.BitsForComponent.Length; i++) { _tmp_layout.BitsForComponent[i] = Marshal.ReadInt32((IntPtr)_native.BitsForComponent[i]); }                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
88                          _tmp_layout.NativePointer = (IntPtr)_native.BytesPerPixel;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
89                            _tmp_layout.BitsForComponent = _native.BitsForComponent;
90                          return _tmp_layout;                          return _tmp_layout;
91                      }                      }
92                      else                      else
# Line 117  namespace gr2lib.core.typedefs Line 119  namespace gr2lib.core.typedefs
119                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGB565PixelFormat");                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGB565PixelFormat");
120                      if (addr != IntPtr.Zero)                      if (addr != IntPtr.Zero)
121                      {                      {
122                            gr2lib.core.coretypes.native.Layout _native_ptr;
123                          gr2lib.core.coretypes.native.Layout _native;                          gr2lib.core.coretypes.native.Layout _native;
124                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
125                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
126                          _tmp_layout.BytesPerPixel = Marshal.ReadInt32((IntPtr)_native.BytesPerPixel);                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
127                          for (int i = 0; i < _native.ShiftForComponent.Length; i++) { _tmp_layout.ShiftForComponent[i] = Marshal.ReadInt32((IntPtr)_native.ShiftForComponent[i]); }                          _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
128                          for (int i = 0; i < _native.BitsForComponent.Length; i++) { _tmp_layout.BitsForComponent[i] = Marshal.ReadInt32((IntPtr)_native.BitsForComponent[i]); }                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
129                          _tmp_layout.NativePointer = (IntPtr)_native.BytesPerPixel;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
130                            _tmp_layout.BitsForComponent = _native.BitsForComponent;
131                          return _tmp_layout;                          return _tmp_layout;
132                      }                      }
133                      else                      else
# Line 155  namespace gr2lib.core.typedefs Line 159  namespace gr2lib.core.typedefs
159                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGBA5551PixelFormat");                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGBA5551PixelFormat");
160                      if (addr != IntPtr.Zero)                      if (addr != IntPtr.Zero)
161                      {                      {
162                            gr2lib.core.coretypes.native.Layout _native_ptr;
163                          gr2lib.core.coretypes.native.Layout _native;                          gr2lib.core.coretypes.native.Layout _native;
164                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
165                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
166                          _tmp_layout.BytesPerPixel = Marshal.ReadInt32((IntPtr)_native.BytesPerPixel);                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
167                          for (int i = 0; i < _native.ShiftForComponent.Length; i++) { _tmp_layout.ShiftForComponent[i] = Marshal.ReadInt32((IntPtr)_native.ShiftForComponent[i]); }                          _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
168                          for (int i = 0; i < _native.BitsForComponent.Length; i++) { _tmp_layout.BitsForComponent[i] = Marshal.ReadInt32((IntPtr)_native.BitsForComponent[i]); }                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
169                          _tmp_layout.NativePointer = (IntPtr)_native.BytesPerPixel;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
170                            _tmp_layout.BitsForComponent = _native.BitsForComponent;
171                          return _tmp_layout;                          return _tmp_layout;
172                      }                      }
173                      else                      else
# Line 192  namespace gr2lib.core.typedefs Line 198  namespace gr2lib.core.typedefs
198                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGBA4444PixelFormat");                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGBA4444PixelFormat");
199                      if (addr != IntPtr.Zero)                      if (addr != IntPtr.Zero)
200                      {                      {
201                            gr2lib.core.coretypes.native.Layout _native_ptr;
202                          gr2lib.core.coretypes.native.Layout _native;                          gr2lib.core.coretypes.native.Layout _native;
203                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
204                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
205                          _tmp_layout.BytesPerPixel = Marshal.ReadInt32((IntPtr)_native.BytesPerPixel);                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
206                          for (int i = 0; i < _native.ShiftForComponent.Length; i++) { _tmp_layout.ShiftForComponent[i] = Marshal.ReadInt32((IntPtr)_native.ShiftForComponent[i]); }                          _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
207                          for (int i = 0; i < _native.BitsForComponent.Length; i++) { _tmp_layout.BitsForComponent[i] = Marshal.ReadInt32((IntPtr)_native.BitsForComponent[i]); }                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
208                          _tmp_layout.NativePointer = (IntPtr)_native.BytesPerPixel;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
209                            _tmp_layout.BitsForComponent = _native.BitsForComponent;
210                          return _tmp_layout;                          return _tmp_layout;
211                      }                      }
212                      else                      else
# Line 229  namespace gr2lib.core.typedefs Line 237  namespace gr2lib.core.typedefs
237                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGB888PixelFormat");                      IntPtr addr = coreapi.GetProcAddress(hdl, "GrannyRGB888PixelFormat");
238                      if (addr != IntPtr.Zero)                      if (addr != IntPtr.Zero)
239                      {                      {
240                            gr2lib.core.coretypes.native.Layout _native_ptr;
241                          gr2lib.core.coretypes.native.Layout _native;                          gr2lib.core.coretypes.native.Layout _native;
242                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
243                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
244                          _tmp_layout.BytesPerPixel = Marshal.ReadInt32((IntPtr)_native.BytesPerPixel);                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
245                          for (int i = 0; i < _native.ShiftForComponent.Length; i++) { _tmp_layout.ShiftForComponent[i] = Marshal.ReadInt32((IntPtr)_native.ShiftForComponent[i]); }                          _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
246                          for (int i = 0; i < _native.BitsForComponent.Length; i++) { _tmp_layout.BitsForComponent[i] = Marshal.ReadInt32((IntPtr)_native.BitsForComponent[i]); }                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
247                          _tmp_layout.NativePointer = (IntPtr)_native.BytesPerPixel;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
248                            _tmp_layout.BitsForComponent = _native.BitsForComponent;
249                          return _tmp_layout;                          return _tmp_layout;
250                      }                      }
251                      else                      else
# Line 271  namespace gr2lib.core.typedefs Line 281  namespace gr2lib.core.typedefs
281                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
282                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
283                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
284                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
285                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
286                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
287                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;
# Line 309  namespace gr2lib.core.typedefs Line 320  namespace gr2lib.core.typedefs
320                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
321                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
322                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
323                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
324                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
325                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
326                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;
# Line 347  namespace gr2lib.core.typedefs Line 359  namespace gr2lib.core.typedefs
359                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
360                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
361                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
362                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
363                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
364                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
365                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;
# Line 385  namespace gr2lib.core.typedefs Line 398  namespace gr2lib.core.typedefs
398                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
399                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
400                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
401                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
402                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
403                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
404                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;
# Line 423  namespace gr2lib.core.typedefs Line 437  namespace gr2lib.core.typedefs
437                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
438                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
439                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
440                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
441                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
442                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
443                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;
# Line 461  namespace gr2lib.core.typedefs Line 476  namespace gr2lib.core.typedefs
476                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
477                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
478                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
479                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
480                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
481                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
482                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;
# Line 499  namespace gr2lib.core.typedefs Line 515  namespace gr2lib.core.typedefs
515                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
516                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
517                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
518                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
519                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
520                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
521                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;
# Line 537  namespace gr2lib.core.typedefs Line 554  namespace gr2lib.core.typedefs
554                          Layout _tmp_layout = new Layout();                          Layout _tmp_layout = new Layout();
555                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));                          _native_ptr = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure(addr, typeof(gr2lib.core.coretypes.native.Layout));
556                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));                          _native = (gr2lib.core.coretypes.native.Layout)Marshal.PtrToStructure((IntPtr)_native_ptr.BytesPerPixel, typeof(gr2lib.core.coretypes.native.Layout));
557                            _tmp_layout.NativePointer = (IntPtr)_native_ptr.BytesPerPixel;
558                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;                          _tmp_layout.BytesPerPixel = _native.BytesPerPixel;
559                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;                          _tmp_layout.ShiftForComponent = _native.ShiftForComponent;
560                          _tmp_layout.BitsForComponent = _native.BitsForComponent;                          _tmp_layout.BitsForComponent = _native.BitsForComponent;

Legend:
Removed from v.148  
changed lines
  Added in v.173

  ViewVC Help
Powered by ViewVC 1.1.22